feat(provisioner): add support for warning log de-duplication #282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request template
Why is this PR required? What issue does it fix?:
Fixes #279
What this PR does?:
This change adds a custom Warning logger to the kubernetes REST client, so that warning logs are duplicated and they don't flood the logs.
Adds a CLI flag
--dedupe-warningsto enable this option.Adds a helm chart value
localpv.logging.dedupeWarnings=trueto use the above flag.Does this PR require any upgrade changes?:
Nope
If the changes in this PR are manually verified, list down the scenarios covered::
Verified in kubernetes v1.33.0 (minikube) that there is indeed a flood of warnings related to the use of Endpoints instead of EndpointSlices. Used the flag with the helm chart and verified that a single log is present the next time round.
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:
<type>(<scope>): <subject>PLEASE REMOVE BELOW INFORMATION BEFORE SUBMITTING
The PR title message must follow convention:
<type>(<scope>): <subject>.Where:
Most common types are:
*
feat- for new features, not a new feature for build script*
fix- for bug fixes or improvements, not a fix for build script*
chore- changes not related to production code*
docs- changes related to documentation*
style- formatting, missing semi colons, linting fix etc; no significant production code changes*
test- adding missing tests, refactoring tests; no production code change*
refactor- refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes*
cherry-pick- if PR is merged in master branch and raised to release branch(like v0.4.x)IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.