ory / k8s

Kubernetes Helm Charts for the ORY ecosystem.
https://k8s.ory.sh/helm
Apache License 2.0
335 stars 258 forks source link

fix: run `extraInitContainers` before migration #608

Closed cschmatzler closed 1 year ago

cschmatzler commented 1 year ago

In values.yaml, the deployment.extraInitContainers value is documented as follows:

These are processed before the migration init container.

In the template itself, they were added after the migration container, though. Since Kubernetes runs init containers in the order they were defined, and each one of them has to be successful in order for the next to be started, this can block setups where there's an extra init container that sets up the database.

See also the relevant Kubernetes documentation:

If you specify multiple init containers for a Pod, kubelet runs each init container sequentially. Each init container must succeed before the next can run. When all of the init containers have run to completion, kubelet initializes the application containers for the Pod and runs them as usual.

Related Issue or Design Document

Init containers were added in an order that contradicts the documentation in values.yaml.

Checklist

cschmatzler commented 1 year ago

Hey! Thanks for the quick review. I have applied your suggestion and also applied the same change to the Keto and Hydra charts.

Let me know if I missed anything, since I'm not too familiar with all the components yet.

Cheers!