Add recommendation for securityContext and podSecurityContext (#125)
Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
co-authored by
Marco Franssen
parent
50c4ac35b0
commit
6997d6a904
@@ -21,13 +21,13 @@ spec:
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "tornjak-frontend.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ include "tornjak-frontend.fullname" . }}
|
||||
image: {{ template "spire-lib.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.image "global" .Values.global "ubi" true) }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
{{- include "spire-lib.securitycontext" . | nindent 12 }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
|
||||
@@ -9,13 +9,13 @@ metadata:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 4 }}
|
||||
{{- include "spire-lib.podsecuritycontext" . | nindent 4 }}
|
||||
containers:
|
||||
- name: curl-tornjak-frontend
|
||||
image: {{ template "spire-lib.image" (dict "image" .Values.tests.bash.image "global" .Values.global) }}
|
||||
command: ['curl']
|
||||
args: ['-k', '-s', '-f', 'http://{{ include "tornjak-frontend.fullname" . }}.{{ include "tornjak-frontend.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.service.port }}/tornjak/serverinfo']
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 8 }}
|
||||
{{- include "spire-lib.securitycontext" . | nindent 8 }}
|
||||
restartPolicy: Never
|
||||
|
||||
|
||||
Reference in New Issue
Block a user