Skip to content

[v0.14] Revert false-drift workaround and restore legacyscheme#5007

Merged
thardeck merged 3 commits into
release/v0.14from
v0.14_revert_4969_fix
Apr 17, 2026
Merged

[v0.14] Revert false-drift workaround and restore legacyscheme#5007
thardeck merged 3 commits into
release/v0.14from
v0.14_revert_4969_fix

Conversation

@thardeck
Copy link
Copy Markdown
Collaborator

Reverting the move to client-go scheme, because client-go does not provide any Kubernetes config defaults which can have certain side effects for chart deployments, e.g. described in #4969.

Initially we have backported the fix for Fleet v0.15 upwards, but we decided to go back to the old behavior for legacy Fleet versions instead, to prevent any potential regressions by these changes.

Refers to #4969

After reverting the k8s.io/kubernetes removal (PR #4902), bump
k8s.io/kubernetes from v1.34.5 to v1.34.6 and update all replace
directives to v0.34.6, matching the kubernetes dependencies that were
already at v0.34.6 on this branch (bumped in #4901).

Refs: #4969
@thardeck thardeck added this to the v2.13.5 milestone Apr 17, 2026
@thardeck thardeck self-assigned this Apr 17, 2026
@thardeck thardeck requested a review from a team as a code owner April 17, 2026 09:19
@thardeck thardeck added this to Fleet Apr 17, 2026
@thardeck thardeck moved this to 👀 In review in Fleet Apr 17, 2026
@thardeck thardeck requested a review from Copilot April 17, 2026 09:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reverts the previously backported “false drift” workaround for legacy Fleet (v0.14) by restoring Kubernetes in-tree defaulting via legacyscheme, addressing drift side effects seen in chart deployments (e.g., #4969).

Changes:

  • Switch diff defaulting scheme back from client-go scheme to k8s.io/kubernetes/pkg/api/legacyscheme (with in-tree API installs).
  • Remove the live-object patch normalizations (replicas/HPA + null-field stripping) that were part of the prior workaround.
  • Add k8s.io/kubernetes (and related Kubernetes module pinning) to module deps; remove the related unit/e2e drift tests and assets.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/cmd/agent/deployer/internal/diff/scheme/scheme.go Restores in-tree Kubernetes legacyscheme and installs to re-enable defaulting.
internal/cmd/agent/deployer/desiredset/diff.go Removes extra patch normalization steps previously used to avoid false drift.
internal/cmd/agent/deployer/desiredset/diff_null_test.go Deletes unit tests/benchmarks for null-field patch normalization (workaround removed).
e2e/single-cluster/helm_recreate_drift_test.go Deletes e2e drift regression test related to Helm v4 null/defaulting behavior.
e2e/assets/helm-recreate-drift/** Deletes e2e chart/assets used by the removed drift test.
e2e/assets/gitrepo/helm-recreate-drift-gitrepo.yaml Deletes GitRepo template used by the removed drift test.
go.mod / go.sum Adds k8s.io/kubernetes dependency and pins many Kubernetes modules.
integrationtests/go.mod / integrationtests/go.sum Mirrors Kubernetes module pinning/dep changes for the integration test module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/cmd/agent/deployer/internal/diff/scheme/scheme.go
Comment thread go.mod
Comment thread go.mod
Comment thread integrationtests/go.mod
@thardeck thardeck merged commit 4190845 into release/v0.14 Apr 17, 2026
26 checks passed
@thardeck thardeck deleted the v0.14_revert_4969_fix branch April 17, 2026 09:49
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Fleet Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants