Skip to content

Conversation

@weng271190436
Copy link
Collaborator

Description of your changes

Fixes #319

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

@weng271190436 weng271190436 force-pushed the weiweng/ignore-deployment-revision branch from a6c6a6a to bc86a09 Compare November 6, 2025 18:03
@weng271190436 weng271190436 changed the title ignore deployment deployment.kubernetes.io/revision annotation in work applier fix: ignore deployment deployment.kubernetes.io/revision annotation in work applier Nov 6, 2025
@weng271190436 weng271190436 changed the title fix: ignore deployment deployment.kubernetes.io/revision annotation in work applier fix: ignore deployment.kubernetes.io/revision annotation in work applier Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@weng271190436 weng271190436 changed the title fix: ignore deployment.kubernetes.io/revision annotation in work applier fix: ignore deployment.kubernetes.io/revision annotation Nov 7, 2025
Copy link
Contributor

@ryanzhang-oss ryanzhang-oss left a comment

Choose a reason for hiding this comment

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

We need a e2e that place a deployment to verify this works

Wei Weng added 2 commits November 10, 2025 21:41
…k applier

Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@weng271190436 weng271190436 force-pushed the weiweng/ignore-deployment-revision branch from bc86a09 to 80e9f29 Compare November 11, 2025 16:36
Copilot finished reviewing on behalf of weng271190436 November 11, 2025 16:57
Copy link
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

This PR fixes issue #319 by ensuring the deployment.kubernetes.io/revision annotation is ignored during resource placement operations. This annotation is automatically set by the Kubernetes deployment controller and should not be considered when comparing resource states during placement.

Key Changes:

  • Added logic to filter out the deployment.kubernetes.io/revision annotation in resource sanitization
  • Updated dependencies to include k8s.io/kubectl package for the RevisionAnnotation constant
  • Added comprehensive E2E test coverage for deployment placement scenarios

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/controllers/workapplier/apply.go Added deletion of deployment.RevisionAnnotation in sanitizeManifestObject()
pkg/controllers/workapplier/apply_test.go Added test coverage for revision annotation removal
pkg/controllers/placement/resource_selector.go Added deletion of deployment.RevisionAnnotation in generateRawContent()
pkg/controllers/placement/resource_selector_test.go Added test coverage for revision annotation removal
test/e2e/resource_placement_deployment_test.go New E2E test file for deployment placement scenarios
go.mod Updated k8s.io/metrics version and added k8s.io/kubectl dependency
go.sum Updated checksums for new and upgraded dependencies
apis/placement/v1beta1/zz_generated.deepcopy.go Auto-generated code formatting change (import alias)

@weng271190436 weng271190436 force-pushed the weiweng/ignore-deployment-revision branch 4 times, most recently from 3f97b22 to 80e9f29 Compare November 11, 2025 18:19
@weng271190436 weng271190436 merged commit 9caeb4e into kubefleet-dev:main Nov 13, 2025
63 of 81 checks passed
@weng271190436 weng271190436 deleted the weiweng/ignore-deployment-revision branch November 13, 2025 16:55
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.

[BUG] "kubernetes-fleet.io/last-applied-configuration" can conflict with deployment controller

2 participants