Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions templates/core/core-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ spec:
{{ toYaml .Values.core.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.core.serviceAccountName }}
serviceAccountName: {{ .Values.core.serviceAccountName }}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions templates/core/core-pre-upgrade-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ spec:
component: migrator
spec:
restartPolicy: Never
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.core.serviceAccountName }}
serviceAccountName: {{ .Values.core.serviceAccountName }}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions templates/exporter/exporter-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ spec:
{{ toYaml .Values.exporter.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.exporter.serviceAccountName }}
serviceAccountName: {{ .Values.exporter.serviceAccountName }}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions templates/jobservice/jobservice-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ spec:
{{ toYaml .Values.jobservice.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.jobservice.serviceAccountName }}
serviceAccountName: {{ .Values.jobservice.serviceAccountName }}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions templates/nginx/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ spec:
{{- if .Values.nginx.serviceAccountName }}
serviceAccountName: {{ .Values.nginx.serviceAccountName }}
{{- end }}
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 3 additions & 3 deletions templates/portal/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ spec:
{{ toYaml .Values.portal.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 3 additions & 4 deletions templates/registry/registry-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ spec:
{{ toYaml .Values.registry.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
runAsUser: 10000
fsGroup: 10000
fsGroupChangePolicy: OnRootMismatch
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.registry.serviceAccountName }}
serviceAccountName: {{ .Values.registry.serviceAccountName }}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions templates/trivy/trivy-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ spec:
{{- if .Values.trivy.serviceAccountName }}
serviceAccountName: {{ .Values.trivy.serviceAccountName }}
{{- end }}
securityContext:
runAsUser: 10000
fsGroup: 10000
{{- if not (empty .Values.securityContext) }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }}
{{- with .Values.trivy.topologySpreadConstraints}}
topologySpreadConstraints:
Expand Down
9 changes: 8 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,15 @@ cache:
# default keep cache for one day.
expireHours: 24

## set Security Context to comply with PSP restricted policy if necessary
## securityContext:{} is initially an empty yaml that you could edit it on demand, we just filled with a common template for convenience
securityContext:
runAsUser: 10000
fsGroup: 10000
fsGroupChangePolicy: OnRootMismatch

## set Container Security Context to comply with PSP restricted policy if necessary
## each of the conatiner will apply the same security context
## each of the container will apply the same security context
## containerSecurityContext:{} is initially an empty yaml that you could edit it on demand, we just filled with a common template for convenience
containerSecurityContext:
privileged: false
Expand Down