99 replicas : 1
1010 selector :
1111 matchLabels :
12- {{- include "opc-router.selectorLabels" . | nindent 6 }}
12+ {{- include "opc-router.labels" . | nindent 6 }}
13+ {{- include "opc-router.originalSelectorLabels" . | nindent 6 }}
1314 template :
1415 metadata :
1516 {{- with .Values.podAnnotations }}
1617 annotations :
1718 {{- toYaml . | nindent 8 }}
1819 {{- end }}
1920 labels :
21+ {{- include "opc-router.labels" . | nindent 8 }}
22+ {{- include "opc-router.originalSelectorLabels" . | nindent 8 }}
23+ {{- if eq .Values.image.repository "opcrouter/runtime" }}
24+ {{- if not .Values.mongodb.deploy }}
2025 {{- include "opc-router.selectorLabels" . | nindent 8 }}
26+ {{- end }}
27+ {{- end }}
2128 spec :
2229 {{- with .Values.imagePullSecrets }}
2330 imagePullSecrets :
@@ -33,34 +40,44 @@ spec:
3340 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3441 imagePullPolicy : {{ .Values.image.pullPolicy }}
3542 ports :
36- {{- if eq .Values.image.repository "opcrouter/runtime" }}
37- {{- if eq .Values.mongodb.deploy false }}
38- - name : opcrouter
43+ {{- if eq .Values.image.repository "opcrouter/runtime" }}
44+ {{- if not .Values.mongodb.deploy }}
45+ - name : mongodb
3946 containerPort : 27017
4047 protocol : TCP
41- {{- end }}
42- {{- end }}
48+ {{- end }}
49+ {{- end }}
50+ {{- if .Values.project.redundancy.deploy }}
51+ - name : ready
52+ containerPort : 49954
53+ protocol : TCP
54+ readinessProbe :
55+ tcpSocket :
56+ port : ready
57+ initialDelaySeconds : {{ .Values.project.redundancy.readinessProbe.initialDelaySeconds }}
58+ periodSeconds : {{ .Values.project.redundancy.readinessProbe.periodSeconds }}
59+ {{- end }}
4360 # Environment variables for the opcrouter container
4461 env :
4562 # Variables for connecting a service to the mongodb if a service is specified
4663 {{- if .Values.mongodb.deploy }}
4764 - name : OR_DATABASE_HOST_ADRESS
48- value : " {{ .Release.Name }}-mongodb-0.{{ .Release.Name }}-mongodb-headless "
65+ value : " {{ include " getMongoDB" . }}"
4966 {{- if .Values.mongodb.auth.enabled }}
5067 - name : OR_DATABASE_USERNAME
5168 value : root
5269 # Loading the password for the mongodb from secret
5370 - name : OR_DATABASE_PASSWORD
5471 valueFrom :
5572 secretKeyRef :
56- name : {{ .Values.mongodb.auth.existingSecret }}
73+ name : {{ if .Values.mongodb.auth.existingSecret }}{{ .Values.mongodb.auth.existingSecret }}{{ else }}{{ .Release.Name }}-mongodb{{ end }}
5774 key : mongodb-root-password
5875 {{- end }}
5976 {{- end }}
6077 - name : OR_I_ACCEPT_EULA
6178 value : {{ .Values.I_do_accept_the_EULA | quote }}
6279 # Loading environment variables specified in the values file
63- {{- range .Values.EnvVars }}
80+ {{- range .Values.envVars }}
6481 - name : " {{ keys . | first }}"
6582 value : " {{ values . | first }}"
6683 {{- end }}
0 commit comments