Implement helm-toolkit snippet to airflow pods/containers
This updates the airflow chart to include the pod security context on the pod template. This also adds the container security context to set readOnlyRootFilesystem flag Change-Id: I84cd4581d6ae915e9caf5c50d407dfcc34b962b3
This commit is contained in:
parent
66d410779c
commit
db37122336
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user