[stable/docker-registry] Add securitycontext to satisfy podsecuritypolicy (#7645)

* Add securitycontext to satisfy podsecuritypolicy

Signed-off-by: Bart Verwilst <bart@verwilst.be>

* Fix whitespace

Signed-off-by: Bart Verwilst <bart@verwilst.be>
This commit is contained in:
Bort Verwilst
2018-09-11 12:43:53 -07:00
committed by k8s-ci-robot
parent 4345edd2b0
commit fbbc3e3446
4 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.5.2
version: 1.5.3
appVersion: 2.6.2
home: https://hub.docker.com/_/registry/
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
+1 -1
View File
@@ -1,7 +1,7 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http://{{ . }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "docker-registry.fullname" . }})
@@ -31,6 +31,11 @@ spec:
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
+5
View File
@@ -103,6 +103,11 @@ configData:
interval: 10s
threshold: 3
securityContext:
enabled: true
runAsUser: 1000
fsGroup: 1000
priorityClassName: ""
nodeSelector: {}