Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[release-1.20] Preserve deployment and its template labels and annotations#16303

Merged
knative-prow[bot] merged 1 commit intoknative:release-1.20knative/serving:release-1.20from
knative-prow-robot:cherry-pick-16199-to-release-1.20knative-prow-robot/serving:cherry-pick-16199-to-release-1.20Copy head branch name to clipboard
Dec 17, 2025
Merged

[release-1.20] Preserve deployment and its template labels and annotations#16303
knative-prow[bot] merged 1 commit intoknative:release-1.20knative/serving:release-1.20from
knative-prow-robot:cherry-pick-16199-to-release-1.20knative-prow-robot/serving:cherry-pick-16199-to-release-1.20Copy head branch name to clipboard

Conversation

@knative-prow-robot
Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #16199

Preserve deployment and template annotations and labels during reconcile

When running `kubectl rollout restart deployment`, Kubernetes adds the
`kubectl.kubernetes.io/restartedAt` annotation to the deployment's pod
template to trigger a rolling restart. However, Knative's reconciler was
removing this annotation by completely replacing the deployment spec,
causing new pods to be immediately terminated instead of completing the
rollout.

This change preserves externally-added metadata at both the deployment
level and template level during reconciliation by filtering Knative-controlled
keys (*.knative.dev and app label) from the current state before merging with
the desired state. This ensures Knative maintains full control over its own
metadata while preserving external additions.
@knative-prow knative-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 12, 2025
@knative-prow knative-prow Bot requested review from gauron99 and skonto December 12, 2025 12:44
@linkvt
Copy link
Copy Markdown
Member

linkvt commented Dec 12, 2025

As requested by a user in #16199 (comment)

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.02%. Comparing base (2f3129a) to head (93c01b5).
⚠️ Report is 3 commits behind head on release-1.20.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.20   #16303      +/-   ##
================================================
- Coverage         80.05%   80.02%   -0.04%     
================================================
  Files               214      214              
  Lines             13281    13289       +8     
================================================
+ Hits              10632    10634       +2     
- Misses             2291     2297       +6     
  Partials            358      358              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dprotaso
Copy link
Copy Markdown
Member

/hold

I'm holding a bunch of PRs for 1.20 release - waiting to get confirmation of a metric fix

@knative-prow knative-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2025
@dprotaso
Copy link
Copy Markdown
Member

/hold cancel

@knative-prow knative-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2025
@dprotaso
Copy link
Copy Markdown
Member

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Dec 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, knative-prow-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2025
@knative-prow knative-prow Bot merged commit 576e775 into knative:release-1.20 Dec 17, 2025
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.