From c247ac8e2fadd8dea35b878188f8cf2af09a6211 Mon Sep 17 00:00:00 2001 From: Riadh Meghenem Date: Tue, 10 Dec 2024 11:02:39 +0100 Subject: [PATCH] fix: security context rollback (#37) --- templates/upgrade.yml | 6 ------ values.yaml | 18 ------------------ 2 files changed, 24 deletions(-) diff --git a/templates/upgrade.yml b/templates/upgrade.yml index ce292bd..b474153 100644 --- a/templates/upgrade.yml +++ b/templates/upgrade.yml @@ -17,9 +17,6 @@ spec: - name: horizon-upgrade image: {{ include "common.images.image" (dict "imageRoot" .Values.upgrade.image "global" .Values.global) }} imagePullPolicy: {{ .Values.upgrade.image.pullPolicy | default "IfNotPresent" | quote }} - {{- if .Values.upgrade.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.upgrade.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.upgrade.image) "context" $) | nindent 10 }} args: [ "-y", @@ -36,8 +33,5 @@ spec: - name: MONGODB_URI {{- include "horizon.mongodbUri" (dict "context" .) | nindent 14 }} restartPolicy: Never - {{- if .Values.upgrade.podSecurityContext.enabled }} - securityContext: {{- omit .Values.upgrade.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} backoffLimit: 0 {{- end }} diff --git a/values.yaml b/values.yaml index 4400ddb..cdd400c 100644 --- a/values.yaml +++ b/values.yaml @@ -681,24 +681,6 @@ upgrade: requests: memory: 512Mi cpu: 500m - ## Configure Pods Security Context - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod - ## @param upgrade.podSecurityContext.enabled Enabled Horizon pods' Security Context - ## @param upgrade.podSecurityContext.fsGroup Set Horizon pod's Security Context fsGroup - ## - podSecurityContext: - enabled: true - fsGroup: 1001 - ## Configure Container Security Context (only main container) - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container - ## @param upgrade.containerSecurityContext.enabled Enabled Horizon containers' Security Context - ## @param upgrade.containerSecurityContext.runAsUser Set Horizon container's Security Context runAsUser - ## @param upgrade.containerSecurityContext.runAsNonRoot Set Horizon container's Security Context runAsNonRoot - ## - containerSecurityContext: - enabled: true - runAsUser: 1001 - runAsNonRoot: true ## @param upgrade.from Sets to the version you're upgrading from. If empty, the chart will try to infer the version from the database. ## from: ""