X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fpolicy%2Fcharts%2Fdrools%2Fcharts%2Fnexus%2Ftemplates%2Fdeployment.yaml;h=c59ed08f3fcaea1848580a2e4273cd94a433c381;hb=6c9dda84cd6021c486c1b850c00a9cd942046b8e;hp=c4cc253b7f46a6a4b000c67102b857aaf5911d34;hpb=99a74ebd1ea743c78178196bfe9ede6bf4b50f6e;p=oom.git diff --git a/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml b/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml index c4cc253b7f..c59ed08f3f 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml @@ -30,6 +30,14 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: ["sh", "-c", "chown -R 200:200 /share"] + image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.global.ubuntuInitImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-init + volumeMounts: + - mountPath: /share + name: nexus-data containers: - name: {{ include "common.name" . }} image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" @@ -53,6 +61,8 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true + - mountPath: /sonatype-work + name: nexus-data resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} @@ -67,5 +77,12 @@ spec: - name: localtime hostPath: path: /etc/localtime + - name: nexus-data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"