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