From a50f210d52f3294ec8715c649b6ed69a71eb8522 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Sun, 5 May 2024 17:04:30 +0200 Subject: [PATCH] feat(garage): deploy S3 HTTP routes --- garage/kustomization.yaml | 1 + garage/resources/http_routes.yaml | 51 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 garage/resources/http_routes.yaml diff --git a/garage/kustomization.yaml b/garage/kustomization.yaml index 6bfa714..31f09c3 100644 --- a/garage/kustomization.yaml +++ b/garage/kustomization.yaml @@ -22,6 +22,7 @@ resources: - resources/secret.rpc.yaml - resources/workload.yaml - resources/services.yaml + - resources/http_routes.yaml configMapGenerator: - name: garage-config diff --git a/garage/resources/http_routes.yaml b/garage/resources/http_routes.yaml new file mode 100644 index 0000000..187ba42 --- /dev/null +++ b/garage/resources/http_routes.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: garage-s3-http +spec: + parentRefs: + - name: contour + sectionName: http + namespace: projectcontour + hostnames: + - "s3.icb4dc0.de" + - "*.s3.icb4dc0.de" + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: garage-s3-https +spec: + parentRefs: + - name: contour + sectionName: https + namespace: projectcontour + hostnames: + - "s3.icb4dc0.de" + rules: + - backendRefs: + - name: garage + port: 3900 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: garage-s3-subdomains-https +spec: + parentRefs: + - name: contour + sectionName: garage-s3-subdomains + namespace: projectcontour + hostnames: + - "*.s3.icb4dc0.de" + rules: + - backendRefs: + - name: garage + port: 3900 \ No newline at end of file