Skip to content

Commit b69f274

Browse files
committed
docs: add paragraph for the pool operations
Include how to create a pool, how to pause and it covers rollback. Signed-off-by: Alice Frosi <afrosi@redhat.com>
1 parent b3ed07b commit b69f274

3 files changed

Lines changed: 113 additions & 0 deletions

File tree

docs/src/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
# User Guide
66

77
- [Concepts](concepts.md)
8+
- [Operations](operations/index.md)
9+
- [Managing a pool](operations/pool.md)

docs/src/operations/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Operations
2+
3+
This chapter covers the day-to-day operations for managing nodes with the
4+
Bootc Operator.

docs/src/operations/pool.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Managing a pool
2+
3+
## Creating a pool
4+
5+
A `BootcNodePool` tells the operator which nodes to manage and what OS image
6+
they should be running. Create one by applying a manifest to your cluster:
7+
8+
```yaml
9+
apiVersion: node.bootc.dev/v1alpha1
10+
kind: BootcNodePool
11+
metadata:
12+
name: workers
13+
spec:
14+
nodeSelector:
15+
matchLabels:
16+
node-role.kubernetes.io/worker: ""
17+
image:
18+
ref: ghcr.io/bootc-dev/bink/node:latest
19+
```
20+
21+
The `nodeSelector` field follows the standard Kubernetes label selector format.
22+
Each node can belong to at most one pool, if a node matches multiple selectors,
23+
the affected pools are marked `Degraded` with reason `NodeConflict`.
24+
25+
The image in ref can be specified by digest or by tag. If it is specified by tag
26+
the bootc-operator controller will periodically checks for update. If a new image
27+
version under that tag is detected, then a rollout is started by patching the new
28+
digest in the bootc node spec.
29+
30+
Once the pool exists, the operator creates a `BootcNode` for each matching node
31+
and begins staging the image.
32+
33+
## Updating the OS image
34+
35+
To roll out a new OS image across the pool, update `spec.image.ref` to a new
36+
digest:
37+
38+
```shell
39+
kubectl patch bootcnodepool workers --type merge -p \
40+
'{"spec":{"image":{"ref":"ghcr.io/bootc-dev/bink/node@sha256:newdigest..."}}}'
41+
```
42+
43+
The operator stages the new image on each node, drains workloads, and reboots
44+
nodes according to the rollout settings. Nodes that are already running the
45+
target digest are left untouched.
46+
47+
## Monitoring a rollout
48+
49+
The `BootcNodePool` status shows the overall rollout progress:
50+
51+
```shell
52+
kubectl get bootcnodepool workers
53+
```
54+
55+
The columns `Nodes`, `Updated`, `Updating`, and `Degraded` give a quick
56+
summary. For more detail:
57+
58+
```shell
59+
kubectl get bootcnodepool workers -o yaml
60+
```
61+
62+
```yaml
63+
status:
64+
targetDigest: sha256:9ce7d6d15b8558c226b4c41f3b27bf1722897b0c8a66c7a84a2877bca8d049f7
65+
nodeCount: 10
66+
updatedCount: 7
67+
updatingCount: 2
68+
degradedCount: 1
69+
conditions:
70+
- type: UpToDate
71+
status: "False"
72+
reason: RolloutInProgress
73+
message: "7/10 updated; 2 staging, 1 rebooting"
74+
```
75+
76+
The `UpToDate` condition is `True` when all nodes in the pool are running
77+
the target digest.
78+
79+
Individual node progress is available through `BootcNode` resources:
80+
81+
```shell
82+
kubectl get bootcnodes
83+
```
84+
85+
Each `BootcNode` status reflects the output of `bootc status` on that node:
86+
the booted image, any staged image, and the rollback entry.
87+
88+
## Pausing and resuming
89+
90+
To pause a rollout (nodes already staging will complete, but no new reboots
91+
start):
92+
93+
```shell
94+
kubectl patch bootcnodepool workers --type merge -p '{"spec":{"rollout":{"paused":true}}}'
95+
```
96+
97+
To resume:
98+
99+
```shell
100+
kubectl patch bootcnodepool workers --type merge -p '{"spec":{"rollout":{"paused":false}}}'
101+
```
102+
103+
## Rolling back
104+
105+
To roll back, change `spec.image.ref` to the previous digest. Nodes already
106+
running that image are left alone. Nodes that were updated go through the
107+
normal staging and reboot cycle to return to the previous image.

0 commit comments

Comments
 (0)