From 268efbbe8bfbdcbdf7ffecba34a4e2c2746fcf54 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 6 Aug 2024 18:00:04 -0500 Subject: [PATCH] Add ingress for Longhorn --- clusters/my-cluster/longhorn/ingress.yaml | 31 +++++++++++++++++++ .../my-cluster/longhorn/kustomization.yaml | 1 + 2 files changed, 32 insertions(+) create mode 100644 clusters/my-cluster/longhorn/ingress.yaml diff --git a/clusters/my-cluster/longhorn/ingress.yaml b/clusters/my-cluster/longhorn/ingress.yaml new file mode 100644 index 0000000..a67ccc4 --- /dev/null +++ b/clusters/my-cluster/longhorn/ingress.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: longhorn-ingress + namespace: longhorn-system + annotations: + kubernetes.io/ingress.class: nginx + # type of authentication + nginx.ingress.kubernetes.io/auth-type: basic + # prevent the controller from redirecting (308) to HTTPS + nginx.ingress.kubernetes.io/ssl-redirect: 'false' + # name of the secret that contains the user/password definitions + nginx.ingress.kubernetes.io/auth-secret: basic-auth + # message to display with an appropriate context why the authentication is required + nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' + # custom max body size for file uploading like backing image uploading + nginx.ingress.kubernetes.io/proxy-body-size: 10000m +spec: + rules: + - host: longhorn-ui.lab.kill0.net + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: longhorn-frontend + port: + number: 80 + ingressClassName: nginx diff --git a/clusters/my-cluster/longhorn/kustomization.yaml b/clusters/my-cluster/longhorn/kustomization.yaml index bae9dd2..d945eb5 100644 --- a/clusters/my-cluster/longhorn/kustomization.yaml +++ b/clusters/my-cluster/longhorn/kustomization.yaml @@ -3,3 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - https://raw.githubusercontent.com/longhorn/longhorn/v1.6.2/deploy/longhorn.yaml + - ingress.yaml