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