---
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