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 | |
| 18 | apiVersion: extensions/v1beta1 |
| 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 "+" "_" }} |
| 26 | release: {{ .Release.Name }} |
| 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
| 29 | replicas: 1 |
| 30 | template: |
| 31 | metadata: |
| 32 | labels: |
| 33 | app: {{ include "common.name" . }} |
| 34 | release: {{ .Release.Name }} |
| 35 | spec: |
| 36 | initContainers: |
| 37 | - name: {{ include "common.name" . }}-readiness |
| 38 | image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }} |
| 39 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 40 | command: |
| 41 | - /root/ready.py |
| 42 | args: |
| 43 | - --container-name |
| 44 | - consul-server |
| 45 | - "-t" |
| 46 | - "15" |
| 47 | env: |
| 48 | - name: NAMESPACE |
| 49 | valueFrom: |
| 50 | fieldRef: |
| 51 | apiVersion: v1 |
| 52 | fieldPath: metadata.namespace |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 53 | {{- if .Values.service.secure.enabled }} |
| 54 | - name: init-tls |
| 55 | env: |
| 56 | - name: POD_IP |
| 57 | valueFrom: |
| 58 | fieldRef: |
| 59 | apiVersion: v1 |
| 60 | fieldPath: status.podIP |
| 61 | image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }} |
| 62 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 63 | resources: {} |
| 64 | volumeMounts: |
| 65 | - mountPath: /opt/tls/shared |
| 66 | name: tls-info |
| 67 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 68 | containers: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 69 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 70 | - name: {{ include "common.name" . }} |
| 71 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 72 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 73 | resources: |
| 74 | {{ include "common.resources" . | indent 12 }} |
| 75 | ports: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 76 | - containerPort: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 77 | # disable liveness probe when breakpoints set in debugger |
| 78 | # so K8s doesn't restart unresponsive container |
| 79 | {{- if eq .Values.liveness.enabled true }} |
| 80 | livenessProbe: |
| 81 | tcpSocket: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 82 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 83 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 84 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 85 | {{ end -}} |
| 86 | readinessProbe: |
| 87 | httpGet: |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 88 | scheme: "HTTPS" |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 89 | path: {{ .Values.readiness.path }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 90 | port: {{ .Values.service.secure.internalPort }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 91 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 92 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 93 | volumeMounts: |
| 94 | - name: {{ include "common.fullname" . }}-logs |
| 95 | mountPath: /opt/logs |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 96 | - name: tls-info |
| 97 | mountPath: /opt/tls |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 98 | env: |
| 99 | - name: CONSUL_HOST |
| 100 | value: consul.{{ include "common.namespace" . }} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 101 | - name: USE_HTTPS |
| 102 | value: "1" |
| 103 | - name: HTTPS_CERT_PATH |
| 104 | value: "/opt/tls/cert.pem" |
| 105 | - name: HTTPS_KEY_PATH |
| 106 | value: "/opt/tls/key.pem" |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 107 | - name: {{ include "common.name" . }}-fb-onap |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 108 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 109 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 110 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 111 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 112 | mountPath: /usr/share/filebeat/filebeat.yml |
| 113 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 114 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 115 | mountPath: /usr/share/filebeat/data |
| 116 | - name: {{ include "common.fullname" . }}-logs |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 117 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 118 | {{ end }} |
| 119 | {{- if .Values.service.insecure.enabled }} |
| 120 | - name: {{ include "common.name" . }}-insecure |
| 121 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 122 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 123 | resources: |
| 124 | {{ include "common.resources" . | indent 12 }} |
| 125 | ports: |
| 126 | - containerPort: {{ .Values.service.insecure.internalPort }} |
| 127 | # disable liveness probe when breakpoints set in debugger |
| 128 | # so K8s doesn't restart unresponsive container |
| 129 | {{- if eq .Values.liveness.enabled true }} |
| 130 | livenessProbe: |
| 131 | tcpSocket: |
| 132 | port: {{ .Values.service.insecure.internalPort }} |
| 133 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 134 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 135 | {{ end -}} |
| 136 | readinessProbe: |
| 137 | httpGet: |
| 138 | scheme: "HTTP" |
| 139 | path: {{ .Values.readiness.path }} |
| 140 | port: {{ .Values.service.insecure.internalPort }} |
| 141 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 142 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 143 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 144 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 145 | mountPath: /opt/logs |
| 146 | env: |
| 147 | - name: CONSUL_HOST |
| 148 | value: consul.{{ include "common.namespace" . }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 149 | - name: {{ include "common.name" . }}-fb-onap-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 150 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 151 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 152 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 153 | - name: {{ include "common.fullname" . }}-fb-conf |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 154 | mountPath: /usr/share/filebeat/filebeat.yml |
| 155 | subPath: filebeat.yml |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 156 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 157 | mountPath: /usr/share/filebeat/data |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 158 | - name: {{ include "common.fullname" . }}-logs-i |
| 159 | mountPath: /var/log/onap/config-binding-service |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 160 | {{ end }} |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 161 | volumes: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 162 | - name: {{ include "common.fullname" . }}-fb-conf |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 163 | configMap: |
| 164 | name: {{ .Release.Name }}-cbs-filebeat-configmap |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 165 | {{- if .Values.service.secure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 166 | - name: {{ include "common.fullname" . }}-data-fb |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 167 | emptyDir: {} |
| 168 | - name: {{ include "common.fullname" . }}-logs |
| 169 | emptyDir: {} |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 170 | - name: tls-info |
| 171 | emptyDir: {} |
| 172 | {{ end }} |
| 173 | {{- if .Values.service.insecure.enabled }} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 174 | - name: {{ include "common.fullname" . }}-data-fb-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 175 | emptyDir: {} |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 176 | - name: {{ include "common.fullname" . }}-logs-i |
Vijay Venkatesh Kumar | a4535c9 | 2019-08-02 01:45:23 +0000 | [diff] [blame] | 177 | emptyDir: {} |
| 178 | {{ end }} |
| 179 | |
Jack Lucas | 6fae763 | 2019-01-25 11:46:00 -0500 | [diff] [blame] | 180 | imagePullSecrets: |
| 181 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |