X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fpolicy%2Fcharts%2Fdrools%2Fcharts%2Fnexus%2Ftemplates%2Fdeployment.yaml;h=d04f8f8e512d2c5cbd02989ffe88d47ba76a2e7c;hb=4136f5d8e1bfe9b967266ff7f57787871748ddcc;hp=910ade9108ebdc2ca38719a4dbee0f820bea1ae0;hpb=c786a281b513f1cae7e6f8adbc1e0cb547aac75b;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 910ade9108..d04f8f8e51 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml @@ -1,4 +1,5 @@ # Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 AT&T # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,45 +32,40 @@ spec: release: {{ .Release.Name }} spec: initContainers: - - command: - - /root/ready.py - args: - - --container-name - - {{ .Values.global.mariadb.nameOverride }} - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + - 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" . }}-readiness + 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 }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.externalPort }} {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.externalPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: httpGet: path: {{ .Values.readiness.path }} - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.externalPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true + - mountPath: /sonatype-work + name: nexus-data resources: -{{ toYaml .Values.resources | indent 12 }} +{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -82,5 +78,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"