Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Include yq in container image #297

Open
m-ildefons opened this issue Dec 13, 2024 · 0 comments
Open

[Feature Request] Include yq in container image #297

m-ildefons opened this issue Dec 13, 2024 · 0 comments

Comments

@m-ildefons
Copy link

Context

yq is a powerful command line tool for handling data in YAML format, as well as a few other related structured formats like TOML, JSON and CSV.
When working with the Rancher shell container, e.g. while using an interactive shell in the Rancher dashboard, it would be helpful to have this tool. Case in point: Filtering a potentially large list of objects and extracting just a subset of properties:

│ ~ │► kubectl -n default get pods -o yaml | yq '.items[] | select(.status.podIP == "10.52.0.82") | {"name": .metadata.name, "ip": .status.podIP, "QoS": .status.qosClass}'
name: virt-launcher-test-explicit-zqzlp
ip: 10.52.0.82
QoS: Burstable

The above command gets a list of all Pods in default namespace and extracts just the name, IP address and QoS class of the one Pod whose IP address matches the given one.

This is just an example of how yq can be useful in conjunction with kubectl and how it could significantly enhance the capabilities of the shell.

Request

Could yq be included in the rancher/shell container image by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant