From 20b9435ad2e600de808f652beabff351cf859007 Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Sat, 1 Mar 2025 16:37:09 +0100 Subject: [PATCH] Add ingress --- whishper/whishper-ingress.yaml | 84 +++++++++++++++++----------------- whisper-webui/app-ingress.yaml | 43 +++++++++++++++++ 2 files changed, 85 insertions(+), 42 deletions(-) create mode 100644 whisper-webui/app-ingress.yaml diff --git a/whishper/whishper-ingress.yaml b/whishper/whishper-ingress.yaml index b9b7a83..bdbf536 100644 --- a/whishper/whishper-ingress.yaml +++ b/whishper/whishper-ingress.yaml @@ -1,43 +1,43 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: whisper-ingress - annotations: - # nginx.ingress.kubernetes.io/rewrite-target: / - cert-manager.io/cluster-issuer: prod-cluster-issuer - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/enable-cors: "true" - # type of authentication - nginx.ingress.kubernetes.io/auth-type: basic - # name of the secret that contains the user/password definitions - nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth - # message to display with an appropriate context why the authentication is required - nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' - nginx.ingress.kubernetes.io/proxy-body-size: "0" - # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" - # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" - # If you encounter a redirect loop or are getting a 307 response code - # then you need to force the nginx ingress to connect to the backend using HTTPS. - # - # nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - # namespace: ente-photos -spec: - ingressClassName: nginx - rules: - - host: alv.hensen.io - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: whishper - port: - number: 8082 +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: whisper-ingress +# annotations: +# # nginx.ingress.kubernetes.io/rewrite-target: / +# cert-manager.io/cluster-issuer: prod-cluster-issuer +# nginx.ingress.kubernetes.io/ssl-passthrough: "false" +# nginx.ingress.kubernetes.io/enable-cors: "true" +# # type of authentication +# nginx.ingress.kubernetes.io/auth-type: basic +# # name of the secret that contains the user/password definitions +# nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth +# # message to display with an appropriate context why the authentication is required +# nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' +# nginx.ingress.kubernetes.io/proxy-body-size: "0" +# # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" +# # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" +# # If you encounter a redirect loop or are getting a 307 response code +# # then you need to force the nginx ingress to connect to the backend using HTTPS. +# # +# # nginx.ingress.kubernetes.io/backend-protocol: "HTTP" +# # namespace: ente-photos +# spec: +# ingressClassName: nginx +# rules: +# - host: alv.hensen.io +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: whishper +# port: +# number: 8082 - # TLS configuration for HTTPS - tls: - # TLS secretName used on ClusterIssuer - - secretName: letsencrypt-prod - hosts: - - alv.hensen.io +# # TLS configuration for HTTPS +# tls: +# # TLS secretName used on ClusterIssuer +# - secretName: letsencrypt-prod +# hosts: +# - alv.hensen.io diff --git a/whisper-webui/app-ingress.yaml b/whisper-webui/app-ingress.yaml new file mode 100644 index 0000000..6bbaff3 --- /dev/null +++ b/whisper-webui/app-ingress.yaml @@ -0,0 +1,43 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: whisper-ingress + annotations: + # nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: prod-cluster-issuer + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/enable-cors: "true" + # type of authentication + nginx.ingress.kubernetes.io/auth-type: basic + # name of the secret that contains the user/password definitions + nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth + # message to display with an appropriate context why the authentication is required + nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' + nginx.ingress.kubernetes.io/proxy-body-size: "0" + # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" + # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" + # If you encounter a redirect loop or are getting a 307 response code + # then you need to force the nginx ingress to connect to the backend using HTTPS. + # + # nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + # namespace: ente-photos +spec: + ingressClassName: nginx + rules: + - host: alv.hensen.io + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: app + port: + number: 7860 + + # TLS configuration for HTTPS + tls: + # TLS secretName used on ClusterIssuer + - secretName: letsencrypt-prod + hosts: + - alv.hensen.io