Skip to content

test(k8s): confirm gpu-feature-discovery network and GPU labels #6321

Not planned

Description

@devops-cli-service

Split from #6109.

The main change adds a default-deny NetworkPolicy for default/gpu-feature-discovery and removes the kube-linter exception. No one has observed the connections of the pod on a GPU node. A GPU node with the NVIDIA device plugin and node-feature-discovery is not available to the implementation job, so this check waits on that hardware. Acceptance criteria: 1. Run Inspektor Gadget on a GPU node and record the connections that the pod opens. 2. The recorded connections are none; if not, update the NetworkPolicy to allow only them. 3. Restart the pod and show that each GPU label of the node stays. 4. uv run devops k8s lint still passes.

Proposed design

Problem statement

The change of #6109 adds a default-deny NetworkPolicy for default/gpu-feature-discovery and removes its kube-linter exception. No one has observed the connections of that pod on a GPU node. This item records the trace on the GPU node condor, checks the applied policy against the trace, restarts the pod, and confirms that the GPU labels and uv run devops k8s lint stay correct.

Acceptance criteria

Requirement: trace-network-on-condor

The pod default/gpu-feature-discovery SHALL open no network connection on the GPU node condor.

Scenario: Trace of the pod on the node condor

  • WHEN A person runs kubectl gadget run trace_network -n default --podname gpu-feature-discovery --node condor with the homelab-k3s kube context for one full cycle of the pod and records the output in the change folder.
  • THEN The recorded output holds no event in which the pod is the source of a connection.

Requirement: policy-matches-trace

The NetworkPolicy that selects the pods of default/gpu-feature-discovery MUST allow only the connections that the trace records.

Scenario: The applied policy agrees with the recorded trace

  • WHEN A person runs kubectl get networkpolicy -n default -o yaml and compares each ingress rule of the policy that selects default/gpu-feature-discovery with the recorded trace.
  • THEN Each traced connection matches an ingress rule of the policy, and no connection that the trace does not record matches an ingress rule.

Requirement: restart-keeps-gpu-labels

A restart of the pod default/gpu-feature-discovery MUST keep each GPU label that node-feature-discovery sets on the node condor.

Scenario: Rollout restart of the pod on the node condor

  • WHEN A person reads kubectl get node condor -o json, runs kubectl rollout restart daemonset/gpu-feature-discovery -n default, waits for kubectl rollout status daemonset/gpu-feature-discovery -n default, and reads kubectl get node condor -o json again.
  • THEN Each nvidia.com/gpu.* label and each feature.node.kubernetes.io/* label has the same value in both reads.

Requirement: lint-without-exception

The environment tree k8s/ MUST pass uv run devops k8s lint with no non-isolated-pod exception for default/gpu-feature-discovery.

Scenario: Lint of the environment tree

Existing Tool Considered

No alternatives check has run. Inspektor Gadget (https://github.com/inspektor-gadget/inspektor-gadget) is the open, maintained CNCF tool that covers the need. Its trace_network gadget records the connections of one named pod on one node. It has no access to the GPU node, the kube context of the home cluster or the node labels. The proposal runs the gadget by hand on condor and reads the labels with kubectl get node condor -o json. The item builds no code, so it gives no cost to build and keep.

Key questions

  • What does this check wait on: the change of fix(k8s): Put a NetworkPolicy on gpu-feature-discovery #6109, a GPU node, or both?: Both. The repository holds no NetworkPolicy for default/gpu-feature-discovery: k8s/gpu-feature-discovery/kustomization.yaml lists only daemonset.yaml, so the policy that fix(k8s): Put a NetworkPolicy on gpu-feature-discovery #6109 adds must merge first. The trace also needs the GPU node condor, which the implementation job cannot reach. The home cluster has condor (2 RTX 3090) and hawk (RTX 5070 Ti). The archived design of fix(k8s): the ebpf profiler skips hawk #3784 keeps the eBPF profiler off hawk. The trace therefore runs on condor. [sources: k8s/gpu-feature-discovery/kustomization.yaml, openspec/changes/archive/2026-10-31-2822-raise-condor-hawk-context/proposal.md, openspec/changes/archive/2026-11-06-3784-ebpf-profiler-skips-hawk/design.md]
  • Which tool records the connections that the pod opens?: Inspektor Gadget, with its trace_network gadget. It is an open, maintained CNCF project, it names the pod in the trace, and it needs no change to the cluster. It reads no node label, so kubectl get node condor -o json reads the labels. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
    • Chosen: Inspektor Gadget trace_network. Open and maintained, it traces one named pod, and the item builds no code.
    • Rejected: Cilium Hubble. It reads only the flows of Cilium, and the environment tree of this cluster deploys no Cilium.
    • Rejected: A privileged kubectl debug node/... pod with tcpdump. It traces the interfaces of the node, not the connections of one pod, and it needs a privileged pod and a tcpdump image.
    • Rejected: A guess from the manifest. ADR 0005 admits no finding or result from a model, and a guess is no observation of the pod.
  • Which command reads the GPU labels of the node before and after the restart?: kubectl get node condor -o json. gpu-feature-discovery writes the features of the node into the feature directory that node-feature-discovery reads. node-feature-discovery sets the node labels from it. The same read before and after the restart shows whether each label stayed. [sources: k8s/gpu-feature-discovery/daemonset.yaml]
  • Is the confirmation a new devops k8s command or a repeatable manual check?: A repeatable manual check that a person runs once on the GPU node. No schedule and no digest bump repeats it, so a command would add code, tests and error paths for one observation. The change folder records the commands and their output. (best practice) [sources: CONTEXT.md, k8s/README.md]
    • Chosen: Repeatable manual check. It runs once on hardware that the implementation job cannot reach, and no recurring trigger exists.
    • Rejected: A new devops k8s gpu-check command. It adds a command, its tests and its error paths for one confirmation that no trigger repeats.
    • Rejected: No check, read the manifest. The item exists because no one observed the connections, and a manifest cannot show them.
  • Who runs the live check on the GPU node?: The owner, or a person who holds the kube context of the home cluster (homelab-k3s), because the implementation job has no access to that cluster. Recommendation: run the trace on condor, and put the trace and the two node reads into the change folder. (a person decides) [sources: k8s/README.md]
  • What does the change do when the trace records a connection?: It adds one ingress rule for each traced connection to the NetworkPolicy that fix(k8s): Put a NetworkPolicy on gpu-feature-discovery #6109 adds, and no other rule. It records the trace and the policy in the change folder. When the trace records none, the policy stays default-deny. (best practice) [sources: k8s/gpu-feature-discovery/kustomization.yaml, docs/adr/0005-review-findings-come-from-tools-not-models.md]
    • Chosen: Update the policy only from the trace. The trace is the observation that the item exists to make.
    • Rejected: Keep the policy default-deny without a trace. The item must show that the pod opens no connection.
    • Rejected: Allow a guessed set of connections. ADR 0005 admits no finding or result from a model, and a guess is no observation.

Open questions

  • Who runs the live check on the GPU node? (a person decides)

Fit

Fits in one pull request.

Suspected block

A person with the homelab-k3s kube context runs the trace and the restart on the GPU node condor of the home cluster: the implementation job cannot reach that cluster.

Dependencies

#6109

Activity

  1. added
    type/test
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/medium
    on Nov 18, 2026
  2. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor
  3. changed the title [-]test(k8s): confirm gpu-feature-discovery network and GPU labels on a GPU node[/-] [+]test(k8s): confirm gpu-feature-discovery network and GPU labels[/+] on Nov 18, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 66 characters, and the limit is 60. The type and the scope stay.

    • Before: test(k8s): confirm gpu-feature-discovery network and GPU labels on a GPU node
    • After: test(k8s): confirm gpu-feature-discovery network and GPU labels
    • Source of the summary: the background model
  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  6. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. dan-petty commented on Nov 25, 2026

    @dan-petty
    Owner

    Superseded by #7252: gpu-feature-discovery labelled nothing, and it is removed from the cluster (dan-petty/homelab#234) and from deploy-stack (#7253). Its copy of the manifest in this repository goes with step 17 of #5134.

  8. removed
    status/new
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions