8000
Skip to content

NDS nametable missing multi-family Pod IPs for headless svcs entries #58397

Description

@leosarra

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use Istio

Bug Description

When you have a headless service and Istio NDS builds the NameTable, it does not properly account for the scenario where there are multiple endpoint instances with different IPs for the same pod in the same cluster.

See the dump from /debug/ndsz, and note how simple-internal-httpd-server-0.simple-internal-httpd-server-headless.istio-mt-esarleo-0.svc.cluster.local only provides a single IP for the pod (statefulset, even though it has multiple addresses.

{
    "configs": [
        {
            "@type": "type.googleapis.com/istio.networking.nds.v1.NameTable",
            "table": {
                "istio-egressgateway.istio-mt-esarleo-0.svc.cluster.local": {
                    "ips": [
                        "10.107.38.157"
                    ],
                    "registry": "Kubernetes",
                    "shortname": "istio-egressgateway",
                    "namespace": "istio-mt-esarleo-0"
                },
                "istio-ingressgateway.istio-mt-esarleo-0.svc.cluster.local": {
                    "ips": [
                        "2001:db8:42:1::21ce"
                    ],
                    "registry": "Kubernetes",
                    "shortname": "istio-ingressgateway",
                    "namespace": "istio-mt-esarleo-0"
                },
                "istiod.istio-mt-esarleo-0.svc.cluster.local": {
                    "ips": [
                        "10.108.47.127"
                    ],
                    "registry": "Kubernetes",
                    "shortname": "istiod",
                    "namespace": "istio-mt-esarleo-0"
                },
                "simple-internal-httpd-server-0.simple-internal-httpd-server-headless.istio-mt-esarleo-0.svc.cluster.local": {
                    "ips": [
                        "10.244.0.47"
                    ],
                    "registry": "Kubernetes",
                    "shortname": "simple-internal-httpd-server-0.simple-internal-httpd-server-headless",
                    "namespace": "istio-mt-esarleo-0"
                },
                "simple-internal-httpd-server-headless.istio-mt-esarleo-0.svc.cluster.local": {
                    "ips": [
                        "2001:db8:42::2f",
                        "10.244.0.47"
                    ],
                    "registry": "Kubernetes",
                    "shortname": "simple-internal-httpd-server-headless",
                    "namespace": "istio-mt-esarleo-0"
                },
            }
        }
    ]
}

Version

control plane version: 1.28.0

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0