Skip to content

Commit

Permalink
sysdump: fix no Cilium output if operator was not detected
Browse files Browse the repository at this point in the history
Fixes regression from #1776

Signed-off-by: Marcel Zieba <[email protected]>
  • Loading branch information
marseel committed Jun 26, 2024
1 parent 9636a3e commit 2b764a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sysdump/sysdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func NewCollector(k KubernetesClient, o Options, startTime time.Time, cliVersion
c.log("🔮 Detected Cilium installation in namespace: %q", ns)
c.Options.CiliumNamespace = ns
} else {
c.log("ℹ️ Failed to detect Cilium installation")
c.logWarn("Failed to detect Cilium installation")
}
} else {
c.log("ℹ️ Cilium namespace: %s", c.Options.CiliumNamespace)
Expand All @@ -210,7 +210,7 @@ func NewCollector(k KubernetesClient, o Options, startTime time.Time, cliVersion
c.log("🔮 Detected Cilium operator in namespace: %q", ns)
c.Options.CiliumOperatorNamespace = ns
} else {
c.log("ℹ️ Failed to detect Cilium operator")
c.logWarn("Failed to detect Cilium operator")
}
} else {
c.log("ℹ️ Cilium operator namespace: %s", c.Options.CiliumOperatorNamespace)
Expand Down Expand Up @@ -1384,7 +1384,7 @@ func (c *Collector) Run() error {
})
}

if c.Options.CiliumNamespace != "" && c.Options.CiliumOperatorNamespace != "" {
if c.Options.CiliumNamespace != "" || c.Options.CiliumOperatorNamespace != "" {
tasks = append(tasks, ciliumTasks...)

serialTasks = append(serialTasks, Task{
Expand Down

0 comments on commit 2b764a4

Please sign in to comment.