You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hallo, this is not a bug rather a feature request.
I tried to find a way to make a simple environment specific configuration with helm. My goal was to run helm like helm install -f myfile.yaml ...
I want to apply templates depending on my environments to kubernetes, so i was looking for a variable holding the filename (or list of files) from the -f/--values parameter so i could simply define a condition at the beginning of my templates like: {{ if eq .<variable> "myfile.yaml" }} (may syntax is not 100% ok, but you know what i mean ;) )
or {{if has .<variable> "myfile.yaml" }} (may syntax is not 100% ok, but you know what i mean ;) )
I found no way to get filenames of the -f parameter, is there a way or is there a other simple way to achieve this goal?
I found some solutions with ex. helmfile and workarrounds with printf, but all solutions add complexity to the deployments.
For now my workaround uses the "--set" parameter, but i don't like the duplicate definition: -f mycluster.yaml --set cluster=mycluster {{ if eq .Values.cluster "myfile.yaml" }}
Is there a reason why the -f parameter is not available in helm?
The text was updated successfully, but these errors were encountered:
Hallo, this is not a bug rather a feature request.
I tried to find a way to make a simple environment specific configuration with helm. My goal was to run helm like
helm install -f myfile.yaml ...
I want to apply templates depending on my environments to kubernetes, so i was looking for a variable holding the filename (or list of files) from the
-f/--values
parameter so i could simply define a condition at the beginning of my templates like:{{ if eq .<variable> "myfile.yaml" }}
(may syntax is not 100% ok, but you know what i mean ;) )or
{{if has .<variable> "myfile.yaml" }}
(may syntax is not 100% ok, but you know what i mean ;) )I found no way to get filenames of the
-f
parameter, is there a way or is there a other simple way to achieve this goal?I found some solutions with ex.
helmfile
and workarrounds withprintf
, but all solutions add complexity to the deployments.For now my workaround uses the "--set" parameter, but i don't like the duplicate definition:
-f mycluster.yaml --set cluster=mycluster
{{ if eq .Values.cluster "myfile.yaml" }}
Is there a reason why the
-f
parameter is not available in helm?The text was updated successfully, but these errors were encountered: