Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e33f90b

Browse files
committedMar 3, 2025·
[WIP] Adding text and demo sciprts for OLMv1
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
1 parent 91441d0 commit e33f90b

File tree

5 files changed

+123
-2
lines changed

5 files changed

+123
-2
lines changed
 

‎Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ test:
5252
install: build
5353
install bin/kubectl-operator $(shell go env GOPATH)/bin
5454

55-
.PHONY: gen-demo
56-
gen-demo:
55+
.PHONY: gen-demo-v0
56+
gen-demo-v0:
5757
./assets/demo/gen-demo.sh
5858

59+
.PHONY: gen-demo-v1
60+
gen-demo-v1:
61+
./assets/demo/gen-demo_v1.sh
62+
5963
.PHONY: lint
6064
lint: $(GOLANGCI_LINT)
6165
$(GOLANGCI_LINT) --timeout 3m run

‎README.md

+10
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ for Operators in your cluster. It simplifies adding and removing Operator
55
catalogs, and it has familiar commands for installing, uninstalling, and
66
listing available and installed Operators.
77

8+
kubectl operator can be used for both OLM VO and V1.
9+
10+
To see the OLM V1 related commands , run
11+
12+
```
13+
kubectl operator olmv1 --help
14+
15+
```
816

917
> **NOTE**: This plugin requires Operator Lifecycle Manager to be installed in your
1018
cluster. See the OLM installation instructions [here](https://olm.operatorframework.io/docs/getting-started/)
1119

1220
## Demo
1321

22+
### OLM V0
23+
1424
![asciicast](assets/demo/demo.gif)
1525

1626
## Install

‎assets/demo/demo.v1.asciinema.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{"version": 2, "width": 238, "height": 59, "timestamp": 1741034593, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2+
[0.005626, "o", "\r\n$ "]
3+
[1.008203, "o", "k"]
4+
[1.071045, "o", "u"]
5+
[1.133252, "o", "b"]
6+
[1.195065, "o", "e"]
7+
[1.258393, "o", "c"]
8+
[1.321134, "o", "t"]
9+
[1.384103, "o", "l"]
10+
[1.446654, "o", " "]
11+
[1.509012, "o", "o"]
12+
[1.571749, "o", "p"]
13+
[1.634621, "o", "e"]
14+
[1.697188, "o", "r"]
15+
[1.760297, "o", "a"]
16+
[1.822929, "o", "t"]
17+
[1.886196, "o", "o"]
18+
[1.949057, "o", "r"]
19+
[2.011628, "o", " "]
20+
[2.074545, "o", "o"]
21+
[2.137528, "o", "l"]
22+
[2.20024, "o", "m"]
23+
[2.262908, "o", "v"]
24+
[2.325738, "o", "1"]
25+
[2.388861, "o", " "]
26+
[2.451459, "o", "-"]
27+
[2.514298, "o", "-"]
28+
[2.576988, "o", "h"]
29+
[2.640148, "o", "e"]
30+
[2.702779, "o", "l"]
31+
[2.765337, "o", "p"]
32+
[2.827918, "o", "\r\n"]
33+
[3.165474, "o", "Manage operators via OLMv1 in a cluster from the command line.\r\n\r\n"]
34+
[3.165794, "o", "Usage:\r\n operator olmv1 [command]\r\n\r\nAvailable Commands:\r\n get Display one or many OLMv1-specific resource(s)\r\n install Install an operator\r\n uninstall Uninstall an operator\r\n\r\nFlags:\r\n -h, --help help for olmv1\r\n\r\nGlobal Flags:\r\n -n, --namespace string If present, namespace scope for this CLI request\r\n --timeout duration The amount of time to wait before giving up on an operation. (default 1m0s)\r\n\r\nUse \"operator olmv1 [command] --help\" for more information about a command.\r\n"]
35+
[3.170564, "o", "\r\n$ "]
36+
[4.172615, "o", "k"]
37+
[4.235438, "o", "u"]
38+
[4.298459, "o", "b"]
39+
[4.360965, "o", "e"]
40+
[4.423794, "o", "c"]
41+
[4.486706, "o", "t"]
42+
[4.549287, "o", "l"]
43+
[4.611758, "o", " "]
44+
[4.674983, "o", "o"]
45+
[4.737843, "o", "p"]
46+
[4.80034, "o", "e"]
47+
[4.862598, "o", "r"]
48+
[4.925341, "o", "a"]
49+
[4.988341, "o", "t"]
50+
[5.050534, "o", "o"]
51+
[5.11247, "o", "r"]
52+
[5.174898, "o", " "]
53+
[5.237789, "o", "o"]
54+
[5.300794, "o", "l"]
55+
[5.363498, "o", "m"]
56+
[5.42627, "o", "v"]
57+
[5.489638, "o", "1"]
58+
[5.552128, "o", " "]
59+
[5.614388, "o", "g"]
60+
[5.676983, "o", "e"]
61+
[5.740007, "o", "t"]
62+
[5.802513, "o", " "]
63+
[5.865535, "o", "c"]
64+
[5.92837, "o", "a"]
65+
[5.991249, "o", "t"]
66+
[6.053865, "o", "a"]
67+
[6.115699, "o", "l"]
68+
[6.178064, "o", "o"]
69+
[6.239963, "o", "g"]
70+
[6.301853, "o", "\r\n"]
71+
[6.64591, "o", "NAME AVAILABILITY PRIORITY LASTUNPACKED SERVING AGE\r\noperatorhubio Available 0 3h3m True 3h3m\r\n"]

‎assets/demo/demo_v1.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
INTERACTIVE=${INTERACTIVE:-"1"}
4+
5+
run() {
6+
type "kubectl operator olmv1 --help"
7+
type "kubectl operator olmv1 get catalog"
8+
}
9+
10+
prompt() {
11+
echo ""
12+
echo -n "$ "
13+
}
14+
15+
type() {
16+
prompt
17+
sleep 1
18+
for (( i=0; i<${#1}; i++ )); do
19+
echo -n "${1:$i:1}"
20+
sleep 0.06
21+
done
22+
echo ""
23+
sleep 0.25
24+
eval $1
25+
[[ "$INTERACTIVE" == "1" ]] && read -p ""
26+
}
27+
28+
run

‎assets/demo/gen-demo_v1.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o pipefail
5+
6+
INTERACTIVE=0 asciinema rec --overwrite -c ./assets/demo/demo_v1.sh ./assets/demo/demo.v1.asciinema.json
7+
asciicast2gif -w 102 -h 34 ./assets/demo/demo.v1.asciinema.json ./assets/demo/demo-v1.gif
8+
rm ./assets/demo/demo.v1.asciinema.json

0 commit comments

Comments
 (0)
Please sign in to comment.