diff --git a/k8s/longhorn-system/longhorn-htpasswd.secret.yaml b/k8s/longhorn-system/longhorn-htpasswd.secret.yaml new file mode 100644 index 0000000..da2694c Binary files /dev/null and b/k8s/longhorn-system/longhorn-htpasswd.secret.yaml differ diff --git a/k8s/longhorn-system/longhorn-ingress.yaml b/k8s/longhorn-system/longhorn-ingress.yaml index 6f08d5f..d6abde2 100644 --- a/k8s/longhorn-system/longhorn-ingress.yaml +++ b/k8s/longhorn-system/longhorn-ingress.yaml @@ -1,25 +1,28 @@ # ### status: works, but is not secure -# apiVersion: extensions/v1beta1 -# kind: Ingress -# metadata: -# name: longhorn-frontend -# namespace: longhorn-system -# annotations: -# kubernetes.io/ingress.class: "nginx" -# nginx.ingress.kubernetes.io/force-ssl-redirect: "true" -# cert-manager.io/cluster-issuer: "letsencrypt-prod" -# spec: -# tls: -# - hosts: -# - "longhorn.haumdaucher.de" -# secretName: longhorn-haumdaucher-de -# rules: -# - host: longhorn.haumdaucher.de -# http: -# paths: -# - path: / -# backend: -# serviceName: longhorn-frontend -# servicePort: 80 \ No newline at end of file +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: longhorn-frontend + namespace: longhorn-system + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/auth-type: basic + nginx.ingress.kubernetes.io/auth-secret: htpasswd + nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - ok" +spec: + tls: + - hosts: + - "longhorn.haumdaucher.de" + secretName: longhorn-haumdaucher-de + rules: + - host: longhorn.haumdaucher.de + http: + paths: + - path: / + backend: + serviceName: longhorn-frontend + servicePort: 80 \ No newline at end of file