Add allowPrivilegeEscalation=false to pods (#429)
* Add allowPrivilegeEscalation=false to pods * Add openshift check * Add injector openshift check
This commit is contained in:
parent
d80432a7d5
commit
cc20c0b3c1
2 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,10 @@ spec:
|
||||||
{{ template "injector.resources" . }}
|
{{ template "injector.resources" . }}
|
||||||
image: "{{ .Values.injector.image.repository }}:{{ .Values.injector.image.tag }}"
|
image: "{{ .Values.injector.image.repository }}:{{ .Values.injector.image.tag }}"
|
||||||
imagePullPolicy: "{{ .Values.injector.image.pullPolicy }}"
|
imagePullPolicy: "{{ .Values.injector.image.pullPolicy }}"
|
||||||
|
{{- if not .Values.global.openshift }}
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: AGENT_INJECT_LISTEN
|
- name: AGENT_INJECT_LISTEN
|
||||||
value: ":8080"
|
value: ":8080"
|
||||||
|
|
|
@ -70,6 +70,10 @@ spec:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-ec"
|
- "-ec"
|
||||||
args: {{ template "vault.args" . }}
|
args: {{ template "vault.args" . }}
|
||||||
|
{{- if not .Values.global.openshift }}
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: HOST_IP
|
- name: HOST_IP
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
Loading…
Reference in a new issue