blob: ba249be6c921986fba162dbd081f1449e517f782 [file] [log] [blame]
kj41ef22e2018-04-02 13:34:07 +03001{{/*
2# Copyright © 2017 Amdocs, Bell Canada
Nishukumar376ba1e2018-08-03 09:17:23 +00003# Modifications Copyright © 2018 AT&T
kj41ef22e2018-04-02 13:34:07 +03004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16*/}}
17
18apiVersion: extensions/v1beta1
19kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ .Release.Name }}
27 heritage: {{ .Release.Service }}
28spec:
29 replicas: {{ .Values.replicaCount }}
30 selector:
31 matchLabels:
32 app: {{ include "common.name" . }}
33 template:
34 metadata:
35 labels:
36 app: {{ include "common.name" . }}
37 release: {{ .Release.Name }}
38 name: {{ include "common.name" . }}
Huabing Zhao89577802018-07-30 09:41:17 +000039 annotations:
40 sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
kj41ef22e2018-04-02 13:34:07 +030041 spec:
42 containers:
43 - env:
44 - name: MSB_ADDR
45 value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
46 - name: MSB_PORT
47 value: "{{ .Values.config.msbPort }}"
48 - name: AAI_ADDR
49 value: aai.{{ include "common.namespace" . }}
50 - name: AAI_PORT
51 value: "{{ .Values.config.aai.port }}"
52 - name: AAI_SCHEMA_VERSION
53 value: "{{ .Values.config.aai.schemaVersion }}"
54 - name: AAI_USERNAME
55 value: "{{ .Values.config.aai.username }}"
56 - name: AAI_PASSWORD
57 value: "{{ .Values.config.aai.password }}"
58 name: {{ include "common.name" . }}
59 volumeMounts:
60 - mountPath: /var/log/onap
61 name: ocata-log
62 - mountPath: /opt/ocata/ocata/pub/config/log.yml
63 name: ocata-logconfig
64 subPath: log.yml
BorislavGdf11cd52018-05-06 12:55:20 +000065 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj41ef22e2018-04-02 13:34:07 +030066 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
67 ports:
68 - containerPort: {{ .Values.service.internalPort }}
69 # disable liveness probe when breakpoints set in debugger
70 # so K8s doesn't restart unresponsive container
71 {{ if .Values.liveness.enabled }}
72 livenessProbe:
73 httpGet:
74 path: /api/multicloud-ocata/v0/swagger.json
75 port: {{ .Values.service.internalPort }}
76 scheme: HTTP
77 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.liveness.periodSeconds }}
79 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
80 successThreshold: {{ .Values.liveness.successThreshold }}
81 failureThreshold: {{ .Values.liveness.failureThreshold }}
82 {{ end }}
83 resources:
84{{ toYaml .Values.resources | indent 12 }}
85 {{- if .Values.nodeSelector }}
86 nodeSelector:
87{{ toYaml .Values.nodeSelector | indent 10 }}
88 {{- end -}}
89 {{- if .Values.affinity }}
90 affinity:
91{{ toYaml .Values.affinity | indent 10 }}
92 {{- end }}
93
94 # side car containers
95 - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
97 name: filebeat-onap
98 volumeMounts:
99 - mountPath: /usr/share/filebeat/filebeat.yml
100 name: filebeat-conf
101 subPath: filebeat.yml
102 - mountPath: /var/log/onap
103 name: ocata-log
104 - mountPath: /usr/share/filebeat/data
105 name: ocata-data-filebeat
106
107 volumes:
108 - name: ocata-log
109 emptyDir: {}
110 - name: ocata-data-filebeat
111 emptyDir: {}
112 - name: filebeat-conf
113 configMap:
114 name: multicloud-filebeat-configmap
115 - name: ocata-logconfig
116 configMap:
117 name: {{ include "common.fullname" . }}-log-configmap
118 imagePullSecrets:
119 - name: "{{ include "common.namespace" . }}-docker-registry-key"
120 restartPolicy: Always