Skip to content

Commit a6c7c2c

Browse files
[WIP] Adding text and demo sciprts for OLMv1
Signed-off-by: Lalatendu Mohanty <[email protected]>
1 parent 91441d0 commit a6c7c2c

File tree

5 files changed

+123
-2
lines changed

5 files changed

+123
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
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

Lines changed: 10 additions & 0 deletions
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

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{"version": 2, "width": 238, "height": 59, "timestamp": 1741035122, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2+
[0.00694, "o", "\r\n$ "]
3+
[1.008812, "o", "k"]
4+
[1.071419, "o", "u"]
5+
[1.134045, "o", "b"]
6+
[1.196899, "o", "e"]
7+
[1.259644, "o", "c"]
8+
[1.322171, "o", "t"]
9+
[1.38458, "o", "l"]
10+
[1.446732, "o", " "]
11+
[1.509282, "o", "o"]
12+
[1.571752, "o", "p"]
13+
[1.633689, "o", "e"]
14+
[1.69634, "o", "r"]
15+
[1.758733, "o", "a"]
16+
[1.820696, "o", "t"]
17+
[1.883169, "o", "o"]
18+
[1.945297, "o", "r"]
19+
[2.007862, "o", " "]
20+
[2.070137, "o", "o"]
21+
[2.132464, "o", "l"]
22+
[2.195207, "o", "m"]
23+
[2.257525, "o", "v"]
24+
[2.320083, "o", "1"]
25+
[2.382616, "o", " "]
26+
[2.444575, "o", "-"]
27+
[2.507354, "o", "-"]
28+
[2.569846, "o", "h"]
29+
[2.632602, "o", "e"]
30+
[2.69464, "o", "l"]
31+
[2.757316, "o", "p"]
32+
[2.820534, "o", "\r\n"]
33+
[3.165561, "o", "Manage operators via OLMv1 in a cluster from the command line.\r\n\r\n"]
34+
[3.165893, "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.16888, "o", "\r\n$ "]
36+
[4.171663, "o", "k"]
37+
[4.23439, "o", "u"]
38+
[4.297189, "o", "b"]
39+
[4.35961, "o", "e"]
40+
[4.421938, "o", "c"]
41+
[4.484191, "o", "t"]
42+
[4.546896, "o", "l"]
43+
[4.608991, "o", " "]
44+
[4.671543, "o", "o"]
45+
[4.734268, "o", "p"]
46+
[4.79688, "o", "e"]
47+
[4.858947, "o", "r"]
48+
[4.921002, "o", "a"]
49+
[4.983269, "o", "t"]
50+
[5.045912, "o", "o"]
51+
[5.108658, "o", "r"]
52+
[5.170577, "o", " "]
53+
[5.232759, "o", "o"]
54+
[5.294904, "o", "l"]
55+
[5.357823, "o", "m"]
56+
[5.420124, "o", "v"]
57+
[5.48196, "o", "1"]
58+
[5.544323, "o", " "]
59+
[5.606796, "o", "g"]
60+
[5.66873, "o", "e"]
61+
[5.731189, "o", "t"]
62+
[5.793563, "o", " "]
63+
[5.856048, "o", "c"]
64+
[5.917862, "o", "a"]
65+
[5.980359, "o", "t"]
66+
[6.043011, "o", "a"]
67+
[6.105319, "o", "l"]
68+
[6.167778, "o", "o"]
69+
[6.230328, "o", "g"]
70+
[6.292729, "o", "\r\n"]
71+
[6.655321, "o", "NAME AVAILABILITY PRIORITY LASTUNPACKED SERVING AGE\r\noperatorhubio Available 0 3h12m True 3h12m\r\n"]

assets/demo/demo_v1.sh

Lines changed: 28 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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)