Skip to content

build(k8s): move gpu-feature-discovery out of the default namespace #6628

Not planned

Description

@dan-petty

Problem

k8s/gpu-feature-discovery/daemonset.yaml line 5 puts the gpu-feature-discovery DaemonSet in the default namespace. The Argo CD application (k8s/argocd/apps/gpu-feature-discovery.yaml line 18) and the AppProject destination (k8s/argocd/apps/projects.yaml line 177) also name default. k8s/namespaces.yaml does not define this namespace, so it gets no Pod Security label and none of the settings of the other project namespaces. Best practice is to run no workload in default.

#6615 scopes the cluster facts of the project review to the namespaces that k8s/namespaces.yaml defines. default stays out of that list, because workloads that are not from this repository can run there. Thus the project review does not see the restarts, the memory or the CPU throttle of gpu-feature-discovery.

Expected

  • gpu-feature-discovery runs in its own namespace. k8s/namespaces.yaml defines it with the labels of the other namespaces.
  • The Argo CD application and the AppProject destination name the new namespace.

Acceptance criteria

  • uv run devops ci --check --only k8s passes.
  • Live check after the Argo CD sync: kubectl get ds -A shows gpu-feature-discovery in the new namespace only, all its pods are Ready, and each GPU node keeps its gpu-feature-discovery labels.
  • After fix(roadmap): keep other projects' workload names out of the review #6615 merges, the default list of project review namespaces holds the new namespace.

Dependencies

None.

Related

Source

Source: #6586

Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches for namespace-migration and namespace-policy tooling returned only unrelated web-platform documentation; no tool moves a DaemonSet, adds its namespace manifest with Pod Security labels, or updates the Argo CD destination.

Lacks:

Proposed design

Problem statement

k8s/gpu-feature-discovery/daemonset.yaml runs gpu-feature-discovery in the default namespace, which k8s/namespaces.yaml does not define, so the workload gets no Pod Security label and no project review coverage. The environment tree moved to dan-petty/homelab, so this repository cannot edit those manifests. This issue adds gpu-feature-discovery to the default list of project review namespaces in src/devops_cli/config/defaults.py, after the homelab pull request merges.

Acceptance criteria

Requirement: Default project review namespaces hold gpu-feature-discovery

DEFAULT_ROADMAP_PROJECT_REVIEW_NAMESPACES in src/devops_cli/config/defaults.py SHALL hold the name gpu-feature-discovery.

Scenario: The default list holds the namespace

  • WHEN A test imports DEFAULT_ROADMAP_PROJECT_REVIEW_NAMESPACES from devops_cli.config.defaults.
  • THEN The value holds gpu-feature-discovery.

Requirement: A project with no override reviews the new namespace

A project that sets no project review namespaces MUST resolve its review namespaces to the default list that holds gpu-feature-discovery.

Scenario: No override resolves to the default list

  • WHEN A test resolves the project review namespaces of a project that sets none.
  • THEN The resolved namespaces hold gpu-feature-discovery.

Requirement: The branch keeps the environment tree unchanged

The change SHALL keep the environment tree of this repository unchanged, so the environment freeze check passes.

Scenario: The k8s row of Static Analysis accepts the branch

  • WHEN A person runs uv run devops ci --check --only k8s on the branch.
  • THEN The command exits 0 and check_the_branch_changes_no_environment_path reports no changed environment path.

Existing Tool Considered

The alternatives check of 2026-11-21 in the issue body gives the verdict none and names no tool; the issue body lists what the check lacks. No open, maintained tool moves a workload between namespaces and adds the name to a review list. The change adds one entry to DEFAULT_ROADMAP_PROJECT_REVIEW_NAMESPACES in src/devops_cli/config/defaults.py. It builds no code to keep: the cost is the review of one line and one test, under one hour.

Key questions

  • Can this repository edit the gpu-feature-discovery manifests in k8s/?: No. Since step 11 of docs/HOMELAB_REPO_SWITCH.md, Argo CD reads the environment tree from dan-petty/homelab, and step 17 deletes it from this repository. The k8s row of Static Analysis fails a branch that changes an environment path, in tests/gate/k8s_checks/environment_freeze.py::check_the_branch_changes_no_environment_path, as pull request build(k8s): move gpu-feature-discovery out of default namespace #7131 showed. The manifest move goes in a pull request of dan-petty/homelab. (best practice) [sources: docs/HOMELAB_REPO_SWITCH.md, tests/gate/k8s_checks/environment_freeze.py, k8s/argocd/apps/gpu-feature-discovery.yaml]
    • Chosen: Move the manifests in a pull request of dan-petty/homelab. Argo CD reads the environment tree from that repository, and this repository keeps no copy after step 17.
    • Rejected: Edit k8s/ in this repository. check_the_branch_changes_no_environment_path fails such a branch, as pull request build(k8s): move gpu-feature-discovery out of default namespace #7131 showed.
  • What does this issue deliver after the re-scope?: One entry, gpu-feature-discovery, in DEFAULT_ROADMAP_PROJECT_REVIEW_NAMESPACES of src/devops_cli/config/defaults.py. The setting has a test in tests/config/test_project_review_namespaces_setting.py. (best practice) [sources: src/devops_cli/config/defaults.py, tests/config/test_project_review_namespaces_setting.py]
    • Chosen: Add the namespace to the default review list. This is the part of the issue that this repository can deliver, and fix(roadmap): keep other projects' workload names out of the review #6615 builds the list from k8s/namespaces.yaml.
    • Rejected: Keep the manifest edits in the proposal. The environment freeze check refuses a branch that changes an environment path.
  • Which name does the namespace get?: gpu-feature-discovery, the metadata.name of the Application and the name of the manifest directory. [sources: k8s/argocd/apps/gpu-feature-discovery.yaml:4, k8s/gpu-feature-discovery/daemonset.yaml:4]

Fit

Fits in one pull request.

Suspected block

The pull request of dan-petty/homelab that moves gpu-feature-discovery out of the default namespace and creates its namespace must merge first.

Dependencies

None.

Watched files

A commit on the default branch that changes one of these files starts the next refine round.

  • tests/gate/k8s_checks/environment_freeze.py

Activity

  1. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
  2. added
    type/infra
    scope/k8s
    source/agent
    status/new
    priority/p2-medium
    value/medium
    effort/low
    on Nov 21, 2026
  3. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (6)

    Searches run:

    • Kyverno policy restrict default namespace workloads, results: 5
    • Kubernetes tool to move workload out of default namespace Pod Security labels, results: 5
    • kube-linter default namespace check, results: 5
    • kyverno policy disallow running pods in the default namespace, results: 5
    • kube-score kubernetes manifest static analysis, results: 5
    • Kubernetes namespace management tool Pod Security Admission labels generator, results: 5

    Sources:

  4. added
    status/ready
    and removed
    status/new
    on Nov 22, 2026
  5. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  6. added
    status/in-progress
    and removed
    status/ready
    on Nov 25, 2026
  7. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Cannot build #6628 as written in dan-petty/devops-cli after #6820 (ad366bbac).

    Evidence:

    • Draft pull request build(k8s): move gpu-feature-discovery out of default namespace #7131 changed k8s/namespaces.yaml, k8s/gpu-feature-discovery/daemonset.yaml, k8s/argocd/apps/gpu-feature-discovery.yaml, and k8s/argocd/apps/projects.yaml as the acceptance criteria ask.
    • Required check Static Analysis (k8s) failed on tests/gate/k8s_checks/environment_freeze.py::check_the_branch_changes_no_environment_path: since step 11 of docs/HOMELAB_REPO_SWITCH.md, Argo CD reads these environment files from dan-petty/homelab, and step 17 deletes them from dan-petty/devops-cli.
    • dan-petty/homelab still sets destination.namespace: default in k8s/argocd/apps/gpu-feature-discovery.yaml (checked via devops gh api repos/dan-petty/homelab/contents/k8s/argocd/apps/gpu-feature-discovery.yaml).
    • Move the manifests in a pull request of dan-petty/homelab first, then re-scope #6628 in dan-petty/devops-cli to DEFAULT_ROADMAP_PROJECT_REVIEW_NAMESPACES (src/devops_cli/config/defaults.py) once the homelab move merges.
  8. added
    status/new
    and removed
    status/in-progress
    on Nov 25, 2026
  9. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block 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

  10. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    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.

  11. 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/lowpriority/p2-mediumscope/k8ssource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions