Skip to content

Commit

Permalink
fix: stop using stringData + rename airflow.config Secret (#391)
Browse files Browse the repository at this point in the history
Signed-off-by: Mathew Wicks <[email protected]>
  • Loading branch information
thesuperzapper authored Aug 18, 2021
1 parent 0d83310 commit 3721cfd
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 94 deletions.
2 changes: 1 addition & 1 deletion charts/airflow/templates/_helpers/pods.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ The list of `envFrom` for web/scheduler/worker/flower Pods
*/}}
{{- define "airflow.envFrom" }}
- secretRef:
name: "{{ include "airflow.fullname" . }}-config"
name: {{ include "airflow.fullname" . }}-config-envs
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,104 +1,96 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "airflow.fullname" . }}-config
name: {{ include "airflow.fullname" . }}-config-envs
labels:
app: {{ include "airflow.labels.app" . }}
chart: {{ include "airflow.labels.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
stringData:
## we must use `data` rather than `stringData` (see: https://github.com/helm/helm/issues/10010)
data:
## ================
## Linux Configs
## ================
TZ: "Etc/UTC"
TZ: {{ "Etc/UTC" | b64enc | quote }}

## ================
## Database Configs
## ================
## database host/port
{{- if include "airflow.pgbouncer.should_use" . }}
DATABASE_HOST: {{ printf "%s-pgbouncer.%s.svc.cluster.local" (include "airflow.fullname" .) (.Release.Namespace) | quote }}
DATABASE_PORT: "6432"
DATABASE_HOST: {{ printf "%s-pgbouncer.%s.svc.cluster.local" (include "airflow.fullname" .) (.Release.Namespace) | b64enc | quote }}
DATABASE_PORT: {{ "6432" | b64enc | quote }}
{{- else if .Values.postgresql.enabled }}
DATABASE_HOST: {{ printf "%s.%s.svc.cluster.local" (include "airflow.postgresql.fullname" .) (.Release.Namespace) | quote }}
DATABASE_PORT: "5432"
DATABASE_HOST: {{ printf "%s.%s.svc.cluster.local" (include "airflow.postgresql.fullname" .) (.Release.Namespace) | b64enc | quote }}
DATABASE_PORT: {{ "5432" | b64enc | quote }}
{{- else }}
DATABASE_HOST: {{ .Values.externalDatabase.host | quote }}
DATABASE_PORT: {{ .Values.externalDatabase.port | quote }}
DATABASE_HOST: {{ .Values.externalDatabase.host | b64enc | quote }}
DATABASE_PORT: {{ .Values.externalDatabase.port | toString | b64enc | quote }}
{{- end }}

## database configs
{{- if .Values.postgresql.enabled }}
DATABASE_USER: {{ .Values.postgresql.postgresqlUsername | quote }}
DATABASE_DB: {{ .Values.postgresql.postgresqlDatabase | quote }}
DATABASE_USER: {{ .Values.postgresql.postgresqlUsername | b64enc | quote }}
DATABASE_DB: {{ .Values.postgresql.postgresqlDatabase | b64enc | quote }}
{{- else }}
DATABASE_USER: {{ .Values.externalDatabase.user | quote }}
DATABASE_DB: {{ .Values.externalDatabase.database | quote }}
DATABASE_PROPERTIES: {{ .Values.externalDatabase.properties | quote }}
DATABASE_USER: {{ .Values.externalDatabase.user | b64enc | quote }}
DATABASE_DB: {{ .Values.externalDatabase.database | b64enc | quote }}
DATABASE_PROPERTIES: {{ .Values.externalDatabase.properties | b64enc | quote }}
{{- end }}

## bash command which echos the URL encoded value of $DATABASE_PASSWORD
DATABASE_PASSWORD_CMD: |-
echo "${DATABASE_PASSWORD}" | python3 -c "import urllib.parse; encoded_pass = urllib.parse.quote(input()); print(encoded_pass)"
DATABASE_PASSWORD_CMD: {{ `echo "${DATABASE_PASSWORD}" | python3 -c "import urllib.parse; encoded_pass = urllib.parse.quote(input()); print(encoded_pass)"` | b64enc | quote }}

## bash command which echos the DB connection string in SQLAlchemy format
DATABASE_SQLALCHEMY_CMD: |-
{{- if .Values.postgresql.enabled }}
echo -n "postgresql+psycopg2://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}"
{{- else if and (not .Values.postgresql.enabled) (eq "postgres" .Values.externalDatabase.type) }}
echo -n "postgresql+psycopg2://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"
{{- else if and (not .Values.postgresql.enabled) (eq "mysql" .Values.externalDatabase.type) }}
echo -n "mysql+mysqldb://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"
{{- end }}
{{- if .Values.postgresql.enabled }}
DATABASE_SQLALCHEMY_CMD: {{ `echo -n "postgresql+psycopg2://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}"` | b64enc | quote }}
{{- else if eq "postgres" .Values.externalDatabase.type }}
DATABASE_SQLALCHEMY_CMD: {{ `echo -n "postgresql+psycopg2://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- else if eq "mysql" .Values.externalDatabase.type }}
DATABASE_SQLALCHEMY_CMD: {{ `echo -n "mysql+mysqldb://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- end }}

## bash command which echos the DB connection string in Celery result_backend format
DATABASE_CELERY_CMD: |-
{{- if .Values.postgresql.enabled }}
echo -n "db+postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}"
{{- else if and (not .Values.postgresql.enabled) (eq "postgres" .Values.externalDatabase.type) }}
echo -n "db+postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"
{{- else if and (not .Values.postgresql.enabled) (eq "mysql" .Values.externalDatabase.type) }}
echo -n "db+mysql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"
{{- end }}
{{- if .Values.postgresql.enabled }}
DATABASE_CELERY_CMD: {{ `echo -n "db+postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}"` | b64enc | quote }}
{{- else if eq "postgres" .Values.externalDatabase.type }}
DATABASE_CELERY_CMD: {{ `echo -n "db+postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- else if eq "mysql" .Values.externalDatabase.type }}
DATABASE_CELERY_CMD: {{ `echo -n "db+mysql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- end }}

## bash command which echos the DB connection string in `psql` cli format
DATABASE_PSQL_CMD: |-
echo -n "postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"
DATABASE_PSQL_CMD: {{ `echo -n "postgresql://${DATABASE_USER}:$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}

## ================
## Redis Configs
## ================
{{- if include "airflow.executor.celery_like" . }}
## connection string components
{{- if .Values.redis.enabled }}
REDIS_HOST: {{ printf "%s-master.%s.svc.cluster.local" (include "airflow.redis.fullname" .) (.Release.Namespace) | quote }}
REDIS_PORT: "6379"
REDIS_DBNUM: "1"
REDIS_HOST: {{ printf "%s-master.%s.svc.cluster.local" (include "airflow.redis.fullname" .) (.Release.Namespace) | b64enc | quote }}
REDIS_PORT: {{ "6379" | b64enc | quote }}
REDIS_DBNUM: {{ "1" | b64enc | quote }}
{{- else }}
REDIS_HOST: {{ .Values.externalRedis.host | quote }}
REDIS_PORT: {{ .Values.externalRedis.port | quote }}
REDIS_DBNUM: {{ .Values.externalRedis.databaseNumber | quote }}
REDIS_PROPERTIES: {{.Values.externalRedis.properties | quote }}
REDIS_HOST: {{ .Values.externalRedis.host | b64enc | quote }}
REDIS_PORT: {{ .Values.externalRedis.port | toString | b64enc | quote }}
REDIS_DBNUM: {{ .Values.externalRedis.databaseNumber | toString | b64enc | quote }}
REDIS_PROPERTIES: {{.Values.externalRedis.properties | b64enc | quote }}
{{- end }}

## a bash command which echos the URL encoded value of $REDIS_PASSWORD
## bash command which echos the URL encoded value of $REDIS_PASSWORD
## NOTE: if $REDIS_PASSWORD is non-empty, prints `:${REDIS_PASSWORD}@`, else ``
REDIS_PASSWORD_CMD: |-
echo "${REDIS_PASSWORD}" | python3 -c "import urllib.parse; encoded_pass = urllib.parse.quote(input()); print(f\":{encoded_pass}@\") if len(encoded_pass) > 0 else None"
REDIS_PASSWORD_CMD: {{ `echo "${REDIS_PASSWORD}" | python3 -c "import urllib.parse; encoded_pass = urllib.parse.quote(input()); print(f\":{encoded_pass}@\") if len(encoded_pass) > 0 else None"` | b64enc | quote }}

## a bash command which echos the Redis connection string
REDIS_CONNECTION_CMD: |-
echo -n "redis://$(eval $REDIS_PASSWORD_CMD)${REDIS_HOST}:${REDIS_PORT}/${REDIS_DBNUM}${REDIS_PROPERTIES}"
## bash command which echos the Redis connection string
REDIS_CONNECTION_CMD: {{ `echo -n "redis://$(eval $REDIS_PASSWORD_CMD)${REDIS_HOST}:${REDIS_PORT}/${REDIS_DBNUM}${REDIS_PROPERTIES}"` | b64enc | quote }}
{{- end }}

## specify keys that may be removed under `data` rather than `stringData`
## (see: https://github.com/helm/helm/issues/10010)
data:
## ================
## Airflow Configs (General)
## ================
AIRFLOW__CORE__DAGS_FOLDER: {{ (include "airflow.dags.path" .) | b64enc | quote }}
AIRFLOW__CORE__DAGS_FOLDER: {{ include "airflow.dags.path" . | b64enc | quote }}
AIRFLOW__CORE__EXECUTOR: {{ .Values.airflow.executor | b64enc | quote }}
AIRFLOW__CORE__FERNET_KEY: {{ .Values.airflow.fernetKey | b64enc | quote }}
AIRFLOW__CORE__SQL_ALCHEMY_CONN_CMD: {{ `bash -c 'eval "$DATABASE_SQLALCHEMY_CMD"'` | b64enc | quote }}
Expand All @@ -121,12 +113,12 @@ data:
## ================
{{- if .Values.airflow.legacyCommands }}
AIRFLOW__CORE__BASE_LOG_FOLDER: {{ .Values.logs.path | b64enc | quote }}
AIRFLOW__CORE__DAG_PROCESSOR_MANAGER_LOG_LOCATION: {{ (printf "%s/dag_processor_manager/dag_processor_manager.log" .Values.logs.path) | b64enc | quote }}
AIRFLOW__CORE__DAG_PROCESSOR_MANAGER_LOG_LOCATION: {{ printf "%s/dag_processor_manager/dag_processor_manager.log" .Values.logs.path | b64enc | quote }}
{{- else }}
AIRFLOW__LOGGING__BASE_LOG_FOLDER: {{ .Values.logs.path | b64enc | quote }}
AIRFLOW__LOGGING__DAG_PROCESSOR_MANAGER_LOG_LOCATION: {{ (printf "%s/dag_processor_manager/dag_processor_manager.log" .Values.logs.path) | b64enc | quote }}
AIRFLOW__LOGGING__DAG_PROCESSOR_MANAGER_LOG_LOCATION: {{ printf "%s/dag_processor_manager/dag_processor_manager.log" .Values.logs.path | b64enc | quote }}
{{- end }}
AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY: {{ (printf "%s/scheduler" .Values.logs.path) | b64enc | quote }}
AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY: {{ printf "%s/scheduler" .Values.logs.path | b64enc | quote }}

## ================
## Airflow Configs (Celery)
Expand Down Expand Up @@ -156,10 +148,10 @@ data:

{{- if .Values.airflow.legacyCommands }}
{{- if not .Values.airflow.config.AIRFLOW__KUBERNETES__ENV_FROM_CONFIGMAP_REF }}
AIRFLOW__KUBERNETES__ENV_FROM_SECRET_REF: {{ (printf "%s-config" (include "airflow.fullname" .)) | b64enc | quote }}
AIRFLOW__KUBERNETES__ENV_FROM_SECRET_REF: {{ printf "%s-config" (include "airflow.fullname" .) | b64enc | quote }}
{{- end }}
{{- if (not .Values.airflow.config.AIRFLOW__KUBERNETES__WORKER_SERVICE_ACCOUNT_NAME) }}
AIRFLOW__KUBERNETES__WORKER_SERVICE_ACCOUNT_NAME: {{ (include "airflow.serviceAccountName" .) | b64enc | quote }}
AIRFLOW__KUBERNETES__WORKER_SERVICE_ACCOUNT_NAME: {{ include "airflow.serviceAccountName" . | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
5 changes: 2 additions & 3 deletions charts/airflow/templates/config/secret-known-hosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
chart: {{ include "airflow.labels.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
stringData:
known_hosts: |-
{{- .Values.dags.gitSync.sshKnownHosts | nindent 4 }}
data:
known_hosts: {{ .Values.dags.gitSync.sshKnownHosts | b64enc | quote }}
{{- end }}
13 changes: 6 additions & 7 deletions charts/airflow/templates/config/secret-webserver-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ metadata:
chart: {{ include "airflow.labels.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
stringData:
webserver_config.py: |-
{{- if .Values.web.webserverConfig.stringOverride }}
{{- .Values.web.webserverConfig.stringOverride | nindent 4 }}
{{- else }}
{{- tpl (.Files.Get "files/webserver_config.py") . | nindent 4 }}
{{- end }}
data:
{{- if .Values.web.webserverConfig.stringOverride }}
webserver_config.py: {{ .Values.web.webserverConfig.stringOverride | b64enc | quote }}
{{- else }}
webserver_config.py: {{ tpl (.Files.Get "files/webserver_config.py") . | b64enc | quote }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/db-migrations-script: {{ include "airflow.db_migrations.db_migrations.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/db-migrations-script: {{ include "airflow.db_migrations.db_migrations.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/flower/flower-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
{{- toYaml .Values.airflow.podAnnotations | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-pgbouncer: {{ include (print $.Template.BasePath "/pgbouncer/pgbouncer-secret.yaml") . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
{{- toYaml .Values.airflow.podAnnotations | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
{{- if include "airflow.executor.kubernetes_like" . }}
checksum/config-pod-template: {{ include (print $.Template.BasePath "/config/configmap-pod-template.yaml") . | sha256sum }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-connections-script: {{ include "airflow.sync.sync_connections.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/sync/sync-connections-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-connections-script: {{ include "airflow.sync.sync_connections.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
5 changes: 2 additions & 3 deletions charts/airflow/templates/sync/sync-connections-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
chart: {{ include "airflow.labels.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
stringData:
sync_connections.py: |-
{{- include "airflow.sync.sync_connections.py" . | indent 4 }}
data:
sync_connections.py: {{ include "airflow.sync.sync_connections.py" . | b64enc | quote }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/airflow/templates/sync/sync-pools-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-pools-script: {{ include "airflow.sync.sync_pools.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/sync/sync-pools-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-pools-script: {{ include "airflow.sync.sync_pools.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
5 changes: 2 additions & 3 deletions charts/airflow/templates/sync/sync-pools-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
chart: {{ include "airflow.labels.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
stringData:
sync_pools.py: |-
{{- include "airflow.sync.sync_pools.py" . | indent 4 }}
data:
sync_pools.py: {{ include "airflow.sync.sync_pools.py" . | b64enc | quote }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/airflow/templates/sync/sync-users-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-users-script: {{ include "airflow.sync.sync_users.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/sync/sync-users-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
template:
metadata:
annotations:
checksum/secret-config: {{ include (print $.Template.BasePath "/config/secret-config.yaml") . | sha256sum }}
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
checksum/secret-local-settings: {{ include (print $.Template.BasePath "/config/secret-local-settings.yaml") . | sha256sum }}
checksum/sync-users-script: {{ include "airflow.sync.sync_users.py" . | sha256sum }}
{{- if .Values.airflow.podAnnotations }}
Expand Down
Loading

1 comment on commit 3721cfd

@DJAyth
Copy link

@DJAyth DJAyth commented on 3721cfd Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really old commit I know, but you might want to include in the Changelog for the release this made it into that you renamed the secret that has the env vars. It's kind of a breaking change when using pod templates.

metadata:
  name: {{ include "airflow.fullname" . }}-config
  name: {{ include "airflow.fullname" . }}-config-envs

Please sign in to comment.