-
Notifications
You must be signed in to change notification settings - Fork 208
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
sysdump: fix no Cilium output if operator was not detected #2635
Conversation
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.
we chatted about this a bit offline. ideally --cilium-namespace
should set namespace for both cilium-agent
and cilium-operator
unless --cilium-operator-namespace
is also specified. could we do something like this:
% git diff
diff --git a/cli/sysdump.go b/cli/sysdump.go
index 2069e548..de6fc8d3 100644
--- a/cli/sysdump.go
+++ b/cli/sysdump.go
@@ -34,8 +34,12 @@ func newCmdSysdump(hooks sysdump.Hooks) *cobra.Command {
if sysdumpOptions.CiliumNamespace == "" && cmd.Flags().Changed("namespace") {
sysdumpOptions.CiliumNamespace = namespace
}
- if sysdumpOptions.CiliumOperatorNamespace == "" && cmd.Flags().Changed("namespace") {
- sysdumpOptions.CiliumOperatorNamespace = namespace
+ if sysdumpOptions.CiliumOperatorNamespace == "" {
+ if cmd.Flags().Changed("namespace") {
+ sysdumpOptions.CiliumOperatorNamespace = namespace
+ } else {
+ sysdumpOptions.CiliumOperatorNamespace = sysdumpOptions.CiliumNamespace
+ }
}
// Honor --helm-release-name global flag in case it is set and --cilium-helm-release-name is not set
if sysdumpOptions.CiliumHelmReleaseName == "" && cmd.Flags().Changed("helm-release-name") {
2b764a4
to
e940151
Compare
e940151
to
c602cc9
Compare
Fixes regression from cilium#1776 Signed-off-by: Marcel Zieba <[email protected]>
Co-authored-by: Michi Mutsuzaki <[email protected]> Signed-off-by: Marcel Zieba <[email protected]>
c602cc9
to
14b4a74
Compare
Hey @michi-covalent I've also opened #2645 which seems like a reasonable next-step to improve the sysdump experience for users. Maybe good-first-time issue :) ? |
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.
🚀
Fixes regression from #1776