2021-06-19 17:58:09 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ .Release.Name }}-https
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-06-19 21:38:52 +00:00
|
|
|
nginx: {{ .Release.Name }}
|
2021-06-19 17:58:09 +00:00
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-06-19 18:18:29 +00:00
|
|
|
app: {{ .Release.Name }}
|
2021-06-19 21:38:52 +00:00
|
|
|
nginx: {{ .Release.Name }}
|
2021-06-19 17:58:09 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.21.0-alpine
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
- containerPort: 443
|
|
|
|
volumeMounts:
|
2021-06-19 18:11:19 +00:00
|
|
|
- name: nginx-config
|
2021-06-19 17:58:09 +00:00
|
|
|
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:
|
2021-06-19 18:11:19 +00:00
|
|
|
name: {{ .Release.Name }}-{{ .Values.serviceName }}
|
2021-06-19 17:58:09 +00:00
|
|
|
labels:
|
2021-06-19 18:11:19 +00:00
|
|
|
app: {{ .Release.Name }}-{{ .Values.serviceName }}
|
2021-06-19 17:58:09 +00:00
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
name: http
|
|
|
|
- port: 443
|
|
|
|
name: https
|
|
|
|
selector:
|
2021-06-19 18:18:29 +00:00
|
|
|
app: {{ .Release.Name }}
|