Using a service from dependency chart in parent chart deployment template

2/6/2020

I am trying to create a app with chart that requires redis. Here is the requirements.yaml

dependencies:
  - name: redis
    repository: https://kubernetes-charts.storage.googleapis.com
    version: 10.4.1

Here is template of my deployment.

- name: REDIS_HOST
            value: {{ template "redis.fullname" . }}-master

But the render shows

  - name: REDIS_HOST
    value: release-name-<parentchartname>-api-master # instead of the dependency one expected as it has redis in it.

The render shows the app chart template full name instead of the redis one. Is there a way to have my deployment render redis master service with this variable value: {{ template "redis.fullname" . }}-master ?

-- Raj
kubernetes-helm

0 Answers