timonviola opened a new issue, #47789:
URL: https://github.com/apache/airflow/issues/47789
### Official Helm Chart version
1.15.0 (latest released)
### Apache Airflow version
v2.10.4
### Kubernetes Version
1.32.1
### Helm Chart configuration
```yaml
spec:
values:
webserverSecretKeySecretName: webserver-secret-key
```
### Docker Image customizations
```Dockerfile
FROM apache/airflow:2.10.4-python3.12
COPY airflow_local_settings.py
$AIRFLOW_USER_HOME/config/airflow_local_settings.py
```
### What happened
The `airflow_local_config.py` file is is empty and e.g. cluster policies are
not applied (since the file is empty).
### What you think should happen instead
Either, if the airflow_local_settings.py exists, it should not be overridden
(by the empty configMap value)
Or this behavior should be documented and chart users should be able to
disable the configMap mounting e.g.: by setting:
```yaml
spec:
values:
airflowLocalSettings: ~
```
### How to reproduce
I think the reason for that is the templating in the chart values.yaml:
```yaml
airflowLocalSettings: |-
{{- if semverCompare ">=2.2.0 <3.0.0" .Values.airflowVersion }}
{{- if not (or .Values.webserverSecretKey
.Values.webserverSecretKeySecretName) }}
from airflow.www.utils import UIAlert
DASHBOARD_UIALERTS = [
UIAlert(
'Usage of a dynamic webserver secret key detected. We recommend a
static webserver secret key instead.'
' See the <a href='
'"https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#webserver-secret-key"
'
'target="_blank" rel="noopener noreferrer">'
'Helm Chart Production Guide</a> for more details.',
category="warning",
roles=["Admin"],
html=True,
)
]
{{- end }}
{{- end }}
```
If `webserverSecretKey` or `webserverSecretKeySecretName` is defined, the
local_airflow_settings.py will be overwritten by mounting an empty configMap.
This might be on purpose - in that case, I would extend the documentation to
point out this caveat.
### Anything else
_No response_
### 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]