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

[controller] Reduce log level for no-op branch of UpdateFunc #1661

Open
armingerten opened this issue Dec 16, 2024 · 1 comment
Open

[controller] Reduce log level for no-op branch of UpdateFunc #1661

armingerten opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
backlog Issues/PRs that will be included in the project roadmap help wanted Feature requests approved by maintainers that are not included in the project roadmap

Comments

@armingerten
Copy link
Contributor

Which component:
controller version 2.17.0

Is your feature request related to a problem? Please describe.
Whenever the spec of a sealed secret is updated, the informer will trigger the UpdateFunc twice: Once for the actual change of the spec and a second time due to the change of the the status sub resource that is updated by the controller. This leads to confusing log output like this:

time=2024-12-15T02:47:42.194Z level=INFO msg=Updating key=foo/bar
time=2024-12-15T02:47:42.316Z level=INFO msg="Event(v1.ObjectReference{Kind:\"SealedSecret\", Namespace:\"foo\", Name:\"bar\", UID:\"919b1d17-3cb2-43c8-8a3b-8884218c6df6\", APIVersion:\"bitnami.com/v1alpha1\", ResourceVersion:\"1450095925\", FieldPath:\"\"}): type: 'Normal' reason: 'Unsealed' SealedSecret unsealed successfully"
time=2024-12-15T02:47:42.327Z level=INFO msg="update suppressed, no changes in spec" sealed-secret=foo/bar

While the log output makes sense when familiar with the controller, it is rather confusing from a user's perspective.

Describe the solution you'd like
Change the log level to Debug for:

slog.Info("update suppressed, no changes in spec", "sealed-secret", key)

@armingerten armingerten added the triage Issues/PRs that need to be reviewed label Dec 16, 2024
@agarcia-oss agarcia-oss self-assigned this Jan 30, 2025
@agarcia-oss
Copy link
Member

Hi @armingerten I agree the second info message is redundant in most cases. Would you like to contribute a PR changing the log level to DEBUG?

Regards

@agarcia-oss agarcia-oss added help wanted Feature requests approved by maintainers that are not included in the project roadmap backlog Issues/PRs that will be included in the project roadmap and removed triage Issues/PRs that need to be reviewed labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues/PRs that will be included in the project roadmap help wanted Feature requests approved by maintainers that are not included in the project roadmap
Projects
None yet
Development

No branches or pull requests

2 participants