71 lines
2.7 KiB
YAML
71 lines
2.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "ix-chart.fullname" . }}
|
|
labels:
|
|
{{- include "ix-chart.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "ix-chart.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "ix-chart.selectorLabels" . | nindent 8 }}
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
{{- if .Values.ixExternalInterfacesConfigurationNames }}
|
|
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }}
|
|
{{- end }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
{{- if or .Values.hostPathVolumes .Values.persistentVolumeClaims }}
|
|
volumeMounts:
|
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
|
- mountPath: {{ $hostPathConfiguration.mountPath }}
|
|
name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
|
readOnly: {{ $hostPathConfiguration.readOnly }}
|
|
{{- end }}
|
|
{{- range $index, $claim := .Values.persistentVolumeClaims }}
|
|
- mountPath: {{ $claim.mountPath }}
|
|
name: ix-pv-{{ $.Release.Name }}-{{ $index }}
|
|
{{- end }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- if .Values.containerCommand }}
|
|
command:
|
|
{{- range .Values.containerCommand }}
|
|
- {{ . | quote}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.containerArgs }}
|
|
args:
|
|
{{- range .Values.containerArgs }}
|
|
- {{ . | quote}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.containerEnvironmentVariables }}
|
|
env:
|
|
{{- range .Values.containerEnvironmentVariables }}
|
|
- name: {{ .name | quote }}
|
|
value: {{ .value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if or .Values.persistentVolumeClaims .Values.hostPathVolumes }}
|
|
volumes:
|
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
|
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
|
hostPath:
|
|
path: {{ $hostPathConfiguration.hostPath }}
|
|
{{- end }}
|
|
{{- range $index, $claim := .Values.persistentVolumeClaims }}
|
|
- name: ix-pv-{{ $.Release.Name }}-{{ $index }}
|
|
persistentVolumeClaim:
|
|
claimName: ix-pv-claim-{{ $.Release.Name }}-{{ $index }}
|
|
{{- end }}
|
|
{{- end }}
|