GitHub user RickyLeeeee created a discussion: How to create custom roles when
deploying airflow with helm chart
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:
```
extraInitContainers:
- name: setup-roles-and-permissions
image: apache/airflow:2.10.0
command:
- /bin/bash
- -c
args:
- |
airflow db migrate
airflow roles create Test &&
airflow roles add-perms Test --resource "DAG Runs" --action "can_edit"
&&
airflow roles add-perms Test --resource "DAG Runs" --action
"can_create" &&
airflow roles add-perms Test --resource "DAG Runs" --action "can_edit"
```
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.
GitHub link: https://github.com/apache/airflow/discussions/45543
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]