X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdc%2Fcharts%2Fsdc-fe%2Ftemplates%2Fdeployment.yaml;h=46ba241b9c4b23849e992ee1e98c8718ea794db6;hb=a3589e313c7205754aecdc8e8430cb5459f20ef1;hp=818a279773adb092122448b00702b2198199dbcc;hpb=a1047f40ac83218e9b34bbfabcc3cd775687b693;p=oom.git diff --git a/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml index 818a279773..46ba241b9c 100644 --- a/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml +++ b/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml @@ -1,3 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 AT&T, ZTE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -22,7 +37,7 @@ spec: - /root/ready.py args: - --container-name - - "sdc-be" + - "sdc-kb" env: - name: NAMESPACE valueFrom: @@ -31,27 +46,41 @@ spec: fieldPath: metadata.namespace image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: {{ include "common.name" . }}-job-completion + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" + command: + - /root/job_complete.py + args: + - --job-name + - {{ .Release.Name }}-sdc-be-config-backend + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace 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.internalPort2 }} - # disable liveness probe when breakpoints set in debugger - # so K8s doesn't restart unresponsive container - {{- if eq .Values.liveness.enabled true }} + {{ if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: port: {{ .Values.service.internalPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} - {{ end -}} + {{ end }} readinessProbe: tcpSocket: port: {{ .Values.service.internalPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ include "common.resources" . | indent 12 }} env: - name: ENVNAME value: {{ .Values.global.env.name }} @@ -60,7 +89,7 @@ spec: fieldRef: fieldPath: status.podIP - name: JAVA_OPTIONS - value: "" + value: {{ .Values.config.javaOptions }} volumeMounts: - name: {{ include "common.fullname" . }}-environments mountPath: /root/chef-solo/environments/ @@ -69,23 +98,16 @@ spec: readOnly: true - name: {{ include "common.fullname" . }}-logs mountPath: /var/log/onap + - name: {{ include "common.fullname" . }}-configs + mountPath: /var/lib/jetty/config/catalog-fe/plugins-configuration.yaml + subPath: plugins-configuration.yaml - name: {{ include "common.fullname" . }}-logback mountPath: /tmp/logback.xml + subPath: logback.xml lifecycle: postStart: exec: command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 10 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 10 }} - {{- end }} - # side car containers - name: {{ include "common.name" . }}-filebeat-onap image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" @@ -107,6 +129,10 @@ spec: name: {{ .Release.Name }}-sdc-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} + - name: {{ include "common.fullname" . }}-configs + configMap: + name : {{ include "common.fullname" . }}-plugins-configmap + defaultMode: 0777 - name: {{ include "common.fullname" . }}-logback configMap: name : {{ include "common.fullname" . }}-logging-configmap @@ -117,4 +143,4 @@ spec: - name: {{ include "common.fullname" . }}-logs emptyDir: {} imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" \ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key"