Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 4 | # Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 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 | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 19 | |
Krzysztof Kuzmicki | aef7007 | 2020-07-24 14:47:43 +0200 | [diff] [blame] | 20 | apiVersion: apps/v1 |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -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 | 332b5e7 | 2019-02-06 16:03:13 -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 | 332b5e7 | 2019-02-06 16:03:13 -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 | 332b5e7 | 2019-02-06 16:03:13 -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 | 332b5e7 | 2019-02-06 16:03:13 -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 | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 47 | args: |
| 48 | - --container-name |
| 49 | - dcae-deployment-handler |
| 50 | - --container-name |
| 51 | - consul-server |
| 52 | - --container-name |
jhh | d425867 | 2020-08-09 12:08:08 -0500 | [diff] [blame] | 53 | - policy-xacml-pdp |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 54 | - "-t" |
| 55 | - "45" |
| 56 | env: |
| 57 | - name: NAMESPACE |
| 58 | valueFrom: |
| 59 | fieldRef: |
| 60 | apiVersion: v1 |
| 61 | fieldPath: metadata.namespace |
| 62 | - name: init-tls |
| 63 | env: |
| 64 | - name: POD_IP |
| 65 | valueFrom: |
| 66 | fieldRef: |
| 67 | apiVersion: v1 |
| 68 | fieldPath: status.podIP |
Jack Lucas | c70bc7e | 2019-09-23 09:02:31 -0400 | [diff] [blame] | 69 | - name: aaf_locator_fqdn |
| 70 | value: dcae |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 71 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [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 |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 76 | name: tls-info |
| 77 | - name: init-consul |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 78 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 79 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 80 | args: |
| 81 | - --key |
| 82 | - policy_handler|/phconfig/config.json |
| 83 | resources: {} |
| 84 | volumeMounts: |
| 85 | - mountPath: /phconfig |
| 86 | name: ph-config |
| 87 | containers: |
| 88 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 89 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 90 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 91 | resources: |
| 92 | {{ include "common.resources" . | indent 12 }} |
| 93 | ports: |
| 94 | - containerPort: {{ .Values.service.internalPort }} |
| 95 | # disable liveness probe when breakpoints set in debugger |
| 96 | # so K8s doesn't restart unresponsive container |
| 97 | {{- if eq .Values.liveness.enabled true }} |
| 98 | livenessProbe: |
| 99 | tcpSocket: |
| 100 | port: {{ .Values.service.internalPort }} |
| 101 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 102 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 103 | {{ end }} |
| 104 | readinessProbe: |
| 105 | httpGet: |
| 106 | path: {{ .Values.readiness.path }} |
| 107 | port: {{ .Values.service.internalPort }} |
| 108 | scheme: {{ .Values.readiness.scheme }} |
| 109 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 110 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 111 | volumeMounts: |
vv770d | 8556635 | 2021-03-02 23:37:03 +0000 | [diff] [blame] | 112 | - mountPath: /app/logs |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 113 | name: component-log |
vv770d | 8556635 | 2021-03-02 23:37:03 +0000 | [diff] [blame] | 114 | - mountPath: /app/etc/tls/certs/ |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 115 | name: tls-info |
| 116 | env: |
| 117 | - name: CONSUL_HOST |
| 118 | value: consul-server.{{ include "common.namespace" . }} |
| 119 | - name: CLOUDIFY_USER |
| 120 | value: admin |
| 121 | - name: CLOUDIFY_PASSWORD |
Schmalzried, Terry (ts862m) | 12db789 | 2020-08-21 20:42:33 -0400 | [diff] [blame] | 122 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14 }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 123 | - name: CONFIG_BINDING_SERVICE |
| 124 | value: config-binding-service |
| 125 | - name: POD_IP |
| 126 | valueFrom: |
| 127 | fieldRef: |
| 128 | apiVersion: v1 |
| 129 | fieldPath: status.podIP |
| 130 | - name: {{ include "common.name" . }}-filebeat |
| 131 | env: |
| 132 | - name: POD_IP |
| 133 | valueFrom: |
| 134 | fieldRef: |
| 135 | apiVersion: v1 |
| 136 | fieldPath: status.podIP |
Sylvain Desbureaux | cad63e5 | 2020-11-21 22:17:40 +0100 | [diff] [blame] | 137 | image: {{ include "repositoryGenerator.image.logging" . }} |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 138 | imagePullPolicy: IfNotPresent |
| 139 | resources: {} |
| 140 | volumeMounts: |
Jack Lucas | 128c0ad | 2019-09-04 15:44:33 -0400 | [diff] [blame] | 141 | - mountPath: /var/log/onap/policy-handler |
Jack Lucas | 332b5e7 | 2019-02-06 16:03:13 -0500 | [diff] [blame] | 142 | name: component-log |
| 143 | - mountPath: /usr/share/filebeat/data |
| 144 | name: filebeat-data |
| 145 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 146 | name: filebeat-conf |
| 147 | subPath: filebeat.yml |
| 148 | volumes: |
| 149 | - emptyDir: {} |
| 150 | name: component-log |
| 151 | - emptyDir: {} |
| 152 | name: filebeat-data |
| 153 | - configMap: |
| 154 | defaultMode: 420 |
| 155 | name: {{ include "common.fullname" . }}-filebeat-configmap |
| 156 | name: filebeat-conf |
| 157 | - emptyDir: {} |
| 158 | name: tls-info |
| 159 | - configMap: |
| 160 | defaultMode: 422 |
| 161 | name: {{ include "common.fullname" . }}-configmap |
| 162 | name: ph-config |
| 163 | imagePullSecrets: |
| 164 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |