cilium-cli icon indicating copy to clipboard operation
cilium-cli copied to clipboard

The `status` subcommand pod count is broken when CiliumEndpoints are disabled

Open asauber opened this issue 1 year ago • 0 comments

Bug report

General Information

  • Cilium CLI version (run cilium version)

v1.15.23

  • Orchestration system version in use (e.g. kubectl version, ...)

Any

  • Platform / infrastructure information (e.g. AWS / Azure / GCP, image / kernel versions)

Any

  • Link to relevant artifacts (policies, deployments scripts, ...)

In https://github.com/cilium/cilium-cli/pull/2320 we allowed the status subcommand to exit cleanly, even if it cannot determine the number of pods for the "X/Y managed by Cilium" pod count. It is inaccurate in cases where CiliumEndpoints have been disabled, for example with the disableEndpointCRD: "true" Helm chart setting. In such cases, Pods might be tracked using an external kvstore, which cilium-cli should query in order to produce this output.

Cluster Pods:          3/3 managed by Cilium

How to reproduce the issue

  1. Configure Cilium with disableEndpointCRD: "true"
  2. Confirm that there are no CiliumEndpoints
  3. Possibly roll pods that were previously associated with CiliumEndpoints (switching to `disableEndpointCRD: "true" post-install can be tricky)
  4. Run cilium status
  5. See "0/0 managed by Cilium", when we know that this is not the case.

asauber avatar Feb 26 '24 17:02 asauber