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: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 - name: {{ include "common.name" . }}-onboard-readiness
58 - /root/job_complete.py
61 - "{{ include "common.release" . }}-oof-has-onboard"
67 fieldPath: metadata.namespace
68 image: "{{ .Values.global.readinessRepository }}/{{ .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 }}
91 - name: {{ include "common.name" . }}
92 image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}"
93 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
94 command: ["/bin/bash","-c"]
95 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 --logto /var/log/conductor/conductor-uwsgi.log --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 --logfile-chown --logfile-chmod 664 --protocol=uwsgi --socket 0.0.0.0:{{ .Values.uwsgi.internalPort }}"]
97 - containerPort: {{ .Values.uwsgi.internalPort }}
98 # disable liveness probe when breakpoints set in debugger
99 # so K8s doesn't restart unresponsive container
100 {{- if .Values.liveness.enabled }}
103 port: {{ .Values.uwsgi.internalPort }}
104 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.liveness.periodSeconds }}
109 port: {{ .Values.uwsgi.internalPort }}
110 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
111 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 - mountPath: /etc/localtime
117 - mountPath: /usr/local/etc/conductor/conductor.conf
118 name: {{ .Values.global.commonConfigPrefix }}-config
119 subPath: conductor.conf
120 - mountPath: /usr/local/bin/log.conf
121 name: {{ .Values.global.commonConfigPrefix }}-config
123 - mountPath: /usr/local/bin/AAF_RootCA.cer
124 name: {{ .Values.global.commonConfigPrefix }}-config
125 subPath: AAF_RootCA.cer
127 {{ include "common.resources" . | indent 12 }}
128 - name: {{ include "common.name" . }}-nginx
129 image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.nginx.image }}"
130 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
132 - containerPort: {{ .Values.service.internalPort }}
133 {{- if .Values.liveness.enabled }}
136 port: {{ .Values.service.internalPort }}
137 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
138 periodSeconds: {{ .Values.liveness.periodSeconds }}
142 port: {{ .Values.service.internalPort }}
143 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
144 periodSeconds: {{ .Values.readiness.periodSeconds }}
146 - mountPath: /etc/localtime
149 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
150 name: {{ .Values.global.commonConfigPrefix }}-config
152 - mountPath: /opt/bitnami/nginx/ssl/org.onap.oof.crt
153 name: {{ .Values.global.commonConfigPrefix }}-config
154 subPath: org.onap.oof.crt
155 - mountPath: /opt/bitnami/nginx/ssl/org.onap.oof.key
156 name: {{ .Values.global.commonConfigPrefix }}-config
157 subPath: org.onap.oof.key
159 {{ include "common.resources" . | indent 12 }}
160 {{- if .Values.nodeSelector }}
162 {{ toYaml .Values.nodeSelector | indent 10 }}
164 {{- if .Values.affinity }}
166 {{ toYaml .Values.affinity | indent 10 }}
172 - name: {{ .Values.global.commonConfigPrefix }}-config
174 name: {{ .Values.global.commonConfigPrefix }}-configmap
178 - key: conductor.conf
182 - key: AAF_RootCA.cer
184 - key: org.onap.oof.key
185 path: org.onap.oof.key
186 - key: org.onap.oof.crt
187 path: org.onap.oof.crt
189 - name: "{{ include "common.namespace" . }}-docker-registry-key"