2024-11-14 08:13:40 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ .Release.Name }}
|
|
|
|
labels:
|
|
|
|
{{- include "basic-app.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "basic-app.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
{{- include "basic-app.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: /data
|
2024-11-14 08:25:23 +01:00
|
|
|
env:
|
|
|
|
{{- with .Values.env.plain }}
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range .Values.env.configMapKeys }}
|
|
|
|
- name: {{ .name }}
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: {{ .configMapName }}
|
|
|
|
key: {{ .key }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range .Values.env.secretKeys }}
|
|
|
|
- name: {{ .name }}
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: {{ .secretName }}
|
|
|
|
key: {{ .key }}
|
|
|
|
{{- end }}
|
|
|
|
envFrom:
|
|
|
|
{{- range .Values.env.configMapRefs }}
|
|
|
|
- configMapRef:
|
|
|
|
name: {{ .name }}
|
|
|
|
optional: {{ .optional | default false }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range .Values.env.secretRefs }}
|
|
|
|
- secretRef:
|
|
|
|
name: {{ .name }}
|
|
|
|
optional: {{ .optional | default false }}
|
|
|
|
{{- end }}
|
2024-11-14 08:13:40 +01:00
|
|
|
volumes:
|
|
|
|
- name: data
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Release.Name }}-pvc
|
|
|
|
|