forked from kubernetes-sigs/node-readiness-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.tape
More file actions
91 lines (82 loc) · 2.24 KB
/
demo.tape
File metadata and controls
91 lines (82 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Run `vhs demo.tape` from rootdir to recreate demo
# Output file
Output docs/demo.gif
# Terminal styling
Set FontSize 16
Set Width 1200
Set Height 600
Set Theme "GitHub Dark"
# Typing speed configuration
Set TypingSpeed 35ms
# --- SETUP ---
Hide
# Expect the kind cluster is already created following docs/TEST_README.md
Type "kubectl config use-context kind-nrr-test"
Enter
# Ensure the node starts in a "Tainted" state (Condition False -> Taint Present)
Type "./hack/test-workloads/flip-node-condition.sh nrr-test-worker network.k8s.io/CalicoReady false"
Enter
Type "clear"
Enter
Show
# --- DEMO START ---
# 1. Show the test setup
Hide
Type "# 1. Test setup: Kind cluster with a control-plane and a worker node"
Show
Sleep 1s
Enter
Type@15ms `kubectl get nodes`
Enter
Sleep 2s
Hide
Enter 2
Type "# NodeReadiness controller installed on control-plane node"
Show
Sleep 2s
Enter
Type "kubectl get deploy -n nrr-system"
Enter
Sleep 2s
# 2. Show the Worker node is currently Tainted
Hide
Enter 2
Type "# 2. Worker node has a Taint 'readiness.k8s.io/NetworkReady' because CalicoReady is missing/false"
Show
Sleep 2s
Enter
Type@15ms `kubectl get node nrr-test-worker -o custom-columns="NAME:.metadata.name,STATUS:.status.conditions[?(@.type=='network.k8s.io/CalicoReady')].status,TAINTS:.spec.taints[*].key"`
Enter 1
Sleep 3s
# 3. Show the Rule enforcing this
Hide
Enter 2
Type "# 2. Why? The NodeReadinessRule requires 'network.k8s.io/CalicoReady'"
Show
Sleep 2s
Enter
Type "cat examples/network-readiness-rule.yaml"
Enter 1
Sleep 5s
# 4. Simulate the CNI becoming Ready
Hide
Enter 2
Type "# 4. Simulate the CNI plugin reporting 'Ready' status"
Show
Sleep 2s
Enter
Type@15ms "./hack/test-workloads/flip-node-condition.sh nrr-test-worker network.k8s.io/CalicoReady true"
Enter 1
Sleep 4s
# 5. Verify the Taint is gone
Hide
Enter 2
Type "# 5. NodeReadiness controller on observing the expected status change will remove the taint hold on the node"
Show
Sleep 2s
Enter
Type@15ms `kubectl get node nrr-test-worker -o custom-columns="NAME:.metadata.name,STATUS:.status.conditions[?(@.type=='network.k8s.io/CalicoReady')].status,TAINTS:.spec.taints[*].key"`
Enter 2
Sleep 2s
Type "# Success! The Controller automatically removed the managed taint and node is ready for workloads"
Sleep 3s