openshift / managed-scripts

BackplaneM3-managed scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add yq to command line tools

k-wall opened this issue · comments

In our use-case (Managed Kafka) we are using oc adm inspect to grab kubernetes state. In some cases, we want to exclude some fields from the yaml output files generated by inspect. Unfortunately the oc adm inspect command line does not support a --output=json mode, so we cannot use jq.

Could you consider adding yq to the command line tools available to an ocm backplace script?

Happy to raise a PR.

I'll let the maintailers of this repo to respond (also i'll mention it in the place they respond more ofter)

@k-wall This make sense to me, could you go ahead create a PR to add that in our base image?

We could add a different tool that should be able to do both (bit is less common)
https://github.com/itchyny/gojq

It seems to:

  • have yaml support
  • have golang types and functions
  • purely written in go (so contributions are easier)

We could add a different tool that should be able to do both (bit is less common) https://github.com/itchyny/gojq

I don't see an RPM for gojq. There is a bugzilla for it, https://bugzilla.redhat.com/show_bug.cgi?id=2009498 but that is being reviewed.

The Dockerfile could build it from source, but wouldn't that create a supply chain concern?

I guess that now that we have the bz, we can create the yq and migrate away once we have it

I hit a wall trying to get the package into UBI