diff --git a/templates/injector-deployment.yaml b/templates/injector-deployment.yaml index 2f67dad..9240b09 100644 --- a/templates/injector-deployment.yaml +++ b/templates/injector-deployment.yaml @@ -46,6 +46,10 @@ spec: {{ template "injector.resources" . }} image: "{{ .Values.injector.image.repository }}:{{ .Values.injector.image.tag }}" imagePullPolicy: "{{ .Values.injector.image.pullPolicy }}" + {{- if not .Values.global.openshift }} + securityContext: + allowPrivilegeEscalation: false + {{- end }} env: - name: AGENT_INJECT_LISTEN value: ":8080" diff --git a/templates/server-statefulset.yaml b/templates/server-statefulset.yaml index be8ed93..62296af 100644 --- a/templates/server-statefulset.yaml +++ b/templates/server-statefulset.yaml @@ -70,6 +70,10 @@ spec: - "/bin/sh" - "-ec" args: {{ template "vault.args" . }} + {{- if not .Values.global.openshift }} + securityContext: + allowPrivilegeEscalation: false + {{- end }} env: - name: HOST_IP valueFrom: