apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: HTTP
  name: prometheus-grafana
  namespace: ${NAMESPACE}
spec:
  # tls:
  # - hosts:
  #   - ${PROMETHEUS_HOSTNAME}
  #   - ${GRAFANA_HOSTNAME}
  rules:
    - host: ${PROMETHEUS_HOSTNAME}
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: prometheus-kube-prometheus-prometheus
              port:
                number: 9090
    - host: ${GRAFANA_HOSTNAME}
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: prometheus-grafana
              port:
                number: 80
