Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
| 4 | # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. |
| 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 | */}} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 19 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 20 | apiVersion: apps/v1 |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [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" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [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" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [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" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [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" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [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 |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 47 | args: |
| 48 | - --container-name |
| 49 | - consul-server |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 50 | - --container-name |
| 51 | - aaf-cm |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 52 | - "-t" |
| 53 | - "15" |
| 54 | env: |
| 55 | - name: NAMESPACE |
| 56 | valueFrom: |
| 57 | fieldRef: |
| 58 | apiVersion: v1 |
| 59 | fieldPath: metadata.namespace |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 60 | - name: aaf_locator_fqdn |
| 61 | value: dcae |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 62 | {{- if .Values.service.secure.enabled }} |
| 63 | - name: init-tls |
| 64 | env: |
| 65 | - name: POD_IP |
| 66 | valueFrom: |
| 67 | fieldRef: |
| 68 | apiVersion: v1 |
| 69 | fieldPath: status.podIP |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 70 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 71 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 72 | resources: {} |
| 73 | volumeMounts: |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 74 | - mountPath: /opt/app/osaaf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 75 | name: tls-info |
| 76 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 77 | containers: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 78 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 79 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 80 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 81 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 82 | resources: |
| 83 | {{ include "common.resources" . | indent 12 }} |
| 84 | ports: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 85 | - containerPort: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 86 | # disable liveness probe when breakpoints set in debugger |
| 87 | # so K8s doesn't restart unresponsive container |
| 88 | {{- if eq .Values.liveness.enabled true }} |
| 89 | livenessProbe: |
| 90 | tcpSocket: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 91 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 92 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 93 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Jakub Latusek | 3c75b9e | 2020-09-25 15:39:57 +0200 | [diff] [blame] | 94 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 95 | readinessProbe: |
| 96 | httpGet: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 97 | scheme: "HTTPS" |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 98 | path: {{ .Values.readiness.path }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 99 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 100 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 101 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 102 | volumeMounts: |
| 103 | - name: {{ include "common.fullname" . }}-logs |
| 104 | mountPath: /opt/logs |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 105 | - name: tls-info |
| 106 | mountPath: /opt/tls |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 107 | env: |
| 108 | - name: CONSUL_HOST |
| 109 | value: consul.{{ include "common.namespace" . }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 110 | - name: USE_HTTPS |
| 111 | value: "1" |
| 112 | - name: HTTPS_CERT_PATH |
| 113 | value: "/opt/tls/cert.pem" |
| 114 | - name: HTTPS_KEY_PATH |
| 115 | value: "/opt/tls/key.pem" |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 116 | - name: {{ include "common.name" . }}-fb-onap |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 117 | image: {{ include "repositoryGenerator.image.logging" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 118 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 119 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 120 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 121 | mountPath: /usr/share/filebeat/filebeat.yml |
| 122 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 123 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 124 | mountPath: /usr/share/filebeat/data |
| 125 | - name: {{ include "common.fullname" . }}-logs |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 126 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 127 | {{ end }} |
| 128 | {{- if .Values.service.insecure.enabled }} |
| 129 | - name: {{ include "common.name" . }}-insecure |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 130 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 131 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 132 | resources: |
| 133 | {{ include "common.resources" . | indent 12 }} |
| 134 | ports: |
| 135 | - containerPort: {{ .Values.service.insecure.internalPort }} |
| 136 | # disable liveness probe when breakpoints set in debugger |
| 137 | # so K8s doesn't restart unresponsive container |
| 138 | {{- if eq .Values.liveness.enabled true }} |
| 139 | livenessProbe: |
| 140 | tcpSocket: |
| 141 | port: {{ .Values.service.insecure.internalPort }} |
| 142 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 143 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Jakub Latusek | 3c75b9e | 2020-09-25 15:39:57 +0200 | [diff] [blame] | 144 | {{ end }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 145 | readinessProbe: |
| 146 | httpGet: |
| 147 | scheme: "HTTP" |
| 148 | path: {{ .Values.readiness.path }} |
| 149 | port: {{ .Values.service.insecure.internalPort }} |
| 150 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 151 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 152 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 153 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 154 | mountPath: /opt/logs |
| 155 | env: |
| 156 | - name: CONSUL_HOST |
| 157 | value: consul.{{ include "common.namespace" . }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 158 | - name: {{ include "common.name" . }}-fb-onap-i |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 159 | image: {{ include "repositoryGenerator.image.logging" . }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 160 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 161 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 162 | - name: {{ include "common.fullname" . }}-fb-conf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 163 | mountPath: /usr/share/filebeat/filebeat.yml |
| 164 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 165 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 166 | mountPath: /usr/share/filebeat/data |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 167 | - name: {{ include "common.fullname" . }}-logs-i |
| 168 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 169 | {{ end }} |
farida azmy | 3748180 | 2021-04-11 15:41:32 +0200 | [diff] [blame] | 170 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 171 | volumes: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 172 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 173 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 174 | name: {{ include "common.release" . }}-cbs-filebeat-configmap |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 175 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 176 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 177 | emptyDir: {} |
| 178 | - name: {{ include "common.fullname" . }}-logs |
| 179 | emptyDir: {} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 180 | - name: tls-info |
| 181 | emptyDir: {} |
| 182 | {{ end }} |
| 183 | {{- if .Values.service.insecure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 184 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 185 | emptyDir: {} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 186 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 187 | emptyDir: {} |
| 188 | {{ end }} |
| 189 | |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 190 | imagePullSecrets: |
| 191 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |