Skip to content

fix(arc): set skipBackgroundRequests=false to clear Kyverno CRD default drift + correct kyverno CM comment - #17

Merged
emmanuelbruno merged 1 commit into
mainfrom
preservation/arc-kyverno-closeout-2026-09-15
Sep 15, 2026
Merged

emmanuelbruno merged 1 commit into
mainfrom
preservation/arc-kyverno-closeout-2026-09-15

Conversation

@emmanuelbruno

Copy link
Copy Markdown
Contributor

Close-out for the merged ARC/Kyverno PR #8.

Root cause

The Kyverno clusterpolicies.kyverno.io CRD sets rule-level skipBackgroundRequests to default: true. The arc policy's git manifest omitted the field, so the API server defaulted it to true live — the arc ArgoCD app stayed permanently OutOfSync AND the background rescan was disabled (defeating the policy's purpose of re-asserting the kubernetes.io/arch=arm64 taint after node re-provisioning). ArgoCD SSA cannot clear a defaulted field, so only an explicit value in git fixes it durably.

Changes

  • kubernetes/arc/node-arm64-arch-taint.yaml — add skipBackgroundRequests: false to the taint-arm64-nodes rule (sibling of name, before match). match/other rule content preserved exactly.
  • helm/releases/kyverno/values.yaml — fix the stale comment block near config.resourceFiltersExclude:
    • the old block carried a literal resourceFilters string (an older chart default) that was WRONG — applying it would have deleted ~79 protection tokens;
    • it claimed the ConfigMap is "NOT managed by ArgoCD/Helm", which is empirically FALSE (ArgoCD owns the data keys; the keep annotation only prevents deletion, not update).
    • Rewritten to state accurately: the resourceFiltersExclude: ['[Node,*,*]'] hook removes the standalone [Node,*,*] at Helm render time; the Kyverno ConfigMap IS ArgoCD-managed and its resourceFilters is already correct after sync; therefore NO manual one-off ConfigMap patch is required. The stale literal string is removed. config.resourceFiltersExclude itself is unchanged.

Validation

  • kubectl kustomize kubernetes/arc → rendered node-arm64-arch-taint rule now contains skipBackgroundRequests: false.
  • After merge: expect arc app to go Synced + Healthy (no longer OutOfSync) and the live rule to show skipBackgroundRequests: false. No manual CM patch applied (none needed).

…lt drift + correct kyverno CM comment

Close-out for the merged ARC/Kyverno PR #8.

The Kyverno clusterpolicies.kyverno.io CRD sets rule-level
skipBackgroundRequests to default: true. The arc policy's manifest omitted
the field, so the API server defaulted it to true live -> the arc app stayed
permanently OutOfSync AND the background rescan was disabled (defeating the
policy's purpose of re-asserting the arm64 taint after node re-provisioning).
ArgoCD SSA cannot clear a defaulted field, so only an explicit value in git
fixes it durably.

- kubernetes/arc/node-arm64-arch-taint.yaml: add skipBackgroundRequests: false
  to the taint-arm64-nodes rule.
- helm/releases/kyverno/values.yaml: correct the stale comment block. The
  kyverno ConfigMap IS ArgoCD-managed (ArgoCD owns its data keys; the keep
  annotation only prevents deletion, not update), and the
  resourceFiltersExclude hook already drops [Node,*,*] at render time, so NO
  manual one-off ConfigMap patch is required. Remove the stale/wrong literal
  resourceFilters string.
Copilot AI lite review requested due to automatic review settings September 15, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Kyverno guidance conflicts with the ARC README, which still prescribes an unnecessary ConfigMap patch.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates the ARC Kyverno policy to prevent default-field drift and corrects Kyverno ConfigMap guidance.

Changes:

  • Sets skipBackgroundRequests: false for the ARM taint policy.
  • Corrects the Kyverno ConfigMap management comment.
File summaries
File Summary
kubernetes/arc/node-arm64-arch-taint.yaml Enables background policy rescans explicitly.
helm/releases/kyverno/values.yaml Corrects ConfigMap management documentation.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +31 to +33
# the CM on prune — it does NOT stop ArgoCD from UPDATING its data. So once the
# `kyverno` app syncs, the live `resourceFilters` is already correct (no
# `[Node,*,*]`). No manual one-off `kubectl patch configmap kyverno` is needed.
@emmanuelbruno
emmanuelbruno merged commit 84eeb4a into main Sep 15, 2026
1 check passed
@emmanuelbruno
emmanuelbruno deleted the preservation/arc-kyverno-closeout-2026-09-15 branch September 15, 2026 15:59
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.

2 participants