Skip to content

Commit

Permalink
Add allowPrivilegeEscalation=false to pods (#429)
Browse files Browse the repository at this point in the history
* Add allowPrivilegeEscalation=false to pods

* Add openshift check

* Add injector openshift check
  • Loading branch information
jasonodonnell authored Dec 14, 2020
1 parent d80432a commit cc20c0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/injector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions templates/server-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cc20c0b

Please sign in to comment.