I need to run pods and jobs in a specific order
I have this chart structure
my-chart/
Chart.yaml
Values.yaml
templates/
module1 /
deployment1.yaml
service1.yaml
job1.yaml
module2 /
deployment2.yaml
service2.yaml
job2.yaml
I want job1 start running once all pod replicas related to module1 are ready and the job2 start running once all pod replicas related to module2 are ready
I try post-install and post-upgrade hooks but this will start jobs after all pods of module1 and module2 are all ready
I found one solution that is not recommended is to use "kubectl" in "initContainers" to verify all the pods related to module1 are ready or not.
Are there any additional recommendations or suggestions please ?