Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.14][identitygc] Bugfix: Pass shared EnableMetrics into GC struct #32447

Conversation

jaredledvina
Copy link

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

This is a 1.14 specific bug as on 1.15 and above there is #28166. 1.14 shipped with #22892 and it appears this got missed.

Currently when you run the operator with --enable-metrics that arg gets plumbed into SharedCfg but we never passed it into the GC struct. As a result metrics like https://github.com/cilium/cilium/blob/v1.14/operator/identitygc/kvstore_gc.go#L73-L79 aren't getting emitted on 1.14 as they are checking against GC not the SharedCfg. This changes ensures that we pass through the p.SharedCfg.EnableMetrics parameter to allow the conditional logic to work as expected.

I've tested this on a local 1.14 cluster and configured that with this change the metrics (i.e. cilium_operator_identity_gc_entries and cilium_operator_identity_gc_runs_ are once again emitted during identity GC.

Fix: Ensure enabling metrics turns on identity GC metrics

Pass through the SharedCfg EnableMetrics into the GC struct so that
`--enable-metrics` properly enables all identity GC metrics.

Signed-off-by: Jared Ledvina <[email protected]>
@jaredledvina jaredledvina requested a review from a team as a code owner May 9, 2024 22:02
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels May 9, 2024
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label May 9, 2024
@hemanthmalla
Copy link
Member

/test-backport-1.14

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 12, 2024
@julianwiedmann julianwiedmann added the area/operator Impacts the cilium-operator component label May 13, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 13, 2024
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels May 13, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 13, 2024
@julianwiedmann julianwiedmann added release-note/bug This PR fixes an issue in a previous release of Cilium. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels May 13, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 13, 2024
Copy link
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks! 🚀

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 13, 2024
@julianwiedmann julianwiedmann merged commit a2a1e5f into cilium:v1.14 May 13, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operator Impacts the cilium-operator component backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. kind/bug This is a bug in the Cilium logic. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants