diff --git a/garage/kustomization.yaml b/garage/kustomization.yaml index 31f09c3..8d1d5b5 100644 --- a/garage/kustomization.yaml +++ b/garage/kustomization.yaml @@ -22,7 +22,8 @@ resources: - resources/secret.rpc.yaml - resources/workload.yaml - resources/services.yaml - - resources/http_routes.yaml + - resources/api_routes.yaml + - resources/web_routes.yaml configMapGenerator: - name: garage-config diff --git a/garage/resources/http_routes.yaml b/garage/resources/api_routes.yaml similarity index 100% rename from garage/resources/http_routes.yaml rename to garage/resources/api_routes.yaml diff --git a/garage/resources/web_routes.yaml b/garage/resources/web_routes.yaml new file mode 100644 index 0000000..feb171d --- /dev/null +++ b/garage/resources/web_routes.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: garage-web-http +spec: + parentRefs: + - name: contour + sectionName: http + namespace: projectcontour + hostnames: + - "www.icb4dc0.de" + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: garage-blog-https +spec: + parentRefs: + - name: contour + sectionName: https + namespace: projectcontour + hostnames: + - "www.icb4dc0.de" + rules: + - filters: + - type: URLRewrite + urlRewrite: + hostname: blog.icb4dc0.de + backendRefs: + - name: garage + port: 3902 \ No newline at end of file