GitHub user tmvcode added a comment to the discussion: How do I reload 
webserver_config.yml without restarting the webserver

My understanding is that the webserver starts up gunicorn with the default 4 
worker processes to handle the requests.  Those workers are fed with the 
settings from the webserver_config.yml and the settings are cached unless the 
worker processes get restarted.  I added the following debug line into my 
webserver_config.yml and saw that my password was being updated with the new 
value from the k8s secret file volume mount for every requests, but I still 
wasn't able to log into the webserver because the workers were still holding on 
to the old AUTH_LDAP_BIND_PASSWORD value.  The only way I know to get the 
webserver to use the new value of AUTH_LDAP_BIND_PASSWORD is to do a rolling 
restart of the airflow webserver pod.
```
    @app.before_request
    def set_auth_ldap_bind_password () -> None:
        AUTH_LDAP_BIND_PASSWORD = readFileAsString(/etc/config/password.txt)
        print("setting AUTH_LDAP_BIND_PASSWORD before every request")
```

GitHub link: 
https://github.com/apache/airflow/discussions/43239#discussioncomment-11033777

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to