pixie icon indicating copy to clipboard operation
pixie copied to clipboard

Add pixie-operator pod logs to `px collect-logs` CLI output.

Open htroisi opened this issue 3 years ago • 0 comments

Pixie's CLI allows you to gather Pixie logs using the px collect-logs command. The output logs should also include the pixie-operator pod logs, if applicable.

htroisi avatar Aug 05 '22 19:08 htroisi

Hi, I saw this marked as a good first issue. Could I try picking it up?

victor-timofei avatar Aug 14 '22 16:08 victor-timofei

@victor-timofei - Yes, we'd be happy have you contribute this fix!

I have a suspicion that this has to do with the fact that the pixie-operator pod does not have an app label, like the rest of the Pixie pods: image

To test out your changes to the Pixie CLI:

cd pixie/src/pixie_cli
go run px.go <CLI_COMMAND>
# To test your changes to the `px collect-logs` command, you'd run `go run px.go collect-logs`

htroisi avatar Aug 16 '22 22:08 htroisi

Yeah, you are right. It is because the app label is missing.

I've noticed the pixie-operator-index pod is deployed by the OLM. I did a fast check on the CatalogSource CRD to find what options it supports, and I could not find any way to add labels.

  1. I could follow up with the OLM folks and see if there is any way to add labels to an operator(or if it would be possible to extend the CRD?).
  2. I guess the operator could append the labels on itself(although I think this is a little hacky).

victor-timofei avatar Aug 18 '22 16:08 victor-timofei

@victor-timofei you could create a OperatorLabelSelector() function similar to the existing VizierLabelSelector() that selects for the olm.catalogSource=pixie-operator-index label.

htroisi avatar Aug 18 '22 18:08 htroisi

@victor-timofei thank you for contributing this! 🙏

htroisi avatar Aug 26 '22 20:08 htroisi