Skip to content

Commit 3583fc5

Browse files
refactor: streamline README to focus on container usage
Move "Using Go Run" and "As kubectl Plugin" sections to docs/usage.md, move "Building from Source" and "Building Container Image" to docs/setup.md, remove ODH references from description, and use :dev image tag in examples. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e566a43 commit 3583fc5

File tree

3 files changed

+64
-67
lines changed

3 files changed

+64
-67
lines changed

README.md

Lines changed: 10 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# odh-cli
22

3-
CLI tool for ODH (Open Data Hub) and RHOAI (Red Hat OpenShift AI) for interacting with ODH/RHOAI deployments on Kubernetes.
3+
CLI tool for RHOAI (Red Hat OpenShift AI) for interacting with RHOAI deployments on Kubernetes.
44

55
## Quick Start
66

@@ -12,14 +12,14 @@ Run the CLI using the pre-built container image:
1212
```bash
1313
podman run --rm -ti \
1414
-v $KUBECONFIG:/kubeconfig \
15-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest lint --target-version 3.3.0
15+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev lint --target-version 3.3.0
1616
```
1717

1818
**Docker:**
1919
```bash
2020
docker run --rm -ti \
2121
-v $KUBECONFIG:/kubeconfig \
22-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest lint --target-version 3.3.0
22+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev lint --target-version 3.3.0
2323
```
2424

2525
The container has `KUBECONFIG=/kubeconfig` set by default, so you just need to mount your kubeconfig to that path.
@@ -29,12 +29,12 @@ The container has `KUBECONFIG=/kubeconfig` set by default, so you just need to m
2929
> # Podman
3030
> podman run --rm -ti \
3131
> -v $KUBECONFIG:/kubeconfig:Z \
32-
> quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest lint --target-version 3.3.0
32+
> quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev lint --target-version 3.3.0
3333
>
3434
> # Docker
3535
> docker run --rm -ti \
3636
> -v $KUBECONFIG:/kubeconfig:Z \
37-
> quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest lint --target-version 3.3.0
37+
> quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev lint --target-version 3.3.0
3838
> ```
3939
4040
**Available Tags:**
@@ -53,15 +53,15 @@ The container includes kubectl, oc, and debugging utilities for interactive trou
5353
podman run -it --rm \
5454
-v $KUBECONFIG:/kubeconfig \
5555
--entrypoint /bin/bash \
56-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest
56+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev
5757
```
5858
5959
**Docker:**
6060
```bash
6161
docker run -it --rm \
6262
-v $KUBECONFIG:/kubeconfig \
6363
--entrypoint /bin/bash \
64-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest
64+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev
6565
```
6666

6767
Once inside the container, use kubectl/oc/wget/curl:
@@ -80,7 +80,7 @@ For environments where you have a token and server URL instead of a kubeconfig f
8080
**Podman:**
8181
```bash
8282
podman run --rm -ti \
83-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest \
83+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev \
8484
lint \
8585
--target-version 3.3.0 \
8686
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
@@ -90,76 +90,19 @@ podman run --rm -ti \
9090
**Docker:**
9191
```bash
9292
docker run --rm -ti \
93-
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:latest \
93+
quay.io/rhoai/rhoai-upgrade-helpers-rhel9:dev \
9494
lint \
9595
--target-version 3.3.0 \
9696
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
9797
--server=https://api.my-cluster.p3.openshiftapps.com:6443
9898
```
9999

100-
### Using Go Run (No Installation Required)
101-
102-
If you have Go installed, you can run the CLI directly from GitHub without cloning:
103-
104-
```bash
105-
# Show help
106-
go run github.com/opendatahub-io/odh-cli/cmd@latest --help
107-
108-
# Show version
109-
go run github.com/opendatahub-io/odh-cli/cmd@latest version
110-
111-
# Run lint command
112-
go run github.com/opendatahub-io/odh-cli/cmd@latest lint --target-version 3.3.0
113-
```
114-
115-
> **Note:** Replace `@latest` with `@v1.2.3` to run a specific version, or `@main` for the latest development version.
116-
117-
**Token Authentication:**
118-
119-
```bash
120-
go run github.com/opendatahub-io/odh-cli/cmd@latest \
121-
lint \
122-
--target-version 3.3.0 \
123-
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
124-
--server=https://api.my-cluster.p3.openshiftapps.com:6443
125-
```
126-
127-
**Available commands:**
128-
- `lint` - Validate cluster configuration and assess upgrade readiness
129-
- `version` - Display CLI version information
130-
131-
### As kubectl Plugin
132-
133-
Install the `kubectl-odh` binary to your PATH:
134-
135-
```bash
136-
# Download from releases
137-
# Place in PATH as kubectl-odh
138-
# Use with kubectl
139-
kubectl odh lint --target-version 3.3.0
140-
kubectl odh version
141-
```
142-
143100
## Documentation
144101

145102
For detailed documentation, see:
103+
- [Alternative Usage Methods](docs/usage.md) - Using Go Run, kubectl plugin
146104
- [Design and Architecture](docs/design.md)
147105
- [Development Guide](docs/development.md)
148106
- [Lint Architecture](docs/lint/architecture.md)
149107
- [Writing Lint Checks](docs/lint/writing-checks.md)
150108

151-
## Building from Source
152-
153-
```bash
154-
make build
155-
```
156-
157-
The binary will be available at `bin/kubectl-odh`.
158-
159-
## Building Container Image
160-
161-
```bash
162-
make publish
163-
```
164-
165-
This builds a multi-platform container image (linux/amd64, linux/arm64).

docs/setup.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ make clean
5252
-`gofmt` - Use `make fmt` instead
5353
-`goimports` - Use `make fmt` instead
5454

55+
## Building Container Image
56+
57+
```bash
58+
make publish
59+
```
60+
61+
This builds a multi-platform container image (linux/amd64, linux/arm64).
62+
5563
## Test Commands
5664

5765
```bash

docs/usage.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Alternative Usage Methods
2+
3+
For container-based usage (recommended), see the [README](../README.md).
4+
5+
## Using Go Run (No Installation Required)
6+
7+
If you have Go installed, you can run the CLI directly from GitHub without cloning:
8+
9+
```bash
10+
# Show help
11+
go run github.com/opendatahub-io/odh-cli/cmd@latest --help
12+
13+
# Show version
14+
go run github.com/opendatahub-io/odh-cli/cmd@latest version
15+
16+
# Run lint command
17+
go run github.com/opendatahub-io/odh-cli/cmd@latest lint --target-version 3.3.0
18+
```
19+
20+
> **Note:** Replace `@latest` with `@v1.2.3` to run a specific version, or `@main` for the latest development version.
21+
22+
**Token Authentication:**
23+
24+
```bash
25+
go run github.com/opendatahub-io/odh-cli/cmd@latest \
26+
lint \
27+
--target-version 3.3.0 \
28+
--token=sha256~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
29+
--server=https://api.my-cluster.p3.openshiftapps.com:6443
30+
```
31+
32+
**Available commands:**
33+
- `lint` - Validate cluster configuration and assess upgrade readiness
34+
- `version` - Display CLI version information
35+
36+
## As kubectl Plugin
37+
38+
Install the `kubectl-odh` binary to your PATH:
39+
40+
```bash
41+
# Download from releases
42+
# Place in PATH as kubectl-odh
43+
# Use with kubectl
44+
kubectl odh lint --target-version 3.3.0
45+
kubectl odh version
46+
```

0 commit comments

Comments
 (0)