---
- test: "k delete ns"
description: "match command"
expect_ids:
["kubernetes-strict:delete_resource", "kubernetes:delete_namespace"]
- test: "kubectl delete namespace"
description: "match command with spaces"
expect_ids:
["kubernetes-strict:delete_resource", "kubernetes:delete_namespace"]
- test: "kubectll delete"
description: "invalid command"
expect_ids: []
- test: "k scale"
description: "match command"
expect_ids: ["kubernetes-strict:change_resource_size"]
- test: "kubectl scale"
description: "match command with spaces"
expect_ids: ["kubernetes-strict:change_resource_size"]
- test: "kubectll scale"
description: "invalid command"
expect_ids: []
- test: "k delete -n test"
description: "match command"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "kubectl delete -n test"
description: "match command with spaces"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "ka delete -n test"
description: "invalid command"
expect_ids: []
- test: "kubectl rollout restart"
description: "match command"
expect_ids: ["kubernetes-strict:rollout_resource"]
- test: "kubectl rollout resume"
description: "match command"
expect_ids: ["kubernetes-strict:rollout_resource"]
- test: "kubectl rollout pause"
description: "match command"
expect_ids: ["kubernetes-strict:rollout_resource"]
- test: "kubectl rollout undo"
description: "match command"
expect_ids: ["kubernetes-strict:rollout_resource"]
- test: "kubectl rollout s"
description: "invalid command"
expect_ids: []
- test: "kubectl rollout"
description: "invalid command"
expect_ids: []
- test: "k set env"
description: "match command"
expect_ids: ["kubernetes-strict:update_resource"]
- test: "kubectl set env"
description: "match command with spaces"
expect_ids: ["kubernetes-strict:update_resource"]
- test: "k set"
description: "invalid command"
expect_ids: []
- test: "kubectl set"
description: "invalid command"
expect_ids: []
- test: "kubectl --context prod delete ns staging"
description: "match kubectl with --context flag before delete ns"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_namespace"]
- test: "kubectl delete ns staging --dry-run=client"
description: "dry-run=client contains --dry-run, filtered out"
expect_ids: []
- test: "k delete ns production"
description: "short alias deleting production namespace"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_namespace"]
- test: "helm uninstall my-release"
description: "match helm uninstall"
expect_ids: ["helm:uninstall"]
- test: "helm delete my-release"
description: "match helm delete (alias for uninstall)"
expect_ids: ["helm:uninstall"]
- test: "helm uninstall my-release --namespace prod"
description: "match helm uninstall with namespace"
expect_ids: ["helm:uninstall"]
- test: "helm list"
description: "negative: helm list should not match"
expect_ids: []
- test: "helm rollback my-release 1"
description: "match helm rollback to revision"
expect_ids: ["helm:rollback"]
- test: "helm rollback my-release"
description: "match helm rollback without revision"
expect_ids: ["helm:rollback"]
- test: "helm history my-release"
description: "negative: helm history should not match"
expect_ids: []
- test: "helm upgrade my-release my-chart --force"
description: "match helm upgrade with --force"
expect_ids: ["helm:upgrade_force"]
- test: "helm upgrade --force my-release my-chart"
description: "match helm upgrade with --force before args"
expect_ids: ["helm:upgrade_force"]
- test: "helm upgrade my-release my-chart"
description: "negative: helm upgrade without --force should not match"
expect_ids: []
- test: "kubectl drain node01"
description: "match kubectl drain"
expect_ids: ["kubernetes:drain_node"]
- test: "k drain node01"
description: "match short alias drain"
expect_ids: ["kubernetes:drain_node"]
- test: "kubectl drain node01 --ignore-daemonsets"
description: "match kubectl drain with flags"
expect_ids: ["kubernetes:drain_node"]
- test: "kubectl get nodes"
description: "negative: get nodes should not match drain"
expect_ids: []
- test: "kubectl cordon node01"
description: "match kubectl cordon"
expect_ids: ["kubernetes:cordon_node"]
- test: "k cordon node01"
description: "match short alias cordon"
expect_ids: ["kubernetes:cordon_node"]
- test: "kubectl uncordon node01"
description: "negative: uncordon should not match cordon"
expect_ids: []
- test: "kubectl replace -f deployment.yaml --force"
description: "match kubectl replace --force"
expect_ids: ["kubernetes:replace_force"]
- test: "k replace -f pod.yaml --force"
description: "match short alias replace --force"
expect_ids: ["kubernetes:replace_force"]
- test: "kubectl replace -f deployment.yaml"
description: "negative: replace without --force should not match"
expect_ids: []
- test: "kubectl replace -f deployment.yaml --force --dry-run=client"
description: "negative: replace --force with dry-run should not match"
expect_ids: []
- test: "kubectl -n default delete ns staging"
description: "match kubectl with -n flag before delete ns"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_namespace"]
- test: "k uncordon node01"
description: "EDGE: k uncordon should not match cordon"
expect_ids: []
- test: "kubectl delete pod mypod --force --grace-period=0"
description: "EDGE: force delete pod"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "kubectl delete all --all -n default"
description: "EDGE: delete all resources"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "kubectl delete pods --all"
description: "match delete all pods"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "kubectl delete deployments --all -n production"
description: "match delete all deployments in namespace"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "k delete services --all"
description: "match short alias delete all services"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "kubectl -n staging delete pods --all"
description: "match delete all with -n flag before delete"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "kubectl delete pods --all"
description: "match delete all with extra spaces"
expect_ids: ["kubernetes-strict:delete_resource", "kubernetes:delete_all_resources"]
- test: "kubectl delete pods --all --dry-run=client"
description: "negative: delete all with dry-run should not match"
expect_ids: []
- test: "kubectl delete pod mypod"
description: "negative: delete specific pod should not match delete_all_resources"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "kubectl delete pods --field-selector status.phase=Failed"
description: "negative: delete with field-selector should not match delete_all"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "kubectl get pods --all-namespaces"
description: "negative: get with --all-namespaces should not match"
expect_ids: []
- test: "kubectl delete pods --all-namespaces"
description: "negative: --all-namespaces is not --all (different flag)"
expect_ids: ["kubernetes-strict:delete_resource"]
- test: "kubectl apply -f deployment.yaml --force"
description: "match apply with --force"
expect_ids: ["kubernetes:apply_force"]
- test: "kubectl apply --force -f deployment.yaml"
description: "match apply with --force before -f"
expect_ids: ["kubernetes:apply_force"]
- test: "k apply -f pod.yaml --force"
description: "match short alias apply --force"
expect_ids: ["kubernetes:apply_force"]
- test: "kubectl -n production apply -f deployment.yaml --force"
description: "match apply --force with -n flag before apply"
expect_ids: ["kubernetes:apply_force"]
- test: "kubectl apply -f deployment.yaml --force"
description: "match apply --force with extra spaces"
expect_ids: ["kubernetes:apply_force"]
- test: "kubectl apply -f deployment.yaml --force --dry-run=client"
description: "negative: apply --force with dry-run should not match"
expect_ids: []
- test: "kubectl apply -f deployment.yaml"
description: "negative: apply without --force should not match"
expect_ids: []
- test: "kubectl apply --force-conflicts -f deployment.yaml"
description: "negative: --force-conflicts is not --force (different flag)"
expect_ids: []