Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 1 | #============LICENSE_START======================================================== |
| 2 | # ================================================================================ |
| 3 | # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. |
| 4 | # ================================================================================ |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # ============LICENSE_END========================================================= |
| 17 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 19 | kind: Deployment |
| 20 | metadata: |
| 21 | name: {{ include "common.fullname" . }} |
| 22 | namespace: {{ include "common.namespace" . }} |
| 23 | labels: |
| 24 | app: {{ include "common.name" . }} |
| 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
| 29 | replicas: 1 |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 30 | selector: |
| 31 | matchLabels: |
| 32 | app: {{ include "common.name" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 37 | release: {{ include "common.release" . }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 38 | spec: |
| 39 | initContainers: |
| 40 | - name: {{ include "common.name" . }}-readiness |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 41 | image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 42 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 43 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 44 | - /app/ready.py |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 45 | args: |
| 46 | - --container-name |
| 47 | - consul-server |
Jack Lucas | 8c3463e | 2020-06-12 18:36:55 -0400 | [diff] [blame] | 48 | - --container-name |
| 49 | - aaf-cm |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 50 | - "-t" |
| 51 | - "15" |
| 52 | env: |
| 53 | - name: NAMESPACE |
| 54 | valueFrom: |
| 55 | fieldRef: |
| 56 | apiVersion: v1 |
| 57 | fieldPath: metadata.namespace |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 58 | - name: aaf_locator_fqdn |
| 59 | value: dcae |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 60 | {{- if .Values.service.secure.enabled }} |
| 61 | - name: init-tls |
| 62 | env: |
| 63 | - name: POD_IP |
| 64 | valueFrom: |
| 65 | fieldRef: |
| 66 | apiVersion: v1 |
| 67 | fieldPath: status.podIP |
| 68 | image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }} |
| 69 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 70 | resources: {} |
| 71 | volumeMounts: |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 72 | - mountPath: /opt/app/osaaf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 73 | name: tls-info |
| 74 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 75 | containers: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 76 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 77 | - name: {{ include "common.name" . }} |
| 78 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 79 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 80 | resources: |
| 81 | {{ include "common.resources" . | indent 12 }} |
| 82 | ports: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 83 | - containerPort: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 84 | # disable liveness probe when breakpoints set in debugger |
| 85 | # so K8s doesn't restart unresponsive container |
| 86 | {{- if eq .Values.liveness.enabled true }} |
| 87 | livenessProbe: |
| 88 | tcpSocket: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 89 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 90 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 91 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Jakub Latusek | 3c75b9e | 2020-09-25 15:39:57 +0200 | [diff] [blame] | 92 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 93 | readinessProbe: |
| 94 | httpGet: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 95 | scheme: "HTTPS" |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 96 | path: {{ .Values.readiness.path }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 97 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 98 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 99 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 100 | volumeMounts: |
| 101 | - name: {{ include "common.fullname" . }}-logs |
| 102 | mountPath: /opt/logs |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 103 | - name: tls-info |
| 104 | mountPath: /opt/tls |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 105 | env: |
| 106 | - name: CONSUL_HOST |
| 107 | value: consul.{{ include "common.namespace" . }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 108 | - name: USE_HTTPS |
| 109 | value: "1" |
| 110 | - name: HTTPS_CERT_PATH |
| 111 | value: "/opt/tls/cert.pem" |
| 112 | - name: HTTPS_KEY_PATH |
| 113 | value: "/opt/tls/key.pem" |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 114 | - name: {{ include "common.name" . }}-fb-onap |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 115 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 116 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 117 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 118 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 119 | mountPath: /usr/share/filebeat/filebeat.yml |
| 120 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 121 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 122 | mountPath: /usr/share/filebeat/data |
| 123 | - name: {{ include "common.fullname" . }}-logs |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 124 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 125 | {{ end }} |
| 126 | {{- if .Values.service.insecure.enabled }} |
| 127 | - name: {{ include "common.name" . }}-insecure |
| 128 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 129 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 130 | resources: |
| 131 | {{ include "common.resources" . | indent 12 }} |
| 132 | ports: |
| 133 | - containerPort: {{ .Values.service.insecure.internalPort }} |
| 134 | # disable liveness probe when breakpoints set in debugger |
| 135 | # so K8s doesn't restart unresponsive container |
| 136 | {{- if eq .Values.liveness.enabled true }} |
| 137 | livenessProbe: |
| 138 | tcpSocket: |
| 139 | port: {{ .Values.service.insecure.internalPort }} |
| 140 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 141 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Jakub Latusek | 3c75b9e | 2020-09-25 15:39:57 +0200 | [diff] [blame] | 142 | {{ end }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 143 | readinessProbe: |
| 144 | httpGet: |
| 145 | scheme: "HTTP" |
| 146 | path: {{ .Values.readiness.path }} |
| 147 | port: {{ .Values.service.insecure.internalPort }} |
| 148 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 149 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 150 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 151 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 152 | mountPath: /opt/logs |
| 153 | env: |
| 154 | - name: CONSUL_HOST |
| 155 | value: consul.{{ include "common.namespace" . }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 156 | - name: {{ include "common.name" . }}-fb-onap-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 157 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 158 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 159 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 160 | - name: {{ include "common.fullname" . }}-fb-conf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 161 | mountPath: /usr/share/filebeat/filebeat.yml |
| 162 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 163 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 164 | mountPath: /usr/share/filebeat/data |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 165 | - name: {{ include "common.fullname" . }}-logs-i |
| 166 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 167 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 168 | volumes: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 169 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 170 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 171 | name: {{ include "common.release" . }}-cbs-filebeat-configmap |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 172 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 173 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 174 | emptyDir: {} |
| 175 | - name: {{ include "common.fullname" . }}-logs |
| 176 | emptyDir: {} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 177 | - name: tls-info |
| 178 | emptyDir: {} |
| 179 | {{ end }} |
| 180 | {{- if .Values.service.insecure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 181 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 182 | emptyDir: {} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 183 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 184 | emptyDir: {} |
| 185 | {{ end }} |
| 186 | |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 187 | imagePullSecrets: |
| 188 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |