release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
- replicas: {{ .Values.ricxapp.replicaCount }}
+ replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
spec:
hostname: {{ include "ricxapp.name" . }}
imagePullSecrets:
- - name: {{ include "ricxapp.imagepullsecret" . }}
+{{- range .Values.containers }}
+ - name: {{ .image.registry | replace "." "-" | replace ":" "-" | replace "/" "-" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+ volumes:
+ - name: config-volume
+ configMap:
+ name: {{ include "ricxapp.configmapname" . }}-appconfig
containers:
- - name: {{ include "ricxapp.containername" . }}
- image: "{{ .Values.ricxapp.image.repository }}/{{ .Values.ricxapp.image.name }}:{{ .Values.ricxapp.image.tag }}"
- imagePullPolicy: {{ .Values.ricxapp.image.pullPolicy }}
+{{- range .Values.containers }}
+ - name: {{ .name }}
+ image: "{{ .image.registry }}/{{ .image.name }}:{{ .image.tag }}"
+ {{- if .command }}
+ command: [{{ .command }}]
+ {{- end}}
+ imagePullPolicy: {{ $.Values.image_pull_policy }}
+ {{- if .ports }}
ports:
- - name: http
- containerPort: {{ .Values.ricxapp.service.http.containerPort }}
+ {{- if .ports.http }}
+ - name: http_{{ .name }}
+ containerPort: {{ .ports.http }}
protocol: TCP
- - name: rmrroute
- containerPort: {{ .Values.ricxapp.service.rmr.route.port }}
+ {{- end }}
+ {{- if .ports.rmr_data }}
+ - name: rmrdata_{{ .name }}
+ containerPort: {{ .ports.rmr_data }}
protocol: TCP
- - name: rmrdata
- containerPort: {{ .Values.ricxapp.service.rmr.data.port }}
+ {{- end }}
+ {{- if .ports.rmr_route }}
+ - name: rmrroute_{{ .name }}
+ containerPort: {{ .ports.rmr_route }}
protocol: TCP
+ {{- end }}
+ {{- end }}
+{{- end }}
volumeMounts:
- name: config-volume
- mountPath: {{ .Values.ricxapp.appconfig.path }}
+ mountPath: {{ .Values.appconfig.path }}
envFrom:
- configMapRef:
name: {{ include "ricxapp.configmapname" . }}-appenv
- {{- if .Values.ricxapp.livenessProbe }}
- livenessProbe:
- {{- .Values.ricxapp.livenessProbe | nindent 12 -}}
- {{ end }}
- {{- if .Values.ricxapp.readinessProbe }}
- readinessProbe:
- {{- .Values.ricxapp.readinessProbe | nindent 12 -}}
- {{ end }}
restartPolicy: Always
- volumes:
- - name: config-volume
- configMap:
- name: {{ include "ricxapp.configmapname" . }}-appconfig