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: /etc/localtime
57 - mountPath: /usr/local/etc/conductor/conductor.conf
58 name: {{ .Values.global.commonConfigPrefix }}-config
59 subPath: conductor.conf
60 - mountPath: /usr/local/bin/log.conf
61 name: {{ .Values.global.commonConfigPrefix }}-config
64 {{ include "common.resources" . | indent 12 }}
65 - name: {{ include "common.name" . }}-nginx
66 image: {{ include "repositoryGenerator.image.nginx" . }}
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 /opt/bitnami/scripts/nginx/entrypoint.sh /opt/bitnami/scripts/nginx/run.sh
75 - containerPort: {{ .Values.service.internalPort }}
77 {{- if .Values.liveness.enabled }}
80 port: {{ .Values.service.internalPort }}
81 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.liveness.periodSeconds }}
86 port: {{ .Values.service.internalPort }}
87 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
88 periodSeconds: {{ .Values.readiness.periodSeconds }}
90 - mountPath: /etc/localtime
93 - mountPath: /opt/bitnami/nginx/conf/nginx.conf
94 name: {{ .Values.global.commonConfigPrefix }}-config
97 {{ include "common.resources" . | indent 12 }}
98 {{- if .Values.nodeSelector }}
100 {{ toYaml .Values.nodeSelector | indent 10 }}
102 {{- if .Values.affinity }}
104 {{ toYaml .Values.affinity | indent 10 }}
106 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
111 - name: {{ .Values.global.commonConfigPrefix }}-config
113 name: {{ .Values.global.commonConfigPrefix }}-configmap
117 - key: conductor.conf
122 - name: "{{ include "common.namespace" . }}-docker-registry-key"