39 lines
865 B
YAML
39 lines
865 B
YAML
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: ovpn-admin
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
nginx.ingress.kubernetes.io/backend-protocol: HTTP
|
|
nginx.ingress.kubernetes.io/auth-type: basic
|
|
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
|
|
nginx.ingress.kubernetes.io/auth-secret: basic-auth
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.domain }}
|
|
secretName: ingress-tls
|
|
rules:
|
|
- host: {{ .Values.domain }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: ovpn-admin
|
|
port:
|
|
name: http
|
|
---
|
|
apiVersion: cert-manager.io/v1
|
|
kind: Certificate
|
|
metadata:
|
|
name: ovpn-admin
|
|
spec:
|
|
secretName: ingress-tls
|
|
dnsNames:
|
|
- {{ .Values.domain }}
|
|
issuerRef:
|
|
name: letsencrypt
|
|
kind: ClusterIssuer
|