GitHub user jimmyhedstr0m added a comment to the discussion: How to change 
default password in Airflow Helm chart?

The user is created only first time and the password value does not get updated 
since the value is stored in the postgres database. I had the same issue and 
ended up in overriding the create user arguments with password coming from 
secrets ref

```
createUserJob:
  useHelmHooks: false
  applyCustomEnv: true
  env:
    - name: ADMIN_PASSWORD
      valueFrom:
        secretKeyRef:
          name: airflow-env-vars
          key: ADMIN_PASSWORD
  args:
    - "bash"
    - "-c"
    # The format below is necessary to get `helm lint` happy
    - |-
      exec \
      airflow {{ semverCompare ">=2.0.0" .Values.airflowVersion | ternary 
"users create" "create_user" }} "$@"
    - --
    - "-r"
    - "{{ .Values.webserver.defaultUser.role }}"
    - "-u"
    - "{{ .Values.webserver.defaultUser.username }}"
    - "-e"
    - "{{ .Values.webserver.defaultUser.email }}"
    - "-f"
    - "{{ .Values.webserver.defaultUser.firstName }}"
    - "-l"
    - "{{ .Values.webserver.defaultUser.lastName }}"
    - "-p"
    - "$(ADMIN_PASSWORD)"
migrateDatabaseJob:
  useHelmHooks: false
  applyCustomEnv: false
webserver:
  defaultUser:
    enabled: true
    username: admin
    password: dummy
    role: Admin
```

GitHub link: 
https://github.com/apache/airflow/discussions/42308#discussioncomment-11375328

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

Reply via email to