rauljmz opened a new issue, #25637:
URL: https://github.com/apache/airflow/issues/25637
### Official Helm Chart version
1.6.0 (latest released)
### Apache Airflow version
2.3.3
### Kubernetes Version
1.24.0
### Helm Chart configuration
```yaml
config:
database:
sql_alchemy_connect_args: airflow_local_settings.keepalive_kwargs
airflowLocalSettings: |-
keepalive_kwargs = {
"keepalives": 1,
"keepalives_idle": 30,
"keepalives_interval": 5,
"keepalives_count": 5,
}
```
### Docker Image customisations
No
### What happened
I am trying to pass some different keepalive args to the SqlAlchemy
connection as per the
[documentation](https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html?highlight=mysql#setting-up-a-mysql-database)
recommendation. (See the `values.yaml` snippet added to the issue).
With this change in place the chart fails to upgrade as the database
migrations never complete.
### What you think should happen instead
Airflow should complete database migrations and start up normally
### How to reproduce
Just do a `helm upgrade --install` with the `values.yaml` snippet above.
### Anything else
The problem occurs because the `airflow_local_settings.py` is not mounted to
the migrations job. This however can be hacked by adding this snippet to the
values.yaml:
```yaml
migrateDatabaseJob:
extraVolumeMounts:
- name: config
mountPath: /opt/airflow/config/airflow_local_settings.py
subPath: airflow_local_settings.py
readOnly: true
```
But then the chart still refuses to start, as the init containers waiting
for the migrations in the _webserver_, _triggerer_ and _scheduler_ deployments,
also miss the same `airflow_local_settings.py` file. Since they use the airflow
CLI to check the db for migrations they fail to execute.
### Are you willing to submit PR?
- [X] 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]