Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 4 | # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 5 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
| 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 | */}} |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 20 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 21 | apiVersion: apps/v1 |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [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 "+" "_" }} |
| 29 | release: {{ include "common.release" . }} |
| 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" . }} |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 36 | template: |
| 37 | metadata: |
| 38 | labels: |
| 39 | app: {{ include "common.name" . }} |
| 40 | release: {{ include "common.release" . }} |
| 41 | spec: |
| 42 | initContainers: |
| 43 | - command: |
| 44 | - sh |
| 45 | args: |
| 46 | - -c |
| 47 | - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done" |
| 48 | env: |
| 49 | - name: PG_ROOT_PASSWORD |
| 50 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-root-pass" "key" "password") | indent 10 }} |
| 51 | volumeMounts: |
| 52 | - mountPath: /config-input |
| 53 | name: {{ include "common.fullname" . }}-dcae-inputs-input |
| 54 | - mountPath: /config |
| 55 | name: {{ include "common.fullname" . }}-dcae-inputs |
| 56 | image: "{{ .Values.global.envsubstImage }}" |
| 57 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 58 | name: {{ include "common.name" . }}-update-config |
| 59 | |
| 60 | - name: {{ include "common.name" . }}-readiness |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 61 | image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }} |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 62 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 63 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 64 | - /app/ready.py |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 65 | args: |
| 66 | - --container-name |
| 67 | - dcae-cloudify-manager |
| 68 | - --container-name |
| 69 | - consul-server |
| 70 | - --container-name |
| 71 | - msb-discovery |
| 72 | - --container-name |
| 73 | - kube2msb |
| 74 | - --container-name |
| 75 | - dcae-config-binding-service |
| 76 | - --container-name |
| 77 | - dcae-db |
| 78 | - --container-name |
| 79 | - dcae-inventory-api |
| 80 | - "-t" |
| 81 | - "15" |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 82 | env: |
| 83 | - name: NAMESPACE |
| 84 | valueFrom: |
| 85 | fieldRef: |
| 86 | apiVersion: v1 |
| 87 | fieldPath: metadata.namespace |
| 88 | - name: init-tls |
| 89 | env: |
| 90 | - name: POD_IP |
| 91 | valueFrom: |
| 92 | fieldRef: |
| 93 | apiVersion: v1 |
| 94 | fieldPath: status.podIP |
| 95 | - name: aaf_locator_fqdn |
| 96 | value: dcae |
| 97 | image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }} |
| 98 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 99 | resources: {} |
| 100 | volumeMounts: |
| 101 | - mountPath: /opt/app/osaaf |
| 102 | name: tls-info |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 103 | - name: init-consul |
| 104 | image: {{ .Values.global.consulLoaderRepository }}/{{ .Values.global.consulLoaderImage }} |
| 105 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 106 | args: |
| 107 | - --service |
| 108 | - "config-binding-service|config-binding-service.{{ include "common.namespace" . }}|10000" |
| 109 | - --service |
| 110 | - "config_binding_service|config-binding-service.{{ include "common.namespace" . }}|10000" |
| 111 | resources: {} |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 112 | containers: |
| 113 | - name: {{ include "common.name" . }} |
| 114 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 115 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 116 | resources: |
| 117 | {{ include "common.resources" . | indent 12 }} |
| 118 | volumeMounts: |
| 119 | - mountPath: /inputs |
| 120 | name: {{ include "common.fullname" . }}-dcae-inputs |
| 121 | - mountPath: /dcae-configs |
| 122 | name: {{ include "common.fullname" . }}-dcae-config |
| 123 | - mountPath: /etc/localtime |
| 124 | name: localtime |
| 125 | readOnly: true |
| 126 | - mountPath: /certs |
| 127 | name: tls-info |
| 128 | readOnly: true |
| 129 | env: |
| 130 | - name: CMADDR |
| 131 | value: {{ .Values.config.address.cm.host }} |
| 132 | - name: CMPASS |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 133 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14}} |
Krzysztof Opasiak | 9cb8203 | 2020-05-05 12:04:31 +0200 | [diff] [blame] | 134 | - name: CMPROTO |
| 135 | value: {{ .Values.config.address.cm.proto }} |
| 136 | - name: CMPORT |
| 137 | value: !!string {{ .Values.config.address.cm.port }} |
| 138 | - name: CONSUL |
| 139 | value: {{ .Values.config.address.consul.host }}:{{ .Values.config.address.consul.port }} |
| 140 | - name: DCAE_NAMESPACE |
| 141 | value: {{ .Values.dcae_ns | default "" }} |
| 142 | - name: ONAP_NAMESPACE |
| 143 | value: {{ include "common.namespace" . }} |
| 144 | volumes: |
| 145 | - name: {{ include "common.fullname" . }}-dcae-inputs-input |
| 146 | configMap: |
| 147 | name: {{ include "common.fullname" . }}-dcae-inputs |
| 148 | - name: {{ include "common.fullname" . }}-dcae-inputs |
| 149 | emptyDir: |
| 150 | medium: Memory |
| 151 | - name: {{ include "common.fullname" . }}-dcae-config |
| 152 | configMap: |
| 153 | name: {{ include "common.fullname" . }}-dcae-config |
| 154 | - name: localtime |
| 155 | hostPath: |
| 156 | path: /etc/localtime |
| 157 | - name: tls-info |
| 158 | emptyDir: {} |
| 159 | imagePullSecrets: |
| 160 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |