How to create custom roles when deploying airflow with helm chart #45543
Replies: 1 comment 1 reply
-
Generally speaking helm is for installing apps not intializing the database with custom roles variables, connections etc., you should have additional synchronization and configuraiton scripts that are not part of "helm install" - that woudl be best way and you are free to do it as you want - but outside of Helm. We have If you wish to run it initialization script and init container, you need to do it in a way that will handle all ambiguities - i.e. what happens when you create or update roles in the future, how to delete those that were deleted/added, how not to override the roles that were created manually - and also handle the case that the init container is executed every time the main container starts (which means tha this init container will run many times even if you do not re-deploy helm - basically any time your containers start. in your case yes - you miss all the environment variables that oother containers had - so your "airflow" command is not using the right credentials - you can look at the definition of those containers you have via |
Beta Was this translation helpful? Give feedback.
-
Hello,
I want to create multiple custom roles while deploying Airflow using a Helm Chart. However, after searching extensively on Google, I couldn't find a relevant solution. I have tried adding the following Airflow CLI commands under
webserver.extraInitContainers
, but it did not work:Logs for the extraContainer:
Based on the logs, it shows that the metadata database being used is SQLite instead of PostgreSQL. It seems that it hasn’t connected to the correct database.
May I ask how to create custom roles during deployment?
The Helm Chart version I am using is 1.15.0, and the Airflow version is 2.10.0.
Beta Was this translation helpful? Give feedback.
All reactions