apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: akb-ingress
spec:
  tls:
  - hosts:
    - $(MAIN_HOSTED_ZONE)
    - "kibana.$(MAIN_HOSTED_ZONE)"
    - "cerbes.$(MAIN_HOSTED_ZONE)"
    - "aristaeus.$(MAIN_HOSTED_ZONE)"
    - "rbmq.$(MAIN_HOSTED_ZONE)"
    secretName: akingbee-tls

  rules:
  - host: "$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: poseidon
            port:
              number: 9000

  - host: "cerbes.$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: cerbes-api
            port:
              number: 9001

  - host: "aristaeus.$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: aristaeus-api
            port:
              number: 9002

  - host: "kibana.$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: kibana
            port:
              number: 5601

  - host: "rbmq.$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: rbmq
            port:
              number: 15672