blob: 9e26cc3d14b017f36c024b0811f57239cab870b8 [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
kwasield74d38f2020-07-23 10:09:57 +000018apiVersion: apps/v1
kj41ef22e2018-04-02 13:34:07 +030019kind: Deployment
Andreas Geissler718fb742023-03-09 09:44:02 +010020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
kj41ef22e2018-04-02 13:34:07 +030021spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010022 selector: {{- include "common.selectors" . | nindent 4 }}
kj41ef22e2018-04-02 13:34:07 +030023 replicas: {{ .Values.replicaCount }}
kj41ef22e2018-04-02 13:34:07 +030024 template:
Andreas Geissler718fb742023-03-09 09:44:02 +010025 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
kj41ef22e2018-04-02 13:34:07 +030026 spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010027 containers:
28 - env:
29 - name: MSB_PROTO
30 value: "http"
31 - name: MSB_ADDR
32 value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
33 - name: MSB_PORT
34 value: "{{ .Values.config.msbPort }}"
35 - name: AAI_ADDR
36 value: "aai.{{ include "common.namespace" . }}"
37 - name: AAI_PORT
38 value: "{{ .Values.config.aai.aaiPort }}"
39 - name: AAI_SCHEMA_VERSION
40 value: "{{ .Values.config.aai.schemaVersion }}"
41 - name: AAI_USERNAME
42 value: "{{ .Values.config.aai.username }}"
43 - name: AAI_PASSWORD
44 value: "{{ .Values.config.aai.password }}"
45 name: {{ include "common.name" . }}
46 volumeMounts:
47 - mountPath: "{{ .Values.log.path }}"
48 name: vio-log
49 - mountPath: /opt/vio/vio/pub/config/log.yml
50 name: vio-logconfig
51 subPath: log.yml
52 resources: {{ include "common.resources" . | nindent 10 }}
53 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 ports: {{ include "common.containerPorts" . | nindent 10 }}
56 # disable liveness probe when breakpoints set in debugger
57 # so K8s doesn't restart unresponsive container
58 {{- if eq .Values.liveness.enabled true }}
59 livenessProbe:
60 httpGet:
61 path: /api/multicloud-vio/v0/swagger.json
62 port: {{ .Values.service.internalPort }}
63 scheme: HTTP
64 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
65 periodSeconds: {{ .Values.liveness.periodSeconds }}
66 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
67 successThreshold: {{ .Values.liveness.successThreshold }}
68 failureThreshold: {{ .Values.liveness.failureThreshold }}
69 {{ end -}}
70 # side car containers
71 {{ include "common.log.sidecar" . | nindent 6 }}
72 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
73 volumes:
74 - name: vio-log
75 emptyDir: {}
76 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
77 - name: vio-logconfig
78 configMap:
79 name: {{ include "common.fullname" . }}-log-configmap
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +010080 {{- include "common.imagePullSecrets" . | nindent 6 }}
Andreas Geissler718fb742023-03-09 09:44:02 +010081 restartPolicy: Always