47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
{{- $instance := required "instance is required" .Values.instance -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name | quote }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
|
app.kubernetes.io/instance: {{ $instance | quote }}
|
|
dev.mancave.link/instance: {{ $instance | quote }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
|
dev.mancave.link/instance: {{ $instance | quote }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
|
app.kubernetes.io/instance: {{ $instance | quote }}
|
|
dev.mancave.link/instance: {{ $instance | quote }}
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
volumeMounts:
|
|
- name: source
|
|
mountPath: /usr/share/nginx/html
|
|
subPath: {{ required "sharedVolume.subPath is required" .Values.sharedVolume.subPath | quote }}
|
|
volumes:
|
|
- name: source
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.sharedVolume.claimName | quote }}
|