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