Skip to content

Commit eebe65f

Browse files
committed
Readme update
1 parent 33675ce commit eebe65f

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,8 @@ update-k8s-version: ## Update Kubernetes API version in version.go and .goreleas
212212
@sed -i.bak 's/KUBERNETES_VERSION=.*/KUBERNETES_VERSION=$(K8S_VERSION)/' build/.goreleaser.yml
213213
@# Clean up backup files
214214
@find . -name "*.bak" -type f -delete
215+
216+
.PHONY: demo-generate
217+
demo-generate: ## Generate a new demo recording
218+
@chmod +x scripts/record-demo.sh
219+
@./scripts/record-demo.sh

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ Every month, our team meets on the first Thursday at 11:00 PT (Pacific Time) to
173173
Please note that we have been syncing more frequently offline via Slack lately. However, if you add a topic to the agenda, we will hold the meeting as scheduled.
174174
Additionally, we can use this channel to demonstrate new features.
175175

176+
## Demo
177+
178+
[![asciicast](https://asciinema.org/a/YOUR_CAST_ID.svg)](https://asciinema.org/a/YOUR_CAST_ID)
179+
176180
[operator-sdk]: https://github.com/operator-framework/operator-sdk
177181
[plugin-section]: https://book.kubebuilder.io/plugins/plugins.html
178182
[controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime

scripts/record-demo.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Ensure asciinema is installed
5+
if ! command -v asciinema &> /dev/null; then
6+
echo "Error: asciinema is not installed. Please install it first."
7+
echo "Visit https://asciinema.org/docs/installation for instructions."
8+
exit 1
9+
fi
10+
11+
# Start recording
12+
echo "Starting demo recording..."
13+
asciinema rec -t "Kubebuilder Demo" demo.cast << EOF
14+
15+
# Show basic kubebuilder commands
16+
echo "# Initialize a new project with Kubebuilder"
17+
kubebuilder init --domain example.com --repo example.com/demo
18+
19+
echo "# Create a new API"
20+
kubebuilder create api --group webapp --version v1 --kind Guestbook
21+
22+
echo "# Build and run the controller"
23+
make install
24+
make run
25+
26+
# Add small delays to make the demo more readable
27+
sleep 2
28+
29+
EOF
30+
31+
echo "Recording completed! The demo has been saved as 'demo.cast'"

0 commit comments

Comments
 (0)