X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=kubernetes%2Fsdc%2Fcharts%2Fsdc-cs%2Ftemplates%2Fdeployment.yaml;h=c16fdb750ac6e56a212de5b65a349623197645f7;hb=1af5fbeb9f212a544a3230f0ad1a7a7bfd990338;hp=10fabae288f73222a4a4cfef097ebf891d9bd22f;hpb=7352f439cf3ca9ecc2995995fe53d05c103e5fde;p=oom.git diff --git a/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml index 10fabae288..c16fdb750a 100644 --- a/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml +++ b/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml @@ -1,3 +1,18 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada +# Modifications Copyright © 2018 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: @@ -18,35 +33,40 @@ spec: spec: 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 }} + exec: + command: + - "/var/lib/ready-probe.sh" initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} env: - name: ENVNAME value: {{ .Values.global.env.name }} + - name: RELEASE + value: {{ .Values.config.release }} + - name: MAX_HEAP_SIZE + value: {{ .Values.config.maxHeapSize }} + - name: HEAP_NEWSIZE + value: {{ .Values.config.heapNewSize }} - name: HOST_IP valueFrom: fieldRef: fieldPath: status.podIP - name: CS_PASSWORD valueFrom: - secretKeyRef: {name: {{ include "common.fullname" . }}, key: cs_password} + secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: cs_password} volumeMounts: - name: {{ include "common.fullname" . }}-data mountPath: /var/lib/cassandra/ @@ -55,8 +75,6 @@ spec: - name: {{ include "common.fullname" . }}-localtime mountPath: /etc/localtime readOnly: true - - name: {{ include "common.fullname" . }}-logs - mountPath: /var/lib/jetty/logs resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} @@ -68,21 +86,19 @@ spec: {{ toYaml .Values.affinity | indent 10 }} {{- end }} volumes: - - name: {{ include "common.fullname" . }}-localtime - hostPath: - path: /etc/localtime - - name: {{ include "common.fullname" . }}-logs - emptyDir: {} + - name: {{ include "common.fullname" . }}-localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-data {{- if .Values.persistence.enabled }} - - name: {{ include "common.fullname" . }}-data - persistentVolumeClaim: - claimName: {{ include "common.fullname" . }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} {{- else }} - emptyDir: {} + emptyDir: {} {{- end }} - - name: {{ include "common.fullname" . }}-environments - configMap: - name: {{ .Release.Name }}-sdc-environments-configmap - defaultMode: 0755 + - name: {{ include "common.fullname" . }}-environments + configMap: + name: {{ .Release.Name }}-sdc-environments-configmap + defaultMode: 0755 imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" \ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key"