Skip to content

Commit a036c1f

Browse files
vitkyrkaclaude
andcommitted
velero: document the single-node assumption in kube_discovery
The agent pod is pinned to its own node via DD_KUBERNETES_KUBELET_HOST/NODENAME, correct Kubelet-AD semantics, but it means this helper only produces complete results when discovery targets share a node with the agent pod. That holds for velero's single-node kind cluster today, but the module bills itself as generic scaffolding for future kind-based integrations without mentioning the constraint. Document it so a future multi-node adopter doesn't have to rediscover it from a flaky failure. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 260ad26 commit a036c1f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

datadog_checks_dev/datadog_checks/dev/kube_discovery.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
``kubectl exec`` against a sleeping, RBAC-scoped Agent pod, rather than a normal long-running Agent.
88
There is no Kubernetes equivalent of ``mount_logs``/``shared_logs()`` here: there is no host
99
bind-mount channel into a cluster pod.
10+
11+
The agent pod is pinned to its own node (see the ``DD_KUBERNETES_KUBELET_HOST``/``NODENAME`` env
12+
vars in ``build_agent_pod_manifest``), matching real Kubelet-AD semantics: it only sees pods
13+
scheduled on that same node. This assumes a single-node ``kind`` cluster, or that discovery targets
14+
are pinned to the same node as the agent pod.
1015
"""
1116

1217
import json

0 commit comments

Comments
 (0)