Skip to content
Snippets Groups Projects
Commit a03eb6d7 authored by OZGCloud's avatar OZGCloud
Browse files

set pod securitycontext

parent 2ee332b9
Branches
Tags
No related merge requests found
......@@ -167,10 +167,8 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
schedulerName: default-scheduler
{{- if (.Values.securityContext).fsGroup }}
{{- with .Values.podSecurityContext }}
securityContext:
fsGroup: {{ (.Values.securityContext).fsGroup }}
{{- else }}
securityContext: {}
{{ toYaml . | indent 8 }}
{{- end }}
terminationGracePeriodSeconds: 30
\ No newline at end of file
......@@ -71,7 +71,7 @@ tests:
value: 1000
- it: check fsGroup
set:
securityContext.fsGroup: 1000
podSecurityContext.fsGroup: 1000
asserts:
- equal:
path: spec.template.spec.securityContext.fsGroup
......
......@@ -168,9 +168,7 @@ spec:
{{ else }}
- name: {{ .Release.Name }}-image-pull-secret
{{- end }}
{{- if (.Values.securityContext).fsGroup }}
{{- with .Values.podSecurityContext }}
securityContext:
fsGroup: {{ (.Values.securityContext).fsGroup }}
{{- else }}
securityContext: {}
{{- end }}
{{ toYaml . | indent 12 }}
{{- end }}
\ No newline at end of file
......@@ -133,7 +133,7 @@ tests:
workload: xta-adapter-cronjob
- it: check fsGroup
set:
securityContext.fsGroup: 1000
podSecurityContext.fsGroup: 1000
asserts:
- equal:
path: spec.jobTemplate.spec.template.spec.securityContext.fsGroup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment