diff --git a/horizon/templates/job-db-sync.yaml b/horizon/templates/job-db-sync.yaml index 4bdeb0093b..9c2f88b3c8 100644 --- a/horizon/templates/job-db-sync.yaml +++ b/horizon/templates/job-db-sync.yaml @@ -36,6 +36,7 @@ spec: {{ dict "envAll" $envAll "podName" "horizon-db-sync" "containerNames" (list "horizon-db-sync" "init" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} +{{ dict "envAll" $envAll "application" "db_sync" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} @@ -45,6 +46,7 @@ spec: - name: horizon-db-sync {{ tuple $envAll "horizon_db_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" $envAll "application" "db_sync" "container" "horizon_db_sync" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /tmp/db-sync.sh volumeMounts: diff --git a/horizon/templates/pod-helm-tests.yaml b/horizon/templates/pod-helm-tests.yaml index 85e3ec0fcf..872d7e09a5 100644 --- a/horizon/templates/pod-helm-tests.yaml +++ b/horizon/templates/pod-helm-tests.yaml @@ -32,6 +32,7 @@ metadata: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} {{ dict "envAll" $envAll "podName" "horizon-test" "containerNames" (list "init" "horizon-test") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 4 }} spec: +{{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }} restartPolicy: Never serviceAccountName: {{ $serviceAccountName }} nodeSelector: @@ -42,6 +43,7 @@ spec: - name: horizon-test {{ tuple $envAll "test" | include "helm-toolkit.snippets.image" | indent 6 }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }} +{{ dict "envAll" $envAll "application" "test" "container" "horizon_test" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 6 }} command: - /tmp/selenium-test.py env: diff --git a/horizon/values.yaml b/horizon/values.yaml index 2c67cc763f..4897e3f58b 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -2044,6 +2044,21 @@ pod: readOnlyRootFilesystem: false allowPrivilegeEscalation: false runAsUser: 0 + db_sync: + pod: + runAsUser: 42424 + container: + horizon_db_sync: + readOnlyRootFilesystem: false + allowPrivilegeEscalation: false + runAsUser: 0 + test: + pod: + runAsUser: 42424 + container: + horizon_test: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false affinity: anti: type: