# services/cassandra/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: cassandra
  namespace: cassandra
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
spec:
  ingressClassName: traefik
  tls:
    - hosts: ["cassandra.bstein.dev"]
      secretName: cassandra-tls
  rules:
    - host: cassandra.bstein.dev
      http:
        paths:
          - path: /api
            pathType: Prefix
            backend:
              service:
                name: cassandra-backend
                port:
                  number: 80
          - path: /events
            pathType: Prefix
            backend:
              service:
                name: cassandra-backend
                port:
                  number: 80
          - path: /ws
            pathType: Prefix
            backend:
              service:
                name: cassandra-backend
                port:
                  number: 80
          - path: /
            pathType: Prefix
            backend:
              service:
                name: cassandra-frontend
                port:
                  number: 80
