vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 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 |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 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. |
| 14 | |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 25 | spec: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 26 | replicas: {{ .Values.replicaCount }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 27 | selector: |
| 28 | matchLabels: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 29 | app: {{ include "common.name" . }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 30 | template: |
| 31 | metadata: |
| 32 | labels: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 33 | app: {{ include "common.name" . }} |
| 34 | release: {{ .Release.Name }} |
| 35 | name: {{ include "common.name" . }} |
AdrianSlavkovsky | 03cc589 | 2018-03-08 09:55:53 +0100 | [diff] [blame] | 36 | annotations: |
| 37 | msb.onap.org/service-info: '[ |
| 38 | { |
| 39 | "serviceName": "_aai-generic-query", |
| 40 | "version": "v11", |
| 41 | "url": "/aai/v11/search/generic-query", |
| 42 | "protocol": "REST", |
| 43 | "port": "8446", |
| 44 | "enable_ssl": true, |
| 45 | "lb_policy":"ip_hash", |
| 46 | "visualRange": "1", |
| 47 | "path": "/aai/v11/search/generic-query" |
| 48 | }, |
| 49 | { |
| 50 | "serviceName": "_aai-generic-query", |
| 51 | "version": "v12", |
| 52 | "url": "/aai/v12/search/generic-query", |
| 53 | "protocol": "REST", |
| 54 | "port": "8446", |
| 55 | "enable_ssl": true, |
| 56 | "lb_policy":"ip_hash", |
| 57 | "visualRange": "1", |
| 58 | "path": "/aai/v12/search/generic-query" |
| 59 | }, |
| 60 | { |
| 61 | "serviceName": "_aai-generic-query", |
| 62 | "version": "v13", |
| 63 | "url": "/aai/v13/search/generic-query", |
| 64 | "protocol": "REST", |
| 65 | "port": "8446", |
| 66 | "enable_ssl": true, |
| 67 | "lb_policy":"ip_hash", |
| 68 | "visualRange": "1", |
| 69 | "path": "/aai/v13/search/generic-query" |
| 70 | }, |
| 71 | { |
| 72 | "serviceName": "_aai-nodes-query", |
| 73 | "version": "v11", |
| 74 | "url": "/aai/v11/search/nodes-query", |
| 75 | "protocol": "REST", |
| 76 | "port": "8446", |
| 77 | "enable_ssl": true, |
| 78 | "lb_policy":"ip_hash", |
| 79 | "visualRange": "1", |
| 80 | "path": "/aai/v11/search/nodes-query" |
| 81 | }, |
| 82 | { |
| 83 | "serviceName": "_aai-nodes-query", |
| 84 | "version": "v12", |
| 85 | "url": "/aai/v12/search/nodes-query", |
| 86 | "protocol": "REST", |
| 87 | "port": "8446", |
| 88 | "enable_ssl": true, |
| 89 | "lb_policy":"ip_hash", |
| 90 | "visualRange": "1", |
| 91 | "path": "/aai/v12/search/nodes-query" |
| 92 | }, |
| 93 | { |
| 94 | "serviceName": "_aai-nodes-query", |
| 95 | "version": "v13", |
| 96 | "url": "/aai/v13/search/nodes-query", |
| 97 | "protocol": "REST", |
| 98 | "port": "8446", |
| 99 | "enable_ssl": true, |
| 100 | "lb_policy":"ip_hash", |
| 101 | "visualRange": "1", |
| 102 | "path": "/aai/v13/search/nodes-query" |
| 103 | }, |
| 104 | { |
| 105 | "serviceName": "_aai-query", |
| 106 | "version": "v11", |
| 107 | "url": "/aai/v11/query", |
| 108 | "protocol": "REST", |
| 109 | "port": "8446", |
| 110 | "enable_ssl": true, |
| 111 | "lb_policy":"ip_hash", |
| 112 | "visualRange": "1", |
| 113 | "path": "/aai/v11/query" |
| 114 | }, |
| 115 | { |
| 116 | "serviceName": "_aai-query", |
| 117 | "version": "v12", |
| 118 | "url": "/aai/v12/query", |
| 119 | "protocol": "REST", |
| 120 | "port": "8446", |
| 121 | "enable_ssl": true, |
| 122 | "lb_policy":"ip_hash", |
| 123 | "visualRange": "1", |
| 124 | "path": "/aai/v12/query" |
| 125 | }, |
| 126 | { |
| 127 | "serviceName": "_aai-query", |
| 128 | "version": "v13", |
| 129 | "url": "/aai/v13/query", |
| 130 | "protocol": "REST", |
| 131 | "port": "8446", |
| 132 | "enable_ssl": true, |
| 133 | "lb_policy":"ip_hash", |
| 134 | "visualRange": "1", |
| 135 | "path": "/aai/v13/query" |
| 136 | }, |
| 137 | { |
| 138 | "serviceName": "_aai-named-query", |
| 139 | "url": "/aai/search", |
| 140 | "protocol": "REST", |
| 141 | "port": "8446", |
| 142 | "enable_ssl": true, |
| 143 | "lb_policy":"ip_hash", |
| 144 | "visualRange": "1", |
| 145 | "path": "/aai/search" |
| 146 | }, |
| 147 | { |
| 148 | "serviceName": "aai-generic-query", |
| 149 | "version": "v11", |
| 150 | "url": "/aai/v11/search/generic-query", |
| 151 | "protocol": "REST", |
| 152 | "port": "8446", |
| 153 | "enable_ssl": true, |
| 154 | "lb_policy":"ip_hash", |
| 155 | "visualRange": "1" |
| 156 | }, |
| 157 | { |
| 158 | "serviceName": "aai-generic-query", |
| 159 | "version": "v12", |
| 160 | "url": "/aai/v12/search/generic-query", |
| 161 | "protocol": "REST", |
| 162 | "port": "8446", |
| 163 | "enable_ssl": true, |
| 164 | "lb_policy":"ip_hash", |
| 165 | "visualRange": "1" |
| 166 | }, |
| 167 | { |
| 168 | "serviceName": "aai-generic-query", |
| 169 | "version": "v13", |
| 170 | "url": "/aai/v13/search/generic-query", |
| 171 | "protocol": "REST", |
| 172 | "port": "8446", |
| 173 | "enable_ssl": true, |
| 174 | "lb_policy":"ip_hash", |
| 175 | "visualRange": "1" |
| 176 | }, |
| 177 | { |
| 178 | "serviceName": "aai-nodes-query", |
| 179 | "version": "v11", |
| 180 | "url": "/aai/v11/search/nodes-query", |
| 181 | "protocol": "REST", |
| 182 | "port": "8446", |
| 183 | "enable_ssl": true, |
| 184 | "lb_policy":"ip_hash", |
| 185 | "visualRange": "1" |
| 186 | }, |
| 187 | { |
| 188 | "serviceName": "aai-nodes-query", |
| 189 | "version": "v12", |
| 190 | "url": "/aai/v12/search/nodes-query", |
| 191 | "protocol": "REST", |
| 192 | "port": "8446", |
| 193 | "enable_ssl": true, |
| 194 | "lb_policy":"ip_hash", |
| 195 | "visualRange": "1" |
| 196 | }, |
| 197 | { |
| 198 | "serviceName": "aai-nodes-query", |
| 199 | "version": "v13", |
| 200 | "url": "/aai/v13/search/nodes-query", |
| 201 | "protocol": "REST", |
| 202 | "port": "8446", |
| 203 | "enable_ssl": true, |
| 204 | "lb_policy":"ip_hash", |
| 205 | "visualRange": "1" |
| 206 | }, |
| 207 | { |
| 208 | "serviceName": "aai-query", |
| 209 | "version": "v11", |
| 210 | "url": "/aai/v11/query", |
| 211 | "protocol": "REST", |
| 212 | "port": "8446", |
| 213 | "enable_ssl": true, |
| 214 | "lb_policy":"ip_hash", |
| 215 | "visualRange": "1" |
| 216 | }, |
| 217 | { |
| 218 | "serviceName": "aai-query", |
| 219 | "version": "v12", |
| 220 | "url": "/aai/v12/query", |
| 221 | "protocol": "REST", |
| 222 | "port": "8446", |
| 223 | "enable_ssl": true, |
| 224 | "lb_policy":"ip_hash", |
| 225 | "visualRange": "1" |
| 226 | }, |
| 227 | { |
| 228 | "serviceName": "aai-query", |
| 229 | "version": "v13", |
| 230 | "url": "/aai/v13/query", |
| 231 | "protocol": "REST", |
| 232 | "port": "8446", |
| 233 | "enable_ssl": true, |
| 234 | "lb_policy":"ip_hash", |
| 235 | "visualRange": "1" |
| 236 | }, |
| 237 | { |
| 238 | "serviceName": "aai-named-query", |
| 239 | "url": "/aai/search", |
| 240 | "protocol": "REST", |
| 241 | "port": "8446", |
| 242 | "enable_ssl": true, |
| 243 | "lb_policy":"ip_hash", |
| 244 | "visualRange": "1" |
| 245 | } |
| 246 | ]' |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 247 | spec: |
kiranya | 52a5783 | 2017-11-22 12:21:55 +0000 | [diff] [blame] | 248 | initContainers: |
| 249 | - command: |
| 250 | - /root/ready.py |
| 251 | args: |
| 252 | - --container-name |
kiranya | 52a5783 | 2017-11-22 12:21:55 +0000 | [diff] [blame] | 253 | - aai-resources |
| 254 | env: |
| 255 | - name: NAMESPACE |
| 256 | valueFrom: |
| 257 | fieldRef: |
| 258 | apiVersion: v1 |
| 259 | fieldPath: metadata.namespace |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 260 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 261 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 262 | name: {{ include "common.name" . }}-readiness |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 263 | containers: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 264 | - name: {{ include "common.name" . }} |
| 265 | image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" |
| 266 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 267 | env: |
| 268 | - name: CHEF_BRANCH |
| 269 | value: master |
| 270 | - name: AAI_CHEF_ENV |
| 271 | value: simpledemo |
| 272 | - name: AAI_CORE_VERSION |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 273 | value: {{ .Values.config.aaicoreversion }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 274 | - name: AAI_CHEF_LOC |
| 275 | value: /var/chef/aai-data/environments |
| 276 | - name: CHEF_GIT_URL |
| 277 | value: http://gerrit.onap.org/r/aai |
Mike Elliott | 95b8c4a | 2017-09-22 11:31:54 -0400 | [diff] [blame] | 278 | - name: RESOURCES_HOSTNAME |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 279 | value: aai-resources.{{ include "common.namespace" . }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 280 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 281 | - mountPath: /etc/localtime |
| 282 | name: localtime |
| 283 | readOnly: true |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 284 | - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb |
| 285 | subPath: solo.rb |
| 286 | name: aai-chef-config |
| 287 | - mountPath: /var/chef/aai-data/environments/ |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 288 | name: aai-data |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 289 | - mountPath: /var/log/onap |
| 290 | name: aai-traversal-logs |
| 291 | - mountPath: /opt/app/aai-traversal/bundleconfig/etc/logback.xml |
| 292 | name: aai-traversal-log-conf |
| 293 | subPath: logback.xml |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 294 | ports: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 295 | - containerPort: {{ .Values.service.internalPort }} |
| 296 | - containerPort: {{ .Values.service.internalPort2 }} |
| 297 | # disable liveness probe when breakpoints set in debugger |
| 298 | # so K8s doesn't restart unresponsive container |
| 299 | {{ if .Values.liveness.enabled }} |
| 300 | livenessProbe: |
| 301 | tcpSocket: |
| 302 | port: {{ .Values.service.internalPort }} |
| 303 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 304 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 305 | {{ end }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 306 | readinessProbe: |
| 307 | tcpSocket: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 308 | port: {{ .Values.service.internalPort }} |
| 309 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 310 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 311 | resources: |
| 312 | {{ toYaml .Values.resources | indent 10 }} |
| 313 | {{- if .Values.nodeSelector }} |
| 314 | nodeSelector: |
| 315 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 316 | {{- end -}} |
| 317 | {{- if .Values.affinity }} |
| 318 | affinity: |
| 319 | {{ toYaml .Values.affinity | indent 8 }} |
| 320 | {{- end }} |
| 321 | |
| 322 | # side car containers |
| 323 | - name: filebeat-onap |
| 324 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 325 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 326 | volumeMounts: |
| 327 | - mountPath: /usr/share/filebeat/filebeat.yml |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 328 | subPath: filebeat.yml |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 329 | name: filebeat-conf |
| 330 | - mountPath: /var/log/onap |
| 331 | name: aai-traversal-logs |
| 332 | - mountPath: /usr/share/filebeat/data |
| 333 | name: aai-traversal-filebeat |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 334 | |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 335 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 336 | - name: localtime |
| 337 | hostPath: |
| 338 | path: /etc/localtime |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 339 | - name: aai-chef-config |
| 340 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 341 | name: aai-chef-config |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 342 | - name: aai-data |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 343 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 344 | name: aai-resources-environments |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 345 | - name: filebeat-conf |
mayankg2703 | f313ba9 | 2018-02-05 09:01:02 +0000 | [diff] [blame] | 346 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 347 | name: aai-filebeat |
BorislavG | b2b9918 | 2017-10-03 15:40:55 +0300 | [diff] [blame] | 348 | - name: aai-traversal-logs |
| 349 | emptyDir: {} |
| 350 | - name: aai-traversal-filebeat |
| 351 | emptyDir: {} |
| 352 | - name: aai-traversal-log-conf |
| 353 | configMap: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 354 | name: {{ include "common.fullname" . }}-log |
| 355 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 356 | imagePullSecrets: |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame^] | 357 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |