ungleich-k8s/apps/nginx-certbot-helm/templates/deployment.yaml
Nico Schottelius 1a581f0bfd Fix labeling
2021-06-19 23:38:52 +02:00

55 lines
1.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-https
spec:
selector:
matchLabels:
nginx: {{ .Release.Name }}
replicas: 1
template:
metadata:
labels:
app: {{ .Release.Name }}
nginx: {{ .Release.Name }}
spec:
containers:
- name: nginx
image: nginx:1.21.0-alpine
ports:
- containerPort: 80
- containerPort: 443
volumeMounts:
- name: nginx-config
mountPath: "/etc/nginx/conf.d/"
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
- name: webroot
mountPath: "/usr/share/nginx/html"
volumes:
- name: nginx-config
configMap:
name: {{ .Release.Name }}-nginx-config
- name: etcletsencrypt
persistentVolumeClaim:
claimName: {{ .Release.Name }}-letsencrypt-certs
- name: webroot
persistentVolumeClaim:
claimName: {{ .Release.Name }}-webroot
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-{{ .Values.serviceName }}
labels:
app: {{ .Release.Name }}-{{ .Values.serviceName }}
spec:
type: ClusterIP
ports:
- port: 80
name: http
- port: 443
name: https
selector:
app: {{ .Release.Name }}