Commit c6e059da authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

added init container to change volume mount owner

parent af47d7fb
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -39,6 +39,21 @@ spec:
      securityContext:
        fsGroup: {{ .Values.securityContext.fsGroup }}
        runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if eq .Values.storage "filesystem" }}
      initContainers:
        - name: "chown"
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
          command:
          - /bin/sh
          - -c
          - chown -R 1000:1000 /var/lib/registry/
          securityContext:
            runAsUser: 0
          volumeMounts:
            - name: data
              mountPath: /var/lib/registry/
{{- end }}
      containers:
        - name: {{ .Chart.Name }}
+0 −2
Original line number Diff line number Diff line
@@ -111,8 +111,6 @@ configData:
  storage:
    cache:
      blobdescriptor: inmemory
    filesystem:
      rootdirectory: /var/lib/registry
  http:
    addr: :5000
    headers: