gmeghnag / omc

OpenShift Must-Gather Client
Apache License 2.0
153 stars 63 forks source link

omc certs inspect does not use the -n flag #163

Closed linuxstudio closed 2 months ago

linuxstudio commented 6 months ago

omc certs inspect does not use the -n flag, even if that is mentioned in the help output:

$ omc certs inspect --help
certificate inspect

Usage:
  omc certs inspect [flags]

Flags:
  -h, --help   help for inspect

Global Flags:
  -A, --all-namespaces       If present, list the requested object(s) across all namespaces.
      --list-non-certs       If present, list resources regardless if it contains a certificate.
  -n, --namespace string     If present, list the requested object(s) for a specific namespace.
  -o, --output string        Output format. One of: json|yaml|wide
      --show-parse-failure   If present, list the output of parse attempts for resources.
  -v, --v Level              number for the log level verbosity

As it is now, the command looks in all namespaces of the must-gather

rishabhsvats commented 5 months ago

@linuxstudio This works for me. Using -n flag list namespace specific certificates.

$ omc certs inspect -A| wc -l
258
$ omc certs inspect -n default| wc -l
86

The kubernetes.io/service-account-token seems repetitive in every namespace - that could create some confusion.

gmeghnag commented 3 months ago

It works for me too, please @linuxstudio provide the output from the following commands:

omc certs inspect -A| wc -l
omc certs inspect -n default| wc -l
linuxstudio commented 2 months ago

@gmeghnag just checked with a must-gather and have the following:

$ omc certs inspect -A| wc -l 15658 omc certs inspect -n default| wc -l 299

I can confirm that the command honors the -n flag correctly. This issue can be closed.