If I have a basic kubernetes helm template like below:
port: {{ .Values.Port }}
Is there a way to specify a default port if none is passed in?
In values.yaml
you put Port: <port-number>
which will be used if you don't pass the value using --set
.
You can also set default like following
port: {{ default 1234 .Values.Port }}
# You can replace 1234 with your port number
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With