1 # Copyright © 2017 Amdocs, Bell Canada
2 # Copyright (C) 2020 Wipro Limited.
3 # Modifications Copyright © 2018 AT&T,VMware
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
30 app: {{ include "common.name" . }}
31 replicas: {{ .Values.replicaCount }}
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
39 - name: {{ include "common.name" . }}-readiness
52 fieldPath: metadata.namespace
53 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 - name: {{ include "common.name" . }}-onboard-readiness
61 - "{{ include "common.release" . }}-oof-has-onboard"
67 fieldPath: metadata.namespace
68 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 - name: {{ include "common.name" . }}-has-sms-readiness
76 until [ $resp = "200" ]; do
77 resp=$(curl -s -o /dev/null -k --write-out %{http_code} https://aaf-sms.{{ include "common.namespace" . }}:10443/v1/sms/domain/has/secret);
86 fieldPath: metadata.namespace
87 image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.global.curlImage }}"
88 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
89 {{ include "common.certInitializer.initContainer" . | indent 6 }}
92 - name: {{ include "common.name" . }}
93 image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}"
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 command: ["/bin/bash","-c"]
96 args: ["/usr/local/bin/uwsgi -s /run/conductor/uwsgi.sock --chmod-socket=777 --wsgi-file /etc/nginx/conductor.wsgi --callable application --set port={{ .Values.uwsgi.internalPort }} --die-on-term --exit-on-reload --pidfile /run/conductor/conductor-uwsgi.pid --enable-threads --workers 6 --master --vacuum --single-interpreter --socket-timeout 10 --max-worker-lifetime 300 --max-requests 100 --no-defer-accept --protocol=uwsgi --socket 0.0.0.0:{{ .Values.uwsgi.internalPort }}"]
98 - containerPort: {{ .Values.uwsgi.internalPort }}
99 # disable liveness probe when breakpoints set in debugger
100 # so K8s doesn't restart unresponsive container
101 {{- if .Values.liveness.enabled }}
104 port: {{ .Values.uwsgi.internalPort }}
105 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
106 periodSeconds: {{ .Values.liveness.periodSeconds }}
110 port: {{ .Values.uwsgi.internalPort }}
111 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.readiness.periodSeconds }}
115 - mountPath: /etc/localtime
118 - mountPath: /usr/local/etc/conductor/conductor.conf
119 name: {{ .Values.global.commonConfigPrefix }}-config
120 subPath: conductor.conf
121 - mountPath: /usr/local/bin/log.conf
122 name: {{ .Values.global.commonConfigPrefix }}-config
124 - mountPath: /usr/local/bin/AAF_RootCA.cer
125 name: {{ .Values.global.commonConfigPrefix }}-config
126 subPath: AAF_RootCA.cer
128 {{ include "common.resources" . | indent 12 }}
129 - name: {{ include "common.name" . }}-nginx
130 image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.nginx.image }}"
131 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
133 - containerPort: {{ .Values.service.internalPort }}
134 {{- if .Values.liveness.enabled }}
137 port: {{ .Values.service.internalPort }}
138 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
139 periodSeconds: {{ .Values.liveness.periodSeconds }}
143 port: {{ .Values.service.internalPort }}
144 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
145 periodSeconds: {{ .Values.readiness.periodSeconds }}
147 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
148 - mountPath: /etc/localtime
151 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
152 name: {{ .Values.global.commonConfigPrefix }}-config
155 {{ include "common.resources" . | indent 12 }}
156 {{- if .Values.nodeSelector }}
158 {{ toYaml .Values.nodeSelector | indent 10 }}
160 {{- if .Values.affinity }}
162 {{ toYaml .Values.affinity | indent 10 }}
165 {{ include "common.certInitializer.volumes" . | nindent 8 }}
169 - name: {{ .Values.global.commonConfigPrefix }}-config
171 name: {{ .Values.global.commonConfigPrefix }}-configmap
175 - key: conductor.conf
179 - key: AAF_RootCA.cer
182 - name: "{{ include "common.namespace" . }}-docker-registry-key"