Skip to content

Commit 95d2650

Browse files
committed
Fix review finding, update migration doc
1 parent 6d3697b commit 95d2650

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

controlplane/kubeadm/internal/controllers/controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ kubernetesVersion: metav1.16.1
13851385
g.Expect(kcp.Finalizers).To(ContainElement(controlplanev1.KubeadmControlPlaneFinalizer))
13861386

13871387
g.Expect(kcp.Status.Selector).NotTo(BeEmpty())
1388-
g.Expect(ptr.Deref(kcp.Status.Replicas, 0)).To(BeEquivalentTo(1))
1388+
g.Expect(kcp.Status.Replicas).To(HaveValue(BeEquivalentTo(1)))
13891389
g.Expect(v1beta1conditions.IsFalse(kcp, controlplanev1.AvailableV1Beta1Condition)).To(BeTrue())
13901390
g.Expect(conditions.IsFalse(kcp, controlplanev1.KubeadmControlPlaneInitializedCondition)).To(BeTrue())
13911391

@@ -1626,7 +1626,7 @@ kubernetesVersion: metav1.16.1`,
16261626
g.Expect(kcp.Finalizers).To(ContainElement(controlplanev1.KubeadmControlPlaneFinalizer))
16271627

16281628
g.Expect(kcp.Status.Selector).NotTo(BeEmpty())
1629-
g.Expect(ptr.Deref(kcp.Status.Replicas, 0)).To(BeEquivalentTo(1))
1629+
g.Expect(kcp.Status.Replicas).To(HaveValue(BeEquivalentTo(1)))
16301630
g.Expect(v1beta1conditions.IsFalse(kcp, controlplanev1.AvailableV1Beta1Condition)).To(BeTrue())
16311631

16321632
// Verify that the kubeconfig is using the custom CA

docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ proposal because most of the changes described below are a consequence of the wo
9898
- See changes that apply to [all CRDs](#all-crds)
9999
- The `spec.progressDeadlineSeconds` field (deprecated since CAPI v1.9) has been removed
100100
- Replica counters are now consistent with replica counters from other resources
101+
- `status.replicas` was made a pointer and omitempty was added
101102
- `status.readyReplicas` has now a new semantic based on machine's `Ready` condition
102103
- `status.availableReplicas` has now a new semantic based on machine's `Available` condition
103104
- `status.upToDateReplicas` has now a new semantic (and name) based on machine's `UpToDate` condition
@@ -111,6 +112,7 @@ proposal because most of the changes described below are a consequence of the wo
111112

112113
- See changes that apply to [all CRDs](#all-crds)
113114
- Replica counters fields are now consistent with replica counters from other resources
115+
- `status.replicas` was made a pointer and omitempty was added
114116
- `status.readyReplicas` has now a new semantic based on machine's `Ready` condition
115117
- `status.availableReplicas` has now a new semantic based on machine's `Available` condition
116118
- `status.upToDateReplicas` has now a new semantic (and name) based on machine's `UpToDate` condition
@@ -121,6 +123,7 @@ proposal because most of the changes described below are a consequence of the wo
121123
### MachinePool
122124

123125
- See changes that apply to [all CRDs](#all-crds)
126+
- `status.replicas` was made a pointer and omitempty was added
124127
- Support for terminal errors has been dropped.
125128
- `status.failureReason` and `status.failureMessage` will continue to exist temporarily under `status.deprecated.v1beta1`.
126129
- The const values for `Failed` phase has been deprecated in the enum type for `status.phase` (controllers are not setting this value anymore)
@@ -165,6 +168,7 @@ proposal because most of the changes described below are a consequence of the wo
165168
- KubeadmControlPlane (and the entire KCP provider) now implements the v1beta2 Cluster API contract.
166169
- See changes that apply to [all CRDs](#all-crds)
167170
- Replica counters fields are now consistent with replica counters from other resources.
171+
- `status.replicas` was made a pointer and omitempty was added
168172
- `status.readyReplicas` has now a new semantic based on machine's `Ready` condition
169173
- `status.availableReplicas` has now a new semantic based on machine's `Available` condition
170174
- `status.upToDateReplicas` has now a new semantic (and name) based on machine's `UpToDate` condition

0 commit comments

Comments
 (0)