Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 4 | # Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. |
Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 5 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
Jack Lucas | d12a1b6 | 2021-01-11 12:46:33 -0500 | [diff] [blame] | 6 | # Copyright (c) 2020-2021 J. F. Lucas. All rights reserved. |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 7 | # ================================================================================ |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | # you may not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | # See the License for the specific language governing permissions and |
| 18 | # limitations under the License. |
| 19 | # ============LICENSE_END========================================================= |
Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 20 | */}} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 21 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 22 | apiVersion: apps/v1 |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 23 | kind: Deployment |
| 24 | metadata: |
| 25 | name: {{ include "common.fullname" . }} |
| 26 | namespace: {{ include "common.namespace" . }} |
| 27 | labels: |
| 28 | app: {{ include "common.name" . }} |
| 29 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 30 | release: {{ include "common.release" . }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 31 | heritage: {{ .Release.Service }} |
| 32 | spec: |
| 33 | replicas: 1 |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 34 | selector: |
| 35 | matchLabels: |
| 36 | app: {{ include "common.name" . }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 37 | template: |
| 38 | metadata: |
| 39 | labels: |
| 40 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 41 | release: {{ include "common.release" . }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 42 | spec: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 43 | # host alias allows local 'cfy' command to use https and match |
| 44 | # the host name in the certificate |
| 45 | hostAliases: |
| 46 | - ip: "127.0.0.1" |
| 47 | hostnames: |
| 48 | - "dcae-cloudify-manager" |
Jack Lucas | d12a1b6 | 2021-01-11 12:46:33 -0500 | [diff] [blame] | 49 | # Cloudify requires a fixed hostname across restarts |
| 50 | hostname: dcae-cloudify-manager |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 51 | initContainers: |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 52 | - name: {{ include "common.name" . }}-readiness |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 53 | image: {{ include "repositoryGenerator.image.readiness" . }} |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 54 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 55 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 56 | - /app/ready.py |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 57 | args: |
| 58 | - --container-name |
| 59 | - aaf-cm |
Jack Lucas | d12a1b6 | 2021-01-11 12:46:33 -0500 | [diff] [blame] | 60 | - --container-name |
| 61 | - consul-server |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 62 | - "-t" |
| 63 | - "15" |
| 64 | env: |
| 65 | - name: NAMESPACE |
| 66 | valueFrom: |
| 67 | fieldRef: |
| 68 | apiVersion: v1 |
| 69 | fieldPath: metadata.namespace |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 70 | - name: {{ include "common.name" . }}-multisite-init |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 71 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.multisiteInitImage }} |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 72 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 73 | args: |
| 74 | - --namespace |
| 75 | - {{ include "common.namespace" . }} |
| 76 | - --configmap |
| 77 | - {{ .Values.multisiteConfigMapName }} |
Jack Lucas | d12a1b6 | 2021-01-11 12:46:33 -0500 | [diff] [blame] | 78 | - name: init-consul |
| 79 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }} |
| 80 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 81 | args: |
| 82 | - --key |
| 83 | - k8s-plugin|/plugin-configs/k8s-plugin.json |
| 84 | - --key |
| 85 | - dmaap-plugin|/plugin-configs/dmaap-plugin.json |
| 86 | resources: {} |
| 87 | volumeMounts: |
| 88 | - mountPath: /plugin-configs |
| 89 | name: plugin-configs |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 90 | - name: init-tls |
| 91 | env: |
| 92 | - name: POD_IP |
| 93 | valueFrom: |
| 94 | fieldRef: |
| 95 | apiVersion: v1 |
| 96 | fieldPath: status.podIP |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 97 | - name: aaf_locator_fqdn |
| 98 | value: dcae |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 99 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 100 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 101 | resources: {} |
| 102 | volumeMounts: |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 103 | - mountPath: /opt/app/osaaf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 104 | name: tls-info |
Sylvain Desbureaux | cfb7ff9 | 2020-05-06 17:40:20 +0200 | [diff] [blame] | 105 | {{- if .Values.persistence.enabled }} |
| 106 | - name: remove-lost-found |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 107 | image: {{ include "repositoryGenerator.image.busybox" . }} |
Sylvain Desbureaux | cfb7ff9 | 2020-05-06 17:40:20 +0200 | [diff] [blame] | 108 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 109 | volumeMounts: |
| 110 | - mountPath: /cfy-persist |
| 111 | name: cm-persistent |
| 112 | command: |
| 113 | - /bin/sh |
| 114 | args: |
| 115 | - -c |
| 116 | - "rm -rf '/cfy-persist/lost+found';" |
| 117 | {{- end }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 118 | containers: |
| 119 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 120 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 121 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 122 | env: |
| 123 | - name: REQUESTS_CA_BUNDLE |
| 124 | value: "/opt/onap/certs/cacert.pem" |
vaibhav_16dec | db582fa | 2018-09-20 12:32:47 +0000 | [diff] [blame] | 125 | resources: |
| 126 | {{ include "common.resources" . | indent 12 }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 127 | ports: |
| 128 | - containerPort: {{ .Values.service.internalPort }} |
| 129 | # disable liveness probe when breakpoints set in debugger |
| 130 | # so K8s doesn't restart unresponsive container |
| 131 | {{- if eq .Values.liveness.enabled true }} |
| 132 | livenessProbe: |
| 133 | tcpSocket: |
| 134 | port: {{ .Values.service.internalPort }} |
| 135 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 136 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Jack Lucas | 089cd9d | 2020-09-30 12:24:20 -0400 | [diff] [blame] | 137 | timeoutSeconds: {{ .Values.liveness.timeoutSeconds }} |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 138 | {{ end }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 139 | readinessProbe: |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 140 | exec: |
| 141 | command: |
| 142 | - /scripts/readiness-check.sh |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 143 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 144 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Jack Lucas | 089cd9d | 2020-09-30 12:24:20 -0400 | [diff] [blame] | 145 | timeoutSeconds: {{ .Values.readiness.timeoutSeconds }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 146 | volumeMounts: |
| 147 | - mountPath: /opt/onap/config.txt |
| 148 | subPath: config.txt |
| 149 | name: {{ include "common.fullname" .}}-config |
| 150 | readOnly: true |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 151 | - mountPath: /opt/onap/kube |
| 152 | name: {{ include "common.fullname" .}}-kubeconfig |
| 153 | readOnly: true |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 154 | - mountPath: /secret |
| 155 | name: dcae-token |
| 156 | readOnly: true |
| 157 | - mountPath: /sys/fs/cgroup |
| 158 | name: {{ include "common.fullname" . }}-cgroup |
| 159 | readOnly: true |
| 160 | - mountPath: /etc/localtime |
| 161 | name: localtime |
| 162 | readOnly: true |
Jack Lucas | cec10b4 | 2018-12-04 15:10:28 -0500 | [diff] [blame] | 163 | - mountPath: /cfy-persist |
| 164 | name: cm-persistent |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 165 | - mountPath: /opt/onap/certs |
| 166 | name: tls-info |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 167 | - mountPath: /opt/onap/cm-secrets |
| 168 | name: cm-secrets |
| 169 | readOnly: true |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 170 | securityContext: |
| 171 | privileged: True |
farida azmy | 3748180 | 2021-04-11 15:41:32 +0200 | [diff] [blame] | 172 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "create" "dot" . )}} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 173 | volumes: |
| 174 | - name: {{ include "common.fullname" . }}-config |
| 175 | configMap: |
| 176 | name: {{ include "common.fullname" . }}-configmap |
Jack Lucas | ecc9f60 | 2019-03-19 11:38:42 -0400 | [diff] [blame] | 177 | - name: {{ include "common.fullname" .}}-kubeconfig |
| 178 | configMap: |
| 179 | name: {{ .Values.multisiteConfigMapName }} |
Jack Lucas | d12a1b6 | 2021-01-11 12:46:33 -0500 | [diff] [blame] | 180 | - name: plugin-configs |
| 181 | configMap: |
| 182 | name: {{ include "common.fullname" . }}-plugins |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 183 | - name: dcae-token |
| 184 | secret: |
| 185 | secretName: dcae-token |
| 186 | - name: {{ include "common.fullname" . }}-cgroup |
| 187 | hostPath: |
| 188 | path: /sys/fs/cgroup |
| 189 | - name: localtime |
| 190 | hostPath: |
| 191 | path: /etc/localtime |
Jack Lucas | cec10b4 | 2018-12-04 15:10:28 -0500 | [diff] [blame] | 192 | - name: cm-persistent |
Sylvain Desbureaux | 03c36f9 | 2019-11-29 15:22:29 +0100 | [diff] [blame] | 193 | {{- if .Values.persistence.enabled }} |
Jack Lucas | cec10b4 | 2018-12-04 15:10:28 -0500 | [diff] [blame] | 194 | persistentVolumeClaim: |
| 195 | claimName: {{ include "common.fullname" . }}-data |
Sylvain Desbureaux | 03c36f9 | 2019-11-29 15:22:29 +0100 | [diff] [blame] | 196 | {{- else }} |
| 197 | emptyDir: {} |
| 198 | {{- end }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 199 | - emptyDir: {} |
| 200 | name: tls-info |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 201 | - name: cm-secrets |
| 202 | secret: |
| 203 | secretName: {{ include "common.secret.getSecretNameFast" (dict "global" . "uid" "cm-pass") }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 204 | imagePullSecrets: |
| 205 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |