WARNING: jp-osa do not have regional COS endpoint support, it is recommended to use Cross-Regional Storageclass.
And the code snippet I have in NOTES.txt for this helm chart is:
{{- if not (contains $.Values.region "storage-plugin.regionEP") }}
WARNING: {{ $.Values.region }} do not have regional COS endpoint support, it is recommended to use Cross-Regional Storageclass.
{{- end }
When I print storage-plugin.regionEP I see .au-syd.br-sao.ca-tor.eu-de.eu-fr2.eu-gb.jp-osa.jp-tok.us-east.us-south
and the region values is jp-osa.
If condition should ideally not get executed. Any idea why this is not working as expected.
The way you have it set up, it is looking for the string "jp-osa" inside the literal string "storage-plugin.regionEP", not a variable or template. Since it does not match, the
ifstatement is always true.I'm guessing you have a template in
_helpers.tplcalledstorage-plugin.regionEP, which you are trying to call. In this case, you need to use the following:The
(include "storage-plugin.regionEP" $)should return the string.au-syd.br-sao.ca-tor.eu-de.eu-fr2.eu-gb.jp-osa.jp-tok.us-east.us-south. Thecontainswill then returntrueand theifstatement will be renderedfalse.