Skip to content

Commit

Permalink
Update helm-chart/templates/deployment.yaml
Browse files Browse the repository at this point in the history
Co-authored-by: tpetillot <[email protected]>
  • Loading branch information
karimatwa and tpetillot authored Oct 4, 2024
1 parent aec1af2 commit 72ec69c
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,39 @@ metadata:
namespace: {{ .Values.namespace }}
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
{{- with .Values.controlPlane.deploymentLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- toYaml .Values.controlPlane.deploymentLabels | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- with .Values.controlPlane.podLabels }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- toYaml .Values.controlPlane.podLabels | nindent 6 }}
template:
metadata:
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
{{- with .Values.controlPlane.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml .Values.controlPlane.podLabels | nindent 8 }}
spec:
serviceAccountName: "{{ .Values.controlPlane.name }}-service-account"
{{- with .Values.controlPlane.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.controlPlane.nodeSelector }}
{{- toYaml .Values.controlPlane.securityContext | nindent 8 }}
nodeSelector:
{{- toYaml .Values.controlPlane.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.controlPlane.affinity }}
affinity:
{{- toYaml .Values.controlPlane.affinity | nindent 8 }}
{{- end }}
{{- if .Values.controlPlane.tolerations }}
tolerations:
{{- toYaml .Values.controlPlane.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.controlPlane.image.pullSecrets }}
imagePullSecrets:
{{- toYaml .Values.controlPlane.image.pullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.controlPlane.initContainers }}
initContainers:
{{- toYaml .Values.controlPlane.initContainers | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.controlPlane.name }}
image: {{ .Values.controlPlane.image.name }}
imagePullPolicy: {{ .Values.controlPlane.image.pullPolicy }}
command:
{{- toYaml .Values.controlPlane.command | nindent 12 }}
{{- if .Values.controlPlane.env }}
env:
{{- toYaml .Values.controlPlane.env | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.controlPlane.resources | nindent 12 }}
{{- if .Values.privatePackage.enabled }}
Expand All @@ -71,9 +51,7 @@ spec:
- mountPath: {{ .Values.privatePackage.repository.directory }}
name: "{{ .Values.controlPlane.name }}-pv-volume"
{{- end }}
{{- if .Values.controlPlane.volumeMounts }}
{{- toYaml .Values.controlPlane.volumeMounts | nindent 12 }}
{{- end }}
volumes:
- name: "{{ .Values.controlPlane.name }}-conf-volume"
configMap:
Expand All @@ -83,6 +61,5 @@ spec:
persistentVolumeClaim:
claimName: "{{ .Values.controlPlane.name }}-pvc"
{{- end }}
{{- if .Values.controlPlane.volumes }}
{{- toYaml .Values.controlPlane.volumes | nindent 8 }}
{{- end }}

0 comments on commit 72ec69c

Please sign in to comment.