Files
open5gs-legacy-operator/helm-charts/open5gs/templates/populate-deployment.yaml
jpontongradiant 2c9cd54da0 first commit
2024-11-14 15:34:57 +01:00

47 lines
1.7 KiB
YAML

{{- if .Values.populate.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}-populate
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: populate
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: populate
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: populate
spec:
{{- include "open5gs.populate.imagePullSecrets" . | nindent 6 }}
initContainers:
- name: init
image: {{ template "open5gs.populate.image" . }}
imagePullPolicy: {{ .Values.populate.pullPolicy | quote }}
env:
- name: DB_URI
value: {{ tpl .Values.dbURI . }}
command:
- /bin/bash
- -c
- {{ join "&&" .Values.populate.initCommands | quote }}
containers:
- name: populate
image: {{ template "open5gs.populate.image" . }}
imagePullPolicy: {{ .Values.populate.pullPolicy | quote }}
env:
- name: DB_URI
value: {{ tpl .Values.dbURI . }}
command:
- /bin/bash
- -c
- "tail -f /dev/null"
{{- end }}