https://github.com/k37y/oc-rpm
OpenShift CLI plug-in that displays the list of RPMs in an OpenShift release
https://github.com/k37y/oc-rpm
kubectl oc openshift openshift-v4 plugin
Last synced: about 1 year ago
JSON representation
OpenShift CLI plug-in that displays the list of RPMs in an OpenShift release
- Host: GitHub
- URL: https://github.com/k37y/oc-rpm
- Owner: k37y
- License: mit
- Created: 2023-05-29T08:11:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T12:10:26.000Z (over 2 years ago)
- Last Synced: 2025-02-24T12:39:04.000Z (over 1 year ago)
- Topics: kubectl, oc, openshift, openshift-v4, plugin
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## oc-rpm
[](https://github.com/kevydotvinu/oc-rpm/blob/main/LICENSE)
[](https://github.com/openshift/oc/blob/master/go.mod)
[](https://github.com/kevydotvinu/oc-rpm/releases)
[](https://github.com/kevydotvinu/oc-rpm/actions/workflows/build-and-release.yaml)
[](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/extending-cli-plugins.html)
### OpenShift CLI plug-in to list release RPMs
The oc-rpm is a CLI plug-in that works with oc/kubectl and gives the list of RPM packages in an OpenShift release.
### Prerequisites
- [OpenShift command-line interface (oc)](https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz)
- [Pull secret](https://console.redhat.com/openshift/downloads#tool-pull-secret)
### Installation
```bash
curl -#Lo oc-rpm $(curl -s https://api.github.com/repos/kevydotvinu/oc-rpm/releases/latest | jq -r '.assets | .[] | select(.name | contains("linux")) | .browser_download_url')
sudo mv oc-rpm /usr/local/bin/ && sudo chmod +x /usr/local/bin/oc-rpm
```
### Usage
##### List RPMs in a local cluster
```bash
export REGISTRY_AUTH_FILE=
oc rpm
```
##### List RPMs in an OpenShift release
```bash
export REGISTRY_AUTH_FILE=
oc rpm 4.13.0
```
> Default path of the authentication file is `${XDG_RUNTIME_DIR}/containers/auth.json` on Linux, and `$HOME/.config/containers/auth.json` on Windows/macOS. The file is created by podman login. If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using docker login.
> There is also the option to override the default path of the authentication file by setting the `REGISTRY_AUTH_FILE` environment variable. This can be done with `export REGISTRY_AUTH_FILE=path`.