Implement ingress and letsencrypt issuers

This commit is contained in:
roschaefer 2019-09-18 02:12:50 +02:00
parent 6e0b7c86e1
commit 2363c285e1
4 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,31 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
certmanager.k8s.io/issuer: {{ .Values.letsencryptIssuer }}
certmanager.k8s.io/acme-challenge-type: http01
nginx.ingress.kubernetes.io/proxy-body-size: 6m
spec:
tls:
- hosts:
- {{ .Values.humanConnectionDomain }}
secretName: tls
rules:
- host: {{ .Values.humanConnectionDomain }}
http:
paths:
- path: /
backend:
serviceName: webapp
servicePort: 3000
{{- if .Values.developmentMailserverDomain }}
- host: {{ .Values.developmentMailserverDomain }}
http:
paths:
- path: /
backend:
serviceName: {{ .Release.Name }}-mailserver
servicePort: 80
{{- end }}

View File

@ -0,0 +1,11 @@
apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
name: {{ .Release.Name }}-letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: {{ .Values.supportEmail }}
privateKeySecretRef:
name: letsencrypt-prod
http01: {}

View File

@ -0,0 +1,11 @@
apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
name: {{ .Release.Name }}-letsencrypt-staging
spec:
acme:
server: https://acme-staging-v02.api.letsencrypt.org/directory
email: {{ .Values.supportEmail }}
privateKeySecretRef:
name: letsencrypt-staging
http01: {}

View File

@ -3,7 +3,10 @@ commit: 889a7cdd24dda04a139b2b77d626e984d6db6781
pullPolicy: Always
# configs
developmentMailserverDomain: "nitro-mailserver.human-connection.org"
developmentMailserverDomain: "helm-nitro-mailserver.human-connection.org"
humanConnectionDomain: "helm-staging.human-connection.org"
supportEmail: "developer@human-connection.org"
letsencryptIssuer: "letsencrypt-staging"
smtpHost: "mailserver.human-connection"
smtpPort: "25"
smtpUsername: