I have a helm chart that requires stable/redis
as a child chart. The parent chart needs to expose the redis service as an environment variable.
The redis chart includes a template called redis.fullname
. How can I refer to this in my parent chart? I.e. I want something like this in my parent deployment but it doesn't work:
kind: Deployment
spec:
template:
containers:
env:
- name: REDIS_CLUSTER_SERVICE_HOST
value: {{ template "redis.fullname" . }}
You can use '{{ .Release.Name }}-redis'
in your parent chart. I had same requirement. This is my example in case you want to take a look ->https://github.com/kubernetes/charts/tree/master/incubator/distribution
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