From 93da61895fca9a163c166a63cc8c3160748e644f Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Mon, 13 Apr 2020 22:48:30 +0200 Subject: [PATCH] Adding htaccess for longhorn ui --- .../longhorn-htpasswd.secret.yaml | Bin 0 -> 210 bytes k8s/longhorn-system/longhorn-ingress.yaml | 47 ++++++++++-------- 2 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 k8s/longhorn-system/longhorn-htpasswd.secret.yaml diff --git a/k8s/longhorn-system/longhorn-htpasswd.secret.yaml b/k8s/longhorn-system/longhorn-htpasswd.secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..da2694c7c9539247b9e04aadc2af5bd331727523 GIT binary patch literal 210 zcmV;@04@IjM@dveQdv+`0K!f+_Jfs3OZ%|o?7wV5?j{d4r?RXtf1?8mFVS||@k`n# z8G8fWebhuGkjfNv7iX8v*P}MCYj3Pc5-BDbA#=D(4VI$JH7P4q#S^j5dcA;nH3GyC zL)q6y!&UW6&Sl0fXLIFn$_TAeP-%N&;qhyOZ+5BuqR^=F1Q)89U&>HPp?wh%;G$gi3W@DKJH M@Fx#CSZ}4|gf9SMG5`Po literal 0 HcmV?d00001 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