apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: gitea-http
  namespace: gitea
spec:
  parentRefs:
  - name: shared-gateway
    namespace: kube-system
  hostnames:
  - git.oceanbox.io
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: "/"
    backendRefs:
    - name: gitea-http
      port: 3000

---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
  name: gitea-ssh
  namespace: gitea
spec:
  parentRefs:
  - name: shared-gateway
    namespace: kube-system
    sectionName: ssh
  rules:
  - backendRefs:
    - name: gitea-ssh
      port: 22
