Skip to content

feat(cli): kates auto and kyverno apply pass .policies, as deploy does - #586

Merged
bmscomp merged 2 commits into
mainfrom
feat/policies-everywhere
Nov 3, 2026
Merged

bmscomp merged 2 commits into
mainfrom
feat/policies-everywhere

Conversation

@bmscomp

@bmscomp bmscomp commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Follow-up named in #578: only kates deploy applied .policies.

  • kates auto writes the current context's .policies values next to values-detected.yaml and passes them to the kafka-cluster and monitoring releases.
  • kates kyverno apply passes the kates chart's values to its upgrade. --reset-then-reuse-values reuses only what the last deploy passed, so a .policies edit since then was lost.
  • Both warn about the environment's unresolved rules, as deploy does.
  • currentDeployPolicies asks kubectl for the context only when the file has environments.

The admin-less kind gate is unchanged. It installs Strimzi, Kyverno and monitoring on a Kind cluster it has just created, so there are no user policies yet to satisfy.

Tests: TestKyvernoApplyPassesPolicies (fails without the change) and TestAutoMonitoringPassesPolicies. go test ./... in cli passes. golangci-lint flags only the known mcp_test.go errcheck lines under 2.15 (CI pins 2.14.0). Not run against a live cluster.

kates auto installed kafka-cluster and monitoring without the current
context's .policies values, and kyverno apply upgraded the kates release
with the values reused from the last deploy. On a cluster whose Kyverno
policies need a pod label or a value, both could be refused where deploy
passed. Each now passes the chart's values and warns about unresolved
rules. The admin-less kind gate is left alone: it installs operators on
a cluster it has just created, which has no policies of its own yet.
@bmscomp
bmscomp merged commit 9bf6f3c into main Nov 3, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant