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.
17 apiVersion: extensions/v1beta1
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 }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ include "common.release" . }}
36 - name: {{ include "common.name" . }}-readiness
49 fieldPath: metadata.namespace
50 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - name: {{ include "common.name" . }}-onboard-readiness
55 - /root/job_complete.py
58 - "{{ include "common.release" . }}-oof-has-onboard"
64 fieldPath: metadata.namespace
65 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
66 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 - name: {{ include "common.name" . }}-has-sms-readiness
73 until [ $resp = "200" ]; do
74 resp=$(curl -s -o /dev/null -k --write-out %{http_code} https://aaf-sms.{{ include "common.namespace" . }}:10443/v1/sms/domain/has/secret);
83 fieldPath: metadata.namespace
84 image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.global.curlImage }}"
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
88 - name: {{ include "common.name" . }}
89 image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}"
90 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
91 command: ["/bin/bash","-c"]
92 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 }}"]
94 - containerPort: {{ .Values.uwsgi.internalPort }}
95 # disable liveness probe when breakpoints set in debugger
96 # so K8s doesn't restart unresponsive container
97 {{- if .Values.liveness.enabled }}
100 port: {{ .Values.uwsgi.internalPort }}
101 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
102 periodSeconds: {{ .Values.liveness.periodSeconds }}
106 port: {{ .Values.uwsgi.internalPort }}
107 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
108 periodSeconds: {{ .Values.readiness.periodSeconds }}
111 - mountPath: /etc/localtime
114 - mountPath: /usr/local/etc/conductor/conductor.conf
115 name: {{ .Values.global.commonConfigPrefix }}-config
116 subPath: conductor.conf
117 - mountPath: /usr/local/bin/log.conf
118 name: {{ .Values.global.commonConfigPrefix }}-config
120 - mountPath: /usr/local/bin/AAF_RootCA.cer
121 name: {{ .Values.global.commonConfigPrefix }}-config
122 subPath: AAF_RootCA.cer
124 {{ include "common.resources" . | indent 12 }}
125 - name: {{ include "common.name" . }}-nginx
126 image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.nginx.image }}"
127 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
129 - containerPort: {{ .Values.service.internalPort }}
130 {{- if .Values.liveness.enabled }}
133 port: {{ .Values.service.internalPort }}
134 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
135 periodSeconds: {{ .Values.liveness.periodSeconds }}
139 port: {{ .Values.service.internalPort }}
140 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
141 periodSeconds: {{ .Values.readiness.periodSeconds }}
143 - mountPath: /etc/localtime
146 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
147 name: {{ .Values.global.commonConfigPrefix }}-config
149 - mountPath: /opt/bitnami/nginx/ssl/org.onap.oof.crt
150 name: {{ .Values.global.commonConfigPrefix }}-config
151 subPath: org.onap.oof.crt
152 - mountPath: /opt/bitnami/nginx/ssl/org.onap.oof.key
153 name: {{ .Values.global.commonConfigPrefix }}-config
154 subPath: org.onap.oof.key
156 {{ include "common.resources" . | indent 12 }}
157 {{- if .Values.nodeSelector }}
159 {{ toYaml .Values.nodeSelector | indent 10 }}
161 {{- if .Values.affinity }}
163 {{ toYaml .Values.affinity | indent 10 }}
169 - name: {{ .Values.global.commonConfigPrefix }}-config
171 name: {{ .Values.global.commonConfigPrefix }}-configmap
175 - key: conductor.conf
179 - key: AAF_RootCA.cer
181 - key: org.onap.oof.key
182 path: org.onap.oof.key
183 - key: org.onap.oof.crt
184 path: org.onap.oof.crt
186 - name: "{{ include "common.namespace" . }}-docker-registry-key"