From f62f836df9cb390dd78945d2ac1113286f9c76d7 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Fri, 6 Sep 2024 01:51:43 +0200 Subject: [PATCH] Add longhorn ingress --- apps/templates/longhorn.yaml | 22 ++++++++++++++++++++++ longhorn/ingress.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 apps/templates/longhorn.yaml create mode 100644 longhorn/ingress.yaml diff --git a/apps/templates/longhorn.yaml b/apps/templates/longhorn.yaml new file mode 100644 index 0000000..99ecc6b --- /dev/null +++ b/apps/templates/longhorn.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: longhorn + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://github.com/rubenhensen/k8scd.git + targetRevision: HEAD + path: longhorn + destination: + server: https://kubernetes.default.svc + namespace: longhorn-system + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true + selfHeal: true \ No newline at end of file diff --git a/longhorn/ingress.yaml b/longhorn/ingress.yaml new file mode 100644 index 0000000..bcb5aed --- /dev/null +++ b/longhorn/ingress.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: longhorn-ingress + namespace: longhorn-system + annotations: + # 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: + - http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: longhorn-frontend + port: + number: 80 \ No newline at end of file