rancher / rancher/shell

[Feature Request] Include `yq` in container image

Open
#297 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement team/observability&backup
Dominant language
Shell
Stars
14
Forks
52
Avg merge
1d 22h
Merged PRs (30d)
27

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the rancher/shell container image definition and its tool-installation entry point. Add yq to the image and verify that it can run alongside kubectl, using the YAML query in the issue as a representative check. No file or test is named, and the issue has no comments.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, yaml
Domain
cli, devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.