Helm-Chart deployment.yaml uses k8s secrets to mount to a volume. k8s secrets are created after 10mins by executing the helm install. How to delay the deployment when the secrets are created?
If the secrets don't already exist, you don't need to do anything (other than not use the helm install --wait
flag); Kubernetes handles this on its own.
When Helm sends the rendered YAML to Kubernetes, it checks that the data matches the schema described in the Kubernetes API, but it does not check that any referenced objects (secrets, config maps, PVCs) actually exist. If they don't yet, the pods will show up as Pending
in kubectl get pods
output, and Kubernetes won't actually start the process of starting the pods. Then later on when you actually install the secrets, Kubernetes on its own will figure out that pod A needed secret B and it's there now, so it can start.
You can adjust timeout for deployment. Another option is to set wait flag and wait until the previous deployment is done. Read the appropriate documentation part.