X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fmsb%2Fcharts%2Fmsb-discovery%2Ftemplates%2Fdeployment.yaml;h=d7b3caee4eeda452aa1d8663081cad780e64cbf0;hb=1a8c01a011e0aedfe6ef1f57811429a9133be0ef;hp=aec03b0b3fb74dd0ae8968085029bb4667e87ff3;hpb=1d0467ce4ce990ed2ae9cd333f969bb6c2d742c6;p=oom.git diff --git a/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml b/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml index aec03b0b3f..d7b3caee4e 100644 --- a/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml +++ b/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml @@ -1,4 +1,17 @@ -apiVersion: extensions/v1beta1 +# Copyright © 2018 Amdocs, Bell Canada , 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: apps/v1 kind: Deployment metadata: name: {{ include "common.fullname" . }} @@ -6,19 +19,25 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: + selector: + matchLabels: + app: {{ include "common.name" . }} replicas: {{ .Values.replicaCount }} template: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} + annotations: + sidecar.istio.io/inject: "{{.Values.istioSidecar}}" spec: + serviceAccountName: msb initContainers: - command: - - /root/ready.py + - /app/ready.py args: - --container-name - msb-consul @@ -28,7 +47,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-readiness containers: @@ -59,9 +78,9 @@ spec: name: localtime readOnly: true - mountPath: /usr/local/discover-works/logs - name: msb-discovery-logs + name: {{ include "common.fullname" . }}-logs resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -71,22 +90,34 @@ spec: {{ toYaml .Values.affinity | indent 10 }} {{- end }} - # side car containers - - name: filebeat-onap + # Filebeat sidecar container + - name: {{ include "common.name" . }}-filebeat-onap image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - - mountPath: /var/log/onap - name: msb-discovery-logs - - mountPath: /usr/share/filebeat/data - name: msb-discovery-filebeat + - name: {{ include "common.fullname" . }}-filebeat-conf + mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml + - name: {{ include "common.fullname" . }}-data-filebeat + mountPath: /usr/share/filebeat/data + - name: {{ include "common.fullname" . }}-logs + mountPath: /var/log/onap/msb/msb-discovery + - mountPath: /opt/ajsc/etc/config/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml volumes: + - name: {{ include "common.fullname" . }}-log-conf + configMap: + name: {{ include "common.fullname" . }}-log + - name: {{ include "common.fullname" . }}-filebeat-conf + configMap: + name: {{ include "common.release" . }}-msb-filebeat-configmap + - name: {{ include "common.fullname" . }}-data-filebeat + emptyDir: {} + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} - name: localtime hostPath: path: /etc/localtime - - name: msb-discovery-logs - emptyDir: {} - - name: msb-discovery-filebeat - emptyDir: {} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"