2 # Copyright © 2017 Amdocs, Bell Canada
3 # Copyright (C) 2020 Wipro Limited.
4 # Modifications Copyright © 2018 AT&T,VMware
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
41 - name: {{ include "common.name" . }}-readiness
54 fieldPath: metadata.namespace
55 image: {{ include "repositoryGenerator.image.readiness" . }}
56 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 - name: {{ include "common.name" . }}-has-sms-readiness
63 until [ $resp = "200" ]; do
64 resp=$(curl -s -o /dev/null -k --write-out %{http_code} https://aaf-sms.{{ include "common.namespace" . }}:10443/v1/sms/domain/has/secret);
73 fieldPath: metadata.namespace
74 image: {{ include "repositoryGenerator.image.curl" . }}
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 {{ include "common.certInitializer.initContainer" . | indent 6 }}
79 - name: {{ include "common.name" . }}
80 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.image.optf_has }}
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
82 command: ["/bin/sh","-c"]
83 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 }}"]
85 - containerPort: {{ .Values.uwsgi.internalPort }}
86 # disable liveness probe when breakpoints set in debugger
87 # so K8s doesn't restart unresponsive container
88 {{- if .Values.liveness.enabled }}
91 port: {{ .Values.uwsgi.internalPort }}
92 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.liveness.periodSeconds }}
97 port: {{ .Values.uwsgi.internalPort }}
98 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.readiness.periodSeconds }}
100 env: {{ include "oof.etcd.env" . | nindent 10 }}
102 - mountPath: /etc/localtime
105 - mountPath: /usr/local/etc/conductor/conductor.conf
106 name: {{ .Values.global.commonConfigPrefix }}-config
107 subPath: conductor.conf
108 - mountPath: /usr/local/bin/log.conf
109 name: {{ .Values.global.commonConfigPrefix }}-config
111 - mountPath: /usr/local/bin/AAF_RootCA.cer
112 name: {{ include "common.fullname" . }}-onap-certs
113 subPath: aaf_root_ca.cer
115 {{ include "common.resources" . | indent 12 }}
116 - name: {{ include "common.name" . }}-nginx
117 image: {{ include "repositoryGenerator.image.nginx" . }}
118 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
124 grep -v '^$' /opt/bitnami/nginx/ssl/local/org.onap.oof.crt > /tmp/oof.crt
125 cat /tmp/oof.crt /tmp/intermediate_root_ca.pem /tmp/AAF_RootCA.cer >> /opt/bitnami/nginx/org.onap.oof.crt
126 /opt/bitnami/scripts/nginx/entrypoint.sh /opt/bitnami/scripts/nginx/run.sh
128 - containerPort: {{ .Values.service.internalPort }}
129 {{- if .Values.liveness.enabled }}
132 port: {{ .Values.service.internalPort }}
133 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
134 periodSeconds: {{ .Values.liveness.periodSeconds }}
138 port: {{ .Values.service.internalPort }}
139 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
140 periodSeconds: {{ .Values.readiness.periodSeconds }}
142 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
143 - mountPath: /etc/localtime
146 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
147 name: {{ .Values.global.commonConfigPrefix }}-config
149 - mountPath: /tmp/AAF_RootCA.cer
150 name: {{ include "common.fullname" . }}-onap-certs
151 subPath: aaf_root_ca.cer
152 - mountPath: /tmp/intermediate_root_ca.pem
153 name: {{ include "common.fullname" . }}-onap-certs
154 subPath: intermediate_root_ca.pem
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 }}
165 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
167 {{ include "common.certInitializer.volumes" . | nindent 8 }}
171 - name: {{ .Values.global.commonConfigPrefix }}-config
173 name: {{ .Values.global.commonConfigPrefix }}-configmap
177 - key: conductor.conf
181 {{ include "oof.certificate.volume" . | indent 8 }}
183 - name: "{{ include "common.namespace" . }}-docker-registry-key"