From ed7cf68762628f88af3ee252fa3ac2940e7a3ac3 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Fri, 22 Nov 2024 18:29:47 +0100 Subject: [PATCH] feat(ente): deploy s3 proxy HTTPS route --- ente/resources/cors-proxy/spinapp.yaml | 2 +- ente/resources/http_routes.yaml | 96 +++++++++++++++----------- 2 files changed, 57 insertions(+), 41 deletions(-) diff --git a/ente/resources/cors-proxy/spinapp.yaml b/ente/resources/cors-proxy/spinapp.yaml index 10b42c7..822e90e 100644 --- a/ente/resources/cors-proxy/spinapp.yaml +++ b/ente/resources/cors-proxy/spinapp.yaml @@ -4,7 +4,7 @@ metadata: name: s3-cors-proxy spec: image: "code.icb4dc0.de/infrastructure/functions:latest" - executor: containerd-shim-spin + executor: ente-containerd-shim-spin replicas: 2 variables: - name: s3_endpoint_url diff --git a/ente/resources/http_routes.yaml b/ente/resources/http_routes.yaml index f33c1f5..f58fbb7 100644 --- a/ente/resources/http_routes.yaml +++ b/ente/resources/http_routes.yaml @@ -5,20 +5,36 @@ metadata: name: http spec: parentRefs: - - name: contour - sectionName: http - namespace: projectcontour + - name: contour + sectionName: http + namespace: projectcontour hostnames: - - ente.icb4dc0.de - - api.ente.icb4dc0.de - - albums.ente.icb4dc0.de - - cast.ente.icb4dc0.de + - ente.icb4dc0.de + - api.ente.icb4dc0.de + - albums.ente.icb4dc0.de + - cast.ente.icb4dc0.de rules: - - filters: - - type: RequestRedirect - requestRedirect: - scheme: https - statusCode: 301 + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: s3-api +spec: + parentRefs: + - name: contour + sectionName: ente-endpoints + namespace: projectcontour + hostnames: + - s3.ente.icb4dc0.de + rules: + - backendRefs: + - name: ente-s3-cors-proxy + port: 80 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -26,15 +42,15 @@ metadata: name: https-api spec: parentRefs: - - name: contour - sectionName: ente-endpoints - namespace: projectcontour + - name: contour + sectionName: ente-endpoints + namespace: projectcontour hostnames: - - api.ente.icb4dc0.de + - api.ente.icb4dc0.de rules: - - backendRefs: - - name: ente-museum - port: 8080 + - backendRefs: + - name: ente-museum + port: 8080 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -42,15 +58,15 @@ metadata: name: https-photos spec: parentRefs: - - name: contour - sectionName: https - namespace: projectcontour + - name: contour + sectionName: https + namespace: projectcontour hostnames: - - ente.icb4dc0.de + - ente.icb4dc0.de rules: - - backendRefs: - - name: ente-photos - port: 3000 + - backendRefs: + - name: ente-photos + port: 3000 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -58,15 +74,15 @@ metadata: name: https-albums spec: parentRefs: - - name: contour - sectionName: ente-endpoints - namespace: projectcontour + - name: contour + sectionName: ente-endpoints + namespace: projectcontour hostnames: - - albums.ente.icb4dc0.de + - albums.ente.icb4dc0.de rules: - - backendRefs: - - name: ente-photos - port: 3000 + - backendRefs: + - name: ente-photos + port: 3000 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute @@ -74,12 +90,12 @@ metadata: name: https-cast spec: parentRefs: - - name: contour - sectionName: ente-endpoints - namespace: projectcontour + - name: contour + sectionName: ente-endpoints + namespace: projectcontour hostnames: - - cast.ente.icb4dc0.de + - cast.ente.icb4dc0.de rules: - - backendRefs: - - name: ente-cast - port: 3000 \ No newline at end of file + - backendRefs: + - name: ente-cast + port: 3000