Skip to content

Commit ccfdd68

Browse files
authored
🌱 Update examples & code snippets in Cluster API book to v1beta2 for Cluster (#12483)
* update doc for Cluster Signed-off-by: sivchari <[email protected]> * fix review findings Signed-off-by: sivchari <[email protected]> * address review comment Signed-off-by: sivchari <[email protected]> * update docs again Signed-off-by: sivchari <[email protected]> --------- Signed-off-by: sivchari <[email protected]>
1 parent bdae82c commit ccfdd68

File tree

8 files changed

+14
-12
lines changed

8 files changed

+14
-12
lines changed

‎docs/book/src/developer/providers/getting-started/building-running-and-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You best watch the Kubernetes pods with something like `k9s -A` or `watch kubect
140140
Let's try our cluster out. We'll make some simple YAML:
141141

142142
```yaml
143-
apiVersion: cluster.x-k8s.io/v1beta1
143+
apiVersion: cluster.x-k8s.io/v1beta2
144144
kind: Cluster
145145
metadata:
146146
name: hello-mailgun
@@ -149,7 +149,7 @@ spec:
149149
pods:
150150
cidrBlocks: ["192.168.0.0/16"]
151151
infrastructureRef:
152-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
152+
apiGroup: infrastructure.cluster.x-k8s.io
153153
kind: MailgunCluster
154154
name: hello-mailgun
155155
---

‎docs/book/src/security/pod-security-standards.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,16 @@ It is also possible to disable this patch or configure different levels for the
195195
using variables.
196196

197197
```yaml
198-
apiVersion: cluster.x-k8s.io/v1beta1
198+
apiVersion: cluster.x-k8s.io/v1beta2
199199
kind: Cluster
200200
metadata:
201201
name: "my-cluster"
202202
spec:
203203
...
204204
topology:
205205
...
206-
class: my-secure-cluster-class
206+
classRef:
207+
name: my-secure-cluster-class
207208
variables:
208209
- name: podSecurityStandard
209210
value:

‎docs/book/src/tasks/bootstrap/kubeadm-bootstrap/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ metadata:
2222
name: my-cluster-docker
2323
---
2424
kind: Cluster
25-
apiVersion: cluster.x-k8s.io/v1beta1
25+
apiVersion: cluster.x-k8s.io/v1beta2
2626
metadata:
2727
name: my-cluster
2828
spec:
2929
infrastructureRef:
3030
kind: DockerCluster
31-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
31+
apiGroup: infrastructure.cluster.x-k8s.io
3232
name: my-cluster-docker
3333
```
3434

‎docs/book/src/tasks/bootstrap/microk8s-bootstrap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Cluster API bootstrap provider MicroK8s (CABPM) is a component responsible for g
1313
MicroK8s defines a `MicroK8sControlPlane` definition as well as the `MachineDeployment` to configure the control plane and worker nodes respectively. The `MicroK8sControlPlane` is linked in the cluster definition as shown in the following example:
1414

1515
```yaml
16-
apiVersion: cluster.x-k8s.io/v1beta1
16+
apiVersion: cluster.x-k8s.io/v1beta2
1717
kind: Cluster
1818
spec:
1919
controlPlaneRef:
20-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
20+
apiGroup: controlplane.cluster.x-k8s.io
2121
kind: MicroK8sControlPlane
2222
name: capi-aws-control-plane
2323
```

‎docs/book/src/tasks/experimental-features/cluster-class/operate-cluster.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ The patch will make the following change to the Cluster yaml:
3939
```diff
4040
spec:
4141
topology:
42-
class: quick-start
42+
classRef:
43+
name: quick-start
4344
+ version: v1.22.0
4445
- version: v1.21.2
4546
```

‎docs/book/src/tasks/experimental-features/runtime-sdk/implement-topology-mutation-hook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Note: We enforce that variable conflicts have to be resolved by ClusterClass aut
133133
Variables that are defined with external variable definitions can be set like regular variables in Cluster `.spec.topology.variables`.
134134

135135
```yaml
136-
apiVersion: cluster.x-k8s.io/v1beta1
136+
apiVersion: cluster.x-k8s.io/v1beta2
137137
kind: Cluster
138138
#metadata
139139
spec:

‎docs/book/src/tasks/using-kustomize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Add the following content to the `namereference.yaml` transformer configuration:
123123
```yaml
124124
- kind: Cluster
125125
group: cluster.x-k8s.io
126-
version: v1alpha3
126+
version: v1beta2
127127
fieldSpecs:
128128
- path: spec/clusterName
129129
kind: MachineDeployment

‎docs/book/src/tasks/workload-bootstrap-gitops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Follow the quickstart setup guide for your provider but ensure that CAAPH is ins
1414
Add the labels `argoCDChart: enabled` and `guestbook: enabled` to your desired workload cluster yaml file in the `Cluster` metadata section, for example:
1515

1616
```yaml
17-
apiVersion: cluster.x-k8s.io/v1beta1
17+
apiVersion: cluster.x-k8s.io/v1beta2
1818
kind: Cluster
1919
metadata:
2020
name: my-cluster

0 commit comments

Comments
 (0)