Skip to content

feat(k8s): add a k8s subcommand that probes a policy path - #6894

Merged
dan-petty merged 2 commits into
mainfrom
feat/4407-a-command-that-probes-a-network
Nov 23, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/4407-a-command-that-probes-a-network

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

A network policy path is proven today with a hand-made pod: kubectl run --overrides with a restricted security context, a label and a sleep (#4407). The first attempt fails because kube-router programs the policy a few seconds after the pod starts, and the steps are easy to get wrong. #4407 replaces them with one subcommand of the k8s group that retries until the policy is programmed, measures one request, prints the status or the curl exit code, and always deletes its pod.

Closes #4407

Change: openspec/changes/archive/2026-11-23-4407-a-command-that-probes-a-network/

@devops-cli-service devops-cli-service Bot added scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function labels Nov 23, 2026
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Step Status Attempts Tokens in/out Last failing command
group 1 done 2 13521332/57167 -
group 2 done 1 8226689/29818 pytest on base: tests/commands/k8s/test_k8s_probe.py
group 3 done 1 469117/1513 -
  • tools: run_command 124, edit_file 56, read_file 50, write_file 7, list_files 6, create_directory 1, grep 1
  • scoped check pre-push: passed, 5 s
  • scoped check static: passed, 22 s
  • scoped check tests: passed, 18 s
  • scoped check strength: passed, 0 s
  • scoped check tests: the changed files select more than 30 test modules, so only the changed test modules ran. The required checks of CI run the others
  • group 3: skipped, group 3: kind other
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.k8s.test_service_probe::test_a_blocked_path_prints_the_curl_exit_code_at_the_wait_deadline, tests.k8s.test_service_probe::test_a_refused_connection_is_retried_until_the_policy_is_programmed, tests.k8s.test_service_probe::test_a_secret_header_travels_on_the_standard_input_of_the_exec_call, tests.k8s.test_service_probe::test_the_request_that_the_pod_sends_names_the_url_and_the_method, tests.k8s.test_service_probe::test_the_http_probe_pod_runs_the_image_that_the_caller_names, tests.k8s.test_service_probe::test_the_default_http_probe_image_is_pinned_by_digest, tests.k8s.test_service_probe::test_a_probe_that_passes_the_timeout_deadline_raises_and_deletes_the_pod, tests.k8s.test_service_probe::test_a_curl_that_fails_stops_the_probe_and_deletes_the_pod, tests.k8s.test_service_probe::test_a_request_that_prints_no_status_stops_the_probe_and_deletes_the_pod, tests.k8s.test_service_probe::test_the_plan_of_the_http_probe_names_the_pod_the_curl_line_and_the_url.
  • fail-to-pass of group 2: fails on the base commit. Tests that fail on the base commit: tests.commands.k8s.test_k8s_probe::test_a_blocked_path_prints_the_curl_exit_code, tests.commands.k8s.test_k8s_probe::test_one_pod_carries_the_label_and_the_namespace_of_the_probe, tests.commands.k8s.test_k8s_probe::test_the_namespace_option_names_the_namespace_of_every_call, tests.commands.k8s.test_k8s_probe::test_a_refused_connection_is_retried_until_the_pod_answers, tests.commands.k8s.test_k8s_probe::test_the_restricted_pod_spec_passes_the_pod_security_standard, tests.commands.k8s.test_k8s_probe::test_a_secret_header_stays_off_every_argv_and_out_of_the_output, tests.commands.k8s.test_k8s_probe::test_the_pod_is_deleted_after_a_failed_probe, tests.commands.k8s.test_k8s_probe::test_the_deadline_stops_a_slow_probe, tests.commands.k8s.test_k8s_probe::test_a_dry_run_prints_the_plan_only, tests.commands.k8s.test_k8s_probe::test_the_default_image_is_pinned_by_digest, tests.commands.k8s.test_k8s_probe::test_the_pod_runs_the_image_that_the_operator_names, tests.commands.k8s.test_k8s_probe::test_an_image_without_a_digest_is_refused_before_any_kubectl_call, tests.commands.k8s.test_k8s_probe::test_a_label_without_a_value_is_refused_before_any_kubectl_call, tests.commands.k8s.test_k8s_probe::test_the_request_names_the_url_and_the_method, tests.commands.k8s.test_k8s_probe::test_the_context_option_reaches_every_kubectl_call.
  • verify of group 3: uv run devops ci docs exits 0.
\u2139 Quality gate root: /run/roadmap/work/model-clone
\u2713 All documentation files are up to date.

@dan-petty
dan-petty force-pushed the feat/4407-a-command-that-probes-a-network branch from 6a5159c to 75ac736 Compare November 23, 2026 17:49
@dan-petty
dan-petty merged commit b1fae4f into main Nov 23, 2026
30 checks passed
@dan-petty
dan-petty deleted the feat/4407-a-command-that-probes-a-network branch November 23, 2026 18:02
dan-petty-release Bot added a commit that referenced this pull request Nov 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.203.0](v0.202.0...v0.203.0)
(2026-11-23)


### Features

* **k8s:** add a k8s subcommand that probes a policy path
([#6894](#6894))
([b1fae4f](b1fae4f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): a command that probes a network policy path

1 participant