cilium / cilium-cli

CLI to install, manage & troubleshoot Kubernetes clusters running Cilium
https://cilium.io
Apache License 2.0
417 stars 210 forks source link

sysdump: fix no Cilium output if operator was not detected #2635

Closed marseel closed 3 months ago

marseel commented 3 months ago

Fixes regression from #1776

marseel commented 3 months ago

Hey @michi-covalent I thought about it a bit more with a fresh brain. I've added your snippet as a separate commit, but I still believe that having "&& -> ||" change makes sense as is orthogonal to your proposed change. If user does not specify a namespace at all and we fail to detect only one of agent/operator namespaces (for example if someone deletes operator deployment) we might still want to run agent tasks.

I've also opened https://github.com/cilium/cilium-cli/pull/2645 which seems like a reasonable next-step to improve the sysdump experience for users. Maybe good-first-time issue :) ?