INT-7432 security context for openshift (#34)
OpenShift requires the red hat image (optional) and these security settings to alleviate warnings. These changes are fine for other k8s implementations like minikube using the stock container from docker hub.
This commit is contained in:
@@ -59,7 +59,14 @@ spec:
|
|||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
runAsNonRoot: true
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
lifecycle:
|
lifecycle:
|
||||||
{{- if .Values.deployment.postStart.command }}
|
{{- if .Values.deployment.postStart.command }}
|
||||||
postStart:
|
postStart:
|
||||||
|
|||||||
@@ -36,7 +36,14 @@ tests:
|
|||||||
pattern: sonatype/nexus3:3\.\d+\.\d+
|
pattern: sonatype/nexus3:3\.\d+\.\d+
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].securityContext
|
path: spec.template.spec.containers[0].securityContext
|
||||||
value: null
|
value:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
runAsNonRoot: true
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].imagePullPolicy
|
path: spec.template.spec.containers[0].imagePullPolicy
|
||||||
value: IfNotPresent
|
value: IfNotPresent
|
||||||
|
|||||||
Reference in New Issue
Block a user