Skip to content

fix(k8s): devops k8s bootstrap says calico but starts minikube without a policy-enforcing cni #990

Description

@dan-petty

Problem

The help for devops k8s bootstrap (src/devops_cli/lang/en/help.py:266) says the cluster gets Calico. cluster_runtime.py:95,100 starts minikube with no --cni, so it uses minikube's default, which does not enforce NetworkPolicy. The sandbox egress policies (#702) and the namespace perimeters (#913) rely on enforcement, so on a bootstrapped cluster they silently do nothing. Found while refining #702 on 2026-10-02.

Acceptance criteria

  • devops k8s bootstrap starts minikube with --cni=calico, so policies are enforced and the help text is true. Or, if Calico's cost is not wanted, the help text says NetworkPolicy is not enforced and names the flag that enables it. Pick one, and say why in the task file.
  • An offline test pins the minikube argv, and the help text matches it.
  • uv run devops ci passes, and the generated docs are regenerated.

Key questions

  • Calico, or correct the text? Calico (proposed). The repository's own perimeters assume enforcement, and minikube supports --cni=calico directly.

Related: #702, #913.

Proposed design

Problem statement

The devops k8s bootstrap command claims to set up a cluster with Calico for network policy enforcement, but it actually starts minikube without specifying a CNI plugin, causing the default CNI (which does not enforce policies) to be used. This breaks the functionality of sandbox egress policies and namespace perimeters that rely on NetworkPolicy enforcement.

Acceptance criteria

  • Criterion 1: The devops k8s bootstrap command starts minikube with --cni=calico flag so that network policies are enforced.
    Verification: Run devops k8s bootstrap and verify that the minikube cluster is started with --cni=calico in the command line arguments.
  • Criterion 2: The help text for devops k8s bootstrap accurately reflects that Calico is used for network policy enforcement.
    Verification: Check that the help text in src/devops_cli/lang/en/help.py correctly states that Calico is used and that policies are enforced.
  • Criterion 3: An offline test verifies the minikube argv includes the correct CNI flag.
    Verification: Write an offline test that pins the minikube argv to ensure it contains --cni=calico.
  • Criterion 4: The generated documentation is updated and uv run devops ci passes.
    Verification: Run uv run devops ci and confirm all checks pass, including documentation generation.

Key questions

  • Calico, or correct the text?: Calico (proposed). The repository's own perimeters assume enforcement, and minikube supports --cni=calico directly. [sources: src/devops_cli/lang/en/help.py:266]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/k8s
    priority/p2-medium
    on Oct 2, 2026
  2. added this to the milestone on Oct 20, 2026
  3. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 2954109 (see proposed design in issue body).

  4. removed this from the milestone on Oct 23, 2026
  5. added a commit that references this issue on Oct 24, 2026
    e7b9db7
  6. added a commit that references this issue on Oct 24, 2026
  7. added a commit that references this issue on Nov 1, 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

    priority/p2-mediumscope/k8stype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions