dindurthy opened a new issue, #42158: URL: https://github.com/apache/airflow/issues/42158
### Apache Airflow version 2.10.0 ### If "Other Airflow 2 version" selected, which one? 2.10.1 ### What happened? [I see related issues but not specifically the one I'm about to describe](https://github.com/apache/airflow/issues?q=is%3Aissue+waitformigrations). We are using the helm chart v1.15.0 which enables extraInitContainers for the migrateDatabaseJob. By default, the webserver, workers, triggerer, scheduler set`waitForMigrations.enabled: true` in the chart, which kinda makes sense. However, that will not work if the `wait-for-airflow-migrations` itself _depends_ on an initContainer. In our case, which expect is a semi-common one, database connections for GKE workloads connecting to private CloudSQL instances rely on the cloud-sql-proxy initContainer. Because `extraInitContainers` injects those containers _after_ the `wait-for-airflow-migrations` and because the [kubelet will run initContainers in their order](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#detailed-behavior) regardless of a latter one [being a sidecar](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#sidecar-containers-and-pod-lifecycle). ### What you think should happen instead? For this to work, we would need extraInitContainers to come first (perhaps a breaking change) or have some general control of the order including the wait container. ### How to reproduce Set up an airflow database that requires the an init container to connect. With `waitForMigration.enabled: true`, airflow pods will be stuck in Pending. ### Operating System ubuntu ### Versions of Apache Airflow Providers N/A ### Deployment Official Apache Airflow Helm Chart ### Deployment details k8s v1.29.0 ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
