Skip to content

Commit acd5e8d

Browse files
committed
Add docs about how to adopt v1beta2
Signed-off-by: apedriza <adripedriza@gmail.com>
1 parent ee115f4 commit acd5e8d

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

docs/update/migrate-v1beta2-api.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Migrate to v1beta2 APIs
2+
3+
This guide explains changes introduced in new `v1beta2` and how to migrate manifests from current `v1beta1` to the new k0smotron API.
4+
5+
## Deprecation Policy
6+
7+
Starting from `PLACCEHOLDER`, k0smotron uses new `v1beta2` API version as storage version and deprecate `v1beta1`, which still served for compatibility. K0smotron follows the [Kubernetes API deprecation policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/) for beta APIs:
8+
9+
- `v1beta1` is deprecated once `v1beta2` is the preferred/storage version.
10+
- `v1beta1` will be removed no earlier than `max(9 months, 3 minor releases)` after deprecation.
11+
- Until removal, `v1beta1` may still be served via conversion webhooks.
12+
- After removal, clients must use `v1beta2`.
13+
14+
## Changes per API group
15+
16+
### k0smotron.io
17+
18+
#### Cluster
19+
20+
- Storage config was restructured:
21+
- `spec.kineDataSourceURL` -> `spec.storage.kine.dataSourceURL`
22+
- `spec.kineDataSourceSecretName` -> `spec.storage.kine.dataSourceSecretName`
23+
- `spec.etcd` -> `spec.storage.etcd`
24+
- New selector field: `spec.storage.type` with values `etcd`, `kine`, `nats`.
25+
- Now, a Cluster state is reported using conditions as Kubernetes conventions follows. Details about introduced conditions can be found [here](https://github.com/k0sproject/k0smotron/pull/1365). This implies:
26+
- Move `Cluster` status reporting to Conditions.
27+
- Deprecate legacy status fields such as `status.ready` and `status.reconciliationStatus`.
28+
- TODO: check fields that can be removed in favor of patches.
29+
30+
!!! note
31+
32+
Downgrade caveat: `nats` has no `v1beta1` equivalent and is dropped on conversion back to `v1beta1`
33+
34+
#### JoinTokenRequest
35+
36+
- No changes between versions.
37+
38+
### bootstrap.cluster.x-k8s.io
39+
40+
#### K0sControllerConfig and K0sWorkerConfig
41+
42+
- `spec.ignition` and `spec.customUserDataRef` moved under `spec.provisioner`.
43+
- Renamed command fields:
44+
- `spec.preStartCommands` -> `spec.preK0sCommands`
45+
- `spec.postStartCommands` -> `spec.postK0sCommands`
46+
- Status moved from boolean ready flag to initialization struct:
47+
- `status.ready` -> `status.initialization.dataSecretCreated`
48+
49+
TODO: check CAPI changes
50+
51+
### controlplane.cluster.x-k8s.io
52+
53+
#### K0sControlPlane
54+
55+
TODO: check CAPI changes
56+
57+
- Status fields aligned to CAPI v1beta2 style:
58+
- `status.updatedReplicas` -> `status.upToDateReplicas`
59+
- `status.unavailableReplicas` replaced by `status.availableReplicas`
60+
- `status.initialized` -> `status.initialization.controlPlaneInitialized`
61+
- Several status counters are now optional pointers (may be unset early in reconciliation).
62+
63+
### infrastructure.cluster.x-k8s.io
64+
65+
TODO: check CAPI changes

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ nav:
5555
- Cluster API (HCP): update/update-cluster-pod.md
5656
- Cluster API (VMs): update/update-capi-cluster.md
5757
- Update workers (HCP): update/hcp-autopilot.md
58+
- Migrate to v1beta2 API: update/migrate-v1beta2-api.md
5859
- FAQ: faq.md
5960
- Troubleshooting: troubleshooting.md
6061
- Commercial Support: commercial-support.md

0 commit comments

Comments
 (0)