0

Under a umbrella helm chart, i want to create the dependency on the other pods come up.

under my helm chart i have 3 pods,

  1. chart1
  2. chart2
  3. chart3

but my chart3 should start the bring up only after chart2 comes up fully i.e only after the chart2 secrets created.

I have a created the requirement.yaml but helm is trying to bring up parallel.

kish
  • 545
  • 2
  • 5
  • 11
  • I answered [a very similar question](https://stackoverflow.com/questions/54928861/helm-wait-till-dependency-deployment-are-ready-on-kubernetes) yesterday; usually you just let everything start up in parallel and let things restart until they're up. If the dependency is on a Kubernetes-level object like a Secret then Kubernetes won't even try to start the Pod until it's available, but creating the objects in the wrong order isn't harmful at all. – David Maze Mar 02 '19 at 12:03
  • Thanks for the link. For my case, Chart2 will create a configmap and chart2post-install will update the same configmap. And chart3 should read the latest updated configmap. I tried to add a post-install hook in chart3 statefull.yaml. But it did not help. So is it possible to achieve? Could kindly share any relevant samples for the same? – kish Mar 02 '19 at 12:44
  • OR is there is way to check the data in configmap through readyness probe? like i want to keep on checking the kubernets configmap untill i get the desried value in it – kish Mar 02 '19 at 14:18
  • Perhaps each pod could have an init container that checks for the presence of the dependant objects. – Joshua Oliphant Mar 04 '19 at 00:38
  • Is there any way to check kubernet config's through init containers?? I understand that we can check the kubernet service but is it possible to check kubernet secrets or configmap? Because my usecase is kubernet config/secrets – kish Mar 04 '19 at 12:58
  • Possibly you can access Kubernetes API to get secrets or configmaps from within a Pod as described [here](https://stackoverflow.com/questions/30690186/how-do-i-access-the-kubernetes-api-from-within-a-pod-container). – Nick_Kh Mar 14 '19 at 09:08

0 Answers0