-
Notifications
You must be signed in to change notification settings - Fork 594
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
Fix: Add --emit-translation-events to toggle creating of events in translation and config applying #5296
Conversation
…tion and config applying
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5296 +/- ##
=====================================
Coverage 75.8% 75.8%
=====================================
Files 170 170
Lines 19450 19457 +7
=====================================
+ Hits 14753 14767 +14
+ Misses 3864 3859 -5
+ Partials 833 831 -2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com>
Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.12.x release/2.12.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.12.x
# Create a new branch
git switch --create backport-5296-to-release/2.12.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8b3d551ea7c93048add583f517992e8a6883e7d7
# Push it to GitHub
git push --set-upstream origin backport-5296-to-release/2.12.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.12.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.0.x release/3.0.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.0.x
# Create a new branch
git switch --create backport-5296-to-release/3.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8b3d551ea7c93048add583f517992e8a6883e7d7
# Push it to GitHub
git push --set-upstream origin backport-5296-to-release/3.0.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.0.x Then, create a pull request where the |
@@ -213,6 +214,7 @@ func (c *Config) FlagSet() *pflag.FlagSet { | |||
flagSet.IntVar(&c.Concurrency, "kong-admin-concurrency", 10, "Max number of concurrent requests sent to Kong's Admin API.") | |||
flagSet.StringSliceVar(&c.WatchNamespaces, "watch-namespace", nil, | |||
`Namespace(s) in comma-separated format (or specify this flag multiple times) to watch for Kubernetes resources. Defaults to all namespaces.`) | |||
flagSet.BoolVar(&c.EmitTranslationEvents, "emit-translation-events", true, `Emit Kubernetes events for successful configuration applies, translation failures and configuration apply failures on managed objects.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flagSet.BoolVar(&c.EmitTranslationEvents, "emit-translation-events", true, `Emit Kubernetes events for successful configuration applies, translation failures and configuration apply failures on managed objects.`) | |
flagSet.BoolVar(&c.EmitKubernetesEvents, "emit-kubernetes-events", true, `Emit Kubernetes events for successful configuration applies, translation failures and configuration apply failures on managed objects.`) |
I think the flag shouldn't include translation
as it decides about emitting not only translation events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5299 has been merged. Thanks
…anslation and config applying (#5296) * add --emit-translation-events to toggle creating of events in translation and config applying * update changelog * Update internal/manager/run.go Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> * Capitalize logs Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> --------- Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> (cherry picked from commit 8b3d551)
…anslation and config applying (#5296) * add --emit-translation-events to toggle creating of events in translation and config applying * update changelog * Update internal/manager/run.go Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> * Capitalize logs Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> --------- Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> (cherry picked from commit 8b3d551)
* Fix: Add --emit-translation-events to toggle creating of events in translation and config applying (#5296) * add --emit-translation-events to toggle creating of events in translation and config applying * update changelog * Update internal/manager/run.go Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> * Capitalize logs Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> --------- Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> (cherry picked from commit 8b3d551) * fix: change events emit toggle name to --emit-kubernetes-events (#5299) --------- Co-authored-by: Tao Yi <tao.yi@konghq.com> Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
* Fix: Add --emit-translation-events to toggle creating of events in translation and config applying (#5296) * add --emit-translation-events to toggle creating of events in translation and config applying * update changelog * Update internal/manager/run.go Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> * Capitalize logs Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> --------- Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com> Co-authored-by: Jakub Warczarek <jakub.warczarek@konghq.com> (cherry picked from commit 8b3d551) * fix: change events emit toggle name to --emit-kubernetes-events (#5299) * docs: re-generate docs/cli-arguments.md Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com> * Update CHANGELOG Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com> --------- Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com> Co-authored-by: Tao Yi <tao.yi@konghq.com> Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
What this PR does / why we need it:
Add
--emit-translation-events
to disable creation of events for successful config applies, translation failures and config apply failures in translation to prevent large amount of events to be a source of load to k8s API server.Which issue this PR fixes:
fixes #5252.
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR