Skip to content

Conversation

@briansonnenberg
Copy link
Contributor

@briansonnenberg briansonnenberg commented Sep 5, 2025

Unmanaged labels and annotations present on Kubernetes Services are to be ignored by Flagger (i.e. not overwritten / removed upon reconciliation).

See: here

@djazayeri
Copy link

@stefanprodan @aryan9600 can you give feedback on this CL?

Copy link
Member

@aryan9600 aryan9600 left a comment

Choose a reason for hiding this comment

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

overall looks good, could you please run make crd and push again?

@briansonnenberg
Copy link
Contributor Author

overall looks good, could you please run make crd and push again?

Done.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 48.97959% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.98%. Comparing base (12ee6cb) to head (ea21950).
⚠️ Report is 41 commits behind head on main.

Files with missing lines Patch % Lines
pkg/apis/flagger/v1beta1/zz_generated.deepcopy.go 0.00% 25 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1823       +/-   ##
===========================================
- Coverage   39.44%   28.98%   -10.46%     
===========================================
  Files         287      287               
  Lines       22706    22936      +230     
===========================================
- Hits         8956     6649     -2307     
- Misses      12777    15562     +2785     
+ Partials      973      725      -248     

☔ 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.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

Please add this field to the docs here https://docs.flagger.app/usage/how-it-works#canary-service

These are labels and annotations that should be ignored by Flagger
(i.e. not overwritten upon reconciliation).

See: github.com/fluxcd/issues/1573

Signed-off-by: Brian Sonnenberg <[email protected]>
@briansonnenberg
Copy link
Contributor Author

@stefanprodan @aryan9600 I've updated the API to be "unmanagedMetadata", and support both annotations and labels. Also updated the docs to mention this.

@stefanprodan stefanprodan changed the title Added a new field to canary spec to specify unmanaged annotations. Add unmanagedMetadata to canary service specification Oct 14, 2025
@stefanprodan
Copy link
Member

Just to note that this PR does not solve the original issue. While we preserve the metadata on Kubernetes Services, we are still removing unmanaged labels and annotations from Istio & Gateway API objects.

@stefanprodan stefanprodan added the kind/enhancement Improvement request for an existing feature label Oct 15, 2025
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @briansonnenberg

@stefanprodan stefanprodan merged commit 3d99d2f into fluxcd:main Oct 15, 2025
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Improvement request for an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants