apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/auth-signin: https://$host/oauth2/start?rd=$escaped_request_uri
    nginx.ingress.kubernetes.io/auth-url: https://$host/oauth2/auth
    oceanbox.io/expose: internal
  name: hubble-ui
  namespace: kube-system
spec:
  ingressClassName: nginx
  rules:
    - host: hubble.hel1.oceanbox.io
      http:
        paths:
          - backend:
              service:
                name: hubble-ui
                port:
                  number: 80
            path: /
            pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    nginx.ingress.kubernetes.io/proxy-buffer-size: 8k
    nginx.ingress.kubernetes.io/proxy-busy-buffers-size: 16k
    oceanbox.io/expose: internal
  name: hubble-ui-oauth2-proxy
  namespace: kube-system
spec:
  ingressClassName: nginx
  rules:
    - host: hubble.hel1.oceanbox.io
      http:
        paths:
          - backend:
              service:
                name: oauth2-proxy
                port:
                  name: http
            path: /oauth2
            pathType: Prefix
  tls:
    - hosts:
        - hubble.hel1.oceanbox.io
      secretName: hubble-tls
