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.
21 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
23 selector: {{- include "common.selectors" . | nindent 4 }}
24 replicas: {{ .Values.replicaCount }}
26 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
29 {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
31 - name: {{ include "common.name" . }}
32 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.image.optf_has }}
33 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
34 command: ["/bin/sh","-c"]
35 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 }}"]
37 - containerPort: {{ .Values.uwsgi.internalPort }}
38 # disable liveness probe when breakpoints set in debugger
39 # so K8s doesn't restart unresponsive container
40 {{- if .Values.liveness.enabled }}
43 port: {{ .Values.uwsgi.internalPort }}
44 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
45 periodSeconds: {{ .Values.liveness.periodSeconds }}
49 port: {{ .Values.uwsgi.internalPort }}
50 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
51 periodSeconds: {{ .Values.readiness.periodSeconds }}
52 env: {{ include "oof.etcd.env" . | nindent 10 }}
54 - mountPath: /usr/local/etc/conductor/conductor.conf
55 name: {{ .Values.global.commonConfigPrefix }}-config
56 subPath: conductor.conf
57 - mountPath: /usr/local/bin/log.conf
58 name: {{ .Values.global.commonConfigPrefix }}-config
60 resources: {{ include "common.resources" . | nindent 12 }}
61 - name: {{ include "common.name" . }}-nginx
62 image: {{ include "repositoryGenerator.image.nginx" . }}
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 /opt/bitnami/scripts/nginx/entrypoint.sh /opt/bitnami/scripts/nginx/run.sh
71 - containerPort: {{ .Values.service.internalPort }}
73 {{- if .Values.liveness.enabled }}
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.liveness.periodSeconds }}
82 port: {{ .Values.service.internalPort }}
83 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
84 periodSeconds: {{ .Values.readiness.periodSeconds }}
86 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
87 name: {{ .Values.global.commonConfigPrefix }}-config
89 resources: {{ include "common.resources" . | nindent 12 }}
90 {{- if .Values.nodeSelector }}
92 {{ toYaml .Values.nodeSelector | indent 10 }}
94 {{- if .Values.affinity }}
96 {{ toYaml .Values.affinity | indent 10 }}
98 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
100 - name: {{ .Values.global.commonConfigPrefix }}-config
102 name: {{ .Values.global.commonConfigPrefix }}-configmap
106 - key: conductor.conf
110 {{- include "common.imagePullSecrets" . | nindent 6 }}