1 # Copyright © 2017 Amdocs, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: extensions/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 replicas: {{ .Values.replicaCount }}
29 app: {{ include "common.name" . }}
33 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 name: {{ include "common.name" . }}
38 - name: {{ include "common.name" . }}-inject-models
43 git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit
44 cp -rp /tmp/gerrit/data-router/appconfig/model/* /model-dir
45 image: "{{ .Values.global.repository | default .Values.dockerHubRepository }}/{{ .Values.ubuntuInitImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 mountPath: "/model-dir"
51 - name: {{ include "common.name" . }}
52 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 value: /opt/app/sparky/config/
57 - name: KEY_MANAGER_PASSWORD
58 value: {{ .Values.config.keyManagerPassword }}
59 - name: KEY_STORE_PASSWORD
60 value: {{ .Values.config.keyStorePassword }}
62 - mountPath: /etc/localtime
65 - mountPath: /opt/app/sparky/config/auth/
66 name: {{ include "common.fullname" . }}-auth-config
67 - mountPath: /opt/app/sparky/config/synchronizer.properties
68 subPath: synchronizer.properties
69 name: {{ include "common.fullname" . }}-config
70 - mountPath: /opt/app/sparky/config/suggestive-search.properties
71 subPath: suggestive-search.properties
72 name: {{ include "common.fullname" . }}-config
73 - mountPath: /opt/app/sparky/config/search-service.properties
74 subPath: search-service.properties
75 name: {{ include "common.fullname" . }}-config
76 - mountPath: /opt/app/sparky/config/roles.config
78 name: {{ include "common.fullname" . }}-config
79 - mountPath: /opt/app/sparky/config/elasticsearch.properties
80 subPath: elasticsearch.properties
81 name: {{ include "common.fullname" . }}-config
82 - mountPath: /opt/app/sparky/config/aai.properties
83 subPath: aai.properties
84 name: {{ include "common.fullname" . }}-config
85 - mountPath: /opt/app/sparky/config/portal/
86 name: {{ include "common.fullname" . }}-portal-config
87 - mountPath: /var/log/onap
88 name: {{ include "common.fullname" . }}-logs
89 - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml
90 name: {{ include "common.fullname" . }}-log-conf
93 mountPath: /opt/app/sparky/config/model
95 - containerPort: {{ .Values.service.internalPort }}
96 # disable liveness probe when breakpoints set in debugger
97 # so K8s doesn't restart unresponsive container
98 {{- if eq .Values.liveness.enabled true }}
101 port: {{ .Values.service.internalPort }}
102 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.liveness.periodSeconds }}
107 port: {{ .Values.service.internalPort }}
108 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
109 periodSeconds: {{ .Values.readiness.periodSeconds }}
111 {{ toYaml .Values.resources | indent 10 }}
112 {{- if .Values.nodeSelector }}
114 {{ toYaml .Values.nodeSelector | indent 8 }}
116 {{- if .Values.affinity }}
118 {{ toYaml .Values.affinity | indent 8 }}
121 # side car containers
122 - name: filebeat-onap
123 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
124 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
126 - mountPath: /usr/share/filebeat/filebeat.yml
127 subPath: filebeat.yml
129 - mountPath: /var/log/onap
130 name: {{ include "common.fullname" . }}-logs
131 - mountPath: /usr/share/filebeat/data
132 name: aai-sparky-filebeat
138 - name: {{ include "common.fullname" . }}-config
140 name: {{ include "common.fullname" . }}
141 - name: {{ include "common.fullname" . }}-portal-config
143 name: {{ include "common.fullname" . }}-portal
144 - name: {{ include "common.fullname" . }}-auth-config
146 secretName: {{ include "common.fullname" . }}
147 - name: filebeat-conf
150 - name: {{ include "common.fullname" . }}-logs
152 - name: aai-sparky-filebeat
154 - name: {{ include "common.fullname" . }}-log-conf
156 name: {{ include "common.fullname" . }}-log
159 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
161 - name: "{{ include "common.namespace" . }}-docker-registry-key"