kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.8k stars 343 forks source link

MeshService for delegated gateway shows unavailable #12746

Open lukidzi opened 3 months ago

lukidzi commented 3 months ago

Kuma Version

master

Describe the bug

I followed the Delegated Gateway guide and successfully deployed a delegated gateway. However, after deployment, I checked the UI and noticed that the MeshService status is marked as Unavailable. I understand that the service does not directly communicate with the gateway, but this status is misleading and might suggest that the gateway is not deployed correctly.

traffic works:

~ $ curl -XPOST 172.21.3.1:80/increment
{"counter":7,"zone":"local","err":null}~ $
type: MeshService
mesh: default
name: kong-gateway-proxy.kong
labels:
  app.kubernetes.io/instance: kong
  app.kubernetes.io/managed-by: Helm
  app.kubernetes.io/name: gateway
  app.kubernetes.io/version: '3.8'
  enable-metrics: 'true'
  helm.sh/chart: gateway-2.46.0
  k8s.kuma.io/is-headless-service: 'false'
  k8s.kuma.io/namespace: kong
  k8s.kuma.io/service-name: kong-gateway-proxy
  kuma.io/display-name: kong-gateway-proxy
  kuma.io/env: kubernetes
  kuma.io/managed-by: k8s-controller
  kuma.io/mesh: default
  kuma.io/origin: zone
  kuma.io/zone: default
spec:
  state: Unavailable
  selector:
    dataplaneTags:
      app.kubernetes.io/component: app
      app.kubernetes.io/instance: kong
      app.kubernetes.io/name: gateway
      k8s.kuma.io/namespace: kong
  ports:
    - name: kong-proxy
      port: 80
      targetPort: 8000
      appProtocol: tcp
    - name: kong-proxy-tls
      port: 443
      targetPort: 8443
      appProtocol: tcp
status:
  vips:
    - ip: 10.43.99.250
  tls:
    status: Ready
  dataplaneProxies: {}
Image

To Reproduce

Follow the guide https://kuma.io/docs/2.9.x/guides/gateway-delegated/

Expected behavior

The gateway is shown as a healthy or MeshService for gateway is not generated since it should be an entry point and doesn't need to be tracked (cross mesh is not supported with MS for now)

Additional context (optional)

No response

lukidzi commented 3 months ago
  1. Controller services were incorrect because of kuma.io/gateway
  2. other services shouldn't be visible because we shouldn't generate MeshServices for delegated gateways https://github.com/kumahq/kuma/blob/master/pkg/plugins/runtime/k8s/controllers/meshservice_controller.go#L130 but the problem is that kuma.io/gateway is on deployment so we are not aware of it on the service
github-actions[bot] commented 5 days ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.