diff --git a/charts/shipyard/templates/job-airflow-db-init.yaml b/charts/shipyard/templates/job-airflow-db-init.yaml index 9bc9b49d..7353d99e 100644 --- a/charts/shipyard/templates/job-airflow-db-init.yaml +++ b/charts/shipyard/templates/job-airflow-db-init.yaml @@ -36,6 +36,7 @@ spec: configmap-bin-hash: {{ tuple "configmap-airflow-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-airflow-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: +{{ dict "envAll" $envAll "application" "db_init" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure nodeSelector: @@ -47,6 +48,7 @@ spec: image: {{ .Values.images.tags.airflow_db_init | quote }} imagePullPolicy: {{ .Values.images.pull_policy | quote }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.airflow_db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "db_init" "container" "airflow_db_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} env: - name: DB_HOST valueFrom: diff --git a/charts/shipyard/templates/job-airflow-db-sync.yaml b/charts/shipyard/templates/job-airflow-db-sync.yaml index f6588d5b..fed1a677 100644 --- a/charts/shipyard/templates/job-airflow-db-sync.yaml +++ b/charts/shipyard/templates/job-airflow-db-sync.yaml @@ -36,6 +36,7 @@ spec: configmap-bin-hash: {{ tuple "configmap-airflow-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-airflow-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: +{{ dict "envAll" $envAll "application" "db_sync" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure nodeSelector: @@ -47,6 +48,7 @@ spec: image: {{ .Values.images.tags.airflow_db_sync }} imagePullPolicy: {{ .Values.images.pull_policy }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.airflow_db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "db_sync" "container" "airflow_db_sync" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /tmp/airflow-db-sync.sh volumeMounts: diff --git a/charts/shipyard/values.yaml b/charts/shipyard/values.yaml index 7cec01b2..17220602 100644 --- a/charts/shipyard/values.yaml +++ b/charts/shipyard/values.yaml @@ -797,6 +797,9 @@ pod: shipyard_db_init: readOnlyRootFilesystem: true allowPrivilegeEscalation: false + airflow_db_init: + readOnlyRootFilesystem: false + allowPrivilegeEscalation: false db_sync: pod: runAsUser: 1000 @@ -804,6 +807,9 @@ pod: shipyard_db_sync: readOnlyRootFilesystem: true allowPrivilegeEscalation: false + airflow_db_sync: + readOnlyRootFilesystem: false + allowPrivilegeEscalation: false api_test: pod: runAsUser: 1000