Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 4 | # Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. |
marcinrzepeckiwroc | 9a05dd2 | 2020-08-11 11:24:13 +0200 | [diff] [blame] | 5 | # Modifications Copyright © 2020 Nokia |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 6 | # ================================================================================ |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # ============LICENSE_END========================================================= |
Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 19 | */}} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 20 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 21 | apiVersion: apps/v1 |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 22 | kind: Deployment |
| 23 | metadata: |
| 24 | name: {{ include "common.fullname" . }} |
| 25 | namespace: {{ include "common.namespace" . }} |
| 26 | labels: |
| 27 | app: {{ include "common.name" . }} |
| 28 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 29 | release: {{ include "common.release" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 30 | heritage: {{ .Release.Service }} |
| 31 | spec: |
| 32 | replicas: 1 |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 33 | selector: |
| 34 | matchLabels: |
| 35 | app: {{ include "common.name" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 36 | template: |
| 37 | metadata: |
| 38 | labels: |
| 39 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 40 | release: {{ include "common.release" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 41 | spec: |
| 42 | initContainers: |
| 43 | - name: {{ include "common.name" . }}-readiness |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 44 | image: {{ include "repositoryGenerator.image.readiness" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 45 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 46 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 47 | - /app/ready.py |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 48 | args: |
| 49 | - --container-name |
| 50 | - dcae-cloudify-manager |
| 51 | - --container-name |
| 52 | - consul-server |
| 53 | - --container-name |
| 54 | - dcae-inventory-api |
| 55 | - "-t" |
| 56 | - "45" |
| 57 | env: |
| 58 | - name: NAMESPACE |
| 59 | valueFrom: |
| 60 | fieldRef: |
| 61 | apiVersion: v1 |
| 62 | fieldPath: metadata.namespace |
| 63 | - name: init-tls |
| 64 | env: |
| 65 | - name: POD_IP |
| 66 | valueFrom: |
| 67 | fieldRef: |
| 68 | apiVersion: v1 |
| 69 | fieldPath: status.podIP |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 70 | - name: aaf_locator_fqdn |
| 71 | value: dcae |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 72 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 73 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 74 | resources: {} |
| 75 | volumeMounts: |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 76 | - mountPath: /opt/app/osaaf |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 77 | name: tls-info |
| 78 | - name: init-consul |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 79 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 80 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 81 | args: |
| 82 | - --service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 83 | - "cloudify_manager|dcae-cloudify-manager.{{ include "common.namespace" . }}|443" |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 84 | - --service |
| 85 | - "inventory|inventory.{{ include "common.namespace" . }}|8080" |
| 86 | - --key |
| 87 | - deployment_handler|/dhconfig/config.json |
| 88 | resources: {} |
| 89 | volumeMounts: |
| 90 | - mountPath: /dhconfig |
| 91 | name: dh-config |
| 92 | containers: |
| 93 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 94 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 95 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 96 | resources: |
| 97 | {{ include "common.resources" . | indent 12 }} |
| 98 | ports: |
| 99 | - containerPort: {{ .Values.service.internalPort }} |
| 100 | # disable liveness probe when breakpoints set in debugger |
| 101 | # so K8s doesn't restart unresponsive container |
| 102 | {{- if eq .Values.liveness.enabled true }} |
| 103 | livenessProbe: |
| 104 | tcpSocket: |
| 105 | port: {{ .Values.service.internalPort }} |
| 106 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 107 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 108 | {{ end }} |
| 109 | readinessProbe: |
| 110 | httpGet: |
| 111 | path: {{ .Values.readiness.path }} |
| 112 | port: {{ .Values.service.internalPort }} |
| 113 | scheme: {{ .Values.readiness.scheme }} |
| 114 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 115 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 116 | volumeMounts: |
| 117 | - mountPath: /opt/app/dh/log |
| 118 | name: component-log |
| 119 | - mountPath: /opt/app/dh/etc/cert/ |
| 120 | name: tls-info |
marcinrzepeckiwroc | 9a05dd2 | 2020-08-11 11:24:13 +0200 | [diff] [blame] | 121 | - mountPath: /opt/app/dh/etc/ |
| 122 | name: log4js-conf |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 123 | env: |
| 124 | - name: CONSUL_HOST |
| 125 | value: consul-server.{{ include "common.namespace" . }} |
| 126 | - name: CLOUDIFY_USER |
| 127 | value: admin |
| 128 | - name: CLOUDIFY_PASSWORD |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 129 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14 }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 130 | - name: CONFIG_BINDING_SERVICE |
| 131 | value: config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 132 | - name: NODE_EXTRA_CA_CERTS |
| 133 | value: /opt/app/dh/etc/cert/cacert.pem |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 134 | - name: POD_IP |
| 135 | valueFrom: |
| 136 | fieldRef: |
| 137 | apiVersion: v1 |
| 138 | fieldPath: status.podIP |
| 139 | - name: {{ include "common.name" . }}-filebeat |
| 140 | env: |
| 141 | - name: POD_IP |
| 142 | valueFrom: |
| 143 | fieldRef: |
| 144 | apiVersion: v1 |
| 145 | fieldPath: status.podIP |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 146 | image: {{ include "repositoryGenerator.image.logging" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 147 | imagePullPolicy: IfNotPresent |
| 148 | resources: {} |
| 149 | volumeMounts: |
| 150 | - mountPath: /var/log/onap/deployment-handler |
| 151 | name: component-log |
| 152 | - mountPath: /usr/share/filebeat/data |
| 153 | name: filebeat-data |
| 154 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 155 | name: filebeat-conf |
| 156 | subPath: filebeat.yml |
farida azmy | 3748180 | 2021-04-11 15:41:32 +0200 | [diff] [blame] | 157 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 158 | volumes: |
| 159 | - emptyDir: {} |
| 160 | name: component-log |
| 161 | - emptyDir: {} |
| 162 | name: filebeat-data |
| 163 | - configMap: |
| 164 | defaultMode: 420 |
| 165 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 166 | name: filebeat-conf |
| 167 | - emptyDir: {} |
| 168 | name: tls-info |
| 169 | - configMap: |
| 170 | defaultMode: 422 |
| 171 | name: {{ include "common.fullname" . }}-configmap |
| 172 | name: dh-config |
marcinrzepeckiwroc | 9a05dd2 | 2020-08-11 11:24:13 +0200 | [diff] [blame] | 173 | - configMap: |
| 174 | defaultMode: 420 |
| 175 | name: {{include "common.fullname" . }}-log4js-configmap |
| 176 | name: log4js-conf |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 177 | imagePullSecrets: |
| 178 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |