Skip to content

Commit dce736a

Browse files
imdegaraeapedriza
andauthored
Remove unneeded K0sControlPlane.Status.ControlPlaneReady field (#934)
Signed-off-by: Adrian Pedriza <[email protected]> Co-authored-by: Adrian Pedriza <[email protected]>
1 parent 70aec64 commit dce736a

File tree

6 files changed

+1
-16
lines changed

6 files changed

+1
-16
lines changed

api/controlplane/v1beta1/k0s_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ type K0sControlPlaneList struct {
128128
type K0sControlPlaneStatus struct {
129129
// Ready denotes that the control plane is ready
130130
Ready bool `json:"ready"`
131-
ControlPlaneReady bool `json:"controlPlaneReady"`
132131
Inititalized bool `json:"initialized"`
133132
ExternalManagedControlPlane bool `json:"externalManagedControlPlane"`
134133
Replicas int32 `json:"replicas"`

config/clusterapi/controlplane/bases/controlplane.cluster.x-k8s.io_k0scontrolplanes.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ spec:
370370
- type
371371
type: object
372372
type: array
373-
controlPlaneReady:
374-
type: boolean
375373
externalManagedControlPlane:
376374
type: boolean
377375
initialized:
@@ -396,7 +394,6 @@ spec:
396394
version:
397395
type: string
398396
required:
399-
- controlPlaneReady
400397
- externalManagedControlPlane
401398
- initialized
402399
- ready

config/crd/bases/controlplane.cluster.x-k8s.io_k0scontrolplanes.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ spec:
370370
- type
371371
type: object
372372
type: array
373-
controlPlaneReady:
374-
type: boolean
375373
externalManagedControlPlane:
376374
type: boolean
377375
initialized:
@@ -396,7 +394,6 @@ spec:
396394
version:
397395
type: string
398396
required:
399-
- controlPlaneReady
400397
- externalManagedControlPlane
401398
- initialized
402399
- ready

docs/resource-reference.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,13 +1947,6 @@ More info: http://kubernetes.io/docs/user-guide/labels<br/>
19471947
</tr>
19481948
</thead>
19491949
<tbody><tr>
1950-
<td><b>controlPlaneReady</b></td>
1951-
<td>boolean</td>
1952-
<td>
1953-
<br/>
1954-
</td>
1955-
<td>true</td>
1956-
</tr><tr>
19571950
<td><b>externalManagedControlPlane</b></td>
19581951
<td>boolean</td>
19591952
<td>

internal/controller/controlplane/k0s_controlplane_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (c *K0sController) Reconcile(ctx context.Context, req ctrl.Request) (res ct
163163
}
164164
log.Info("Status updated successfully")
165165

166-
if kcp.Status.ControlPlaneReady {
166+
if kcp.Status.Ready {
167167
if perr := c.Client.Patch(ctx, cluster, client.Merge); perr != nil {
168168
err = fmt.Errorf("failed to patch cluster: %w", perr)
169169
}

internal/controller/controlplane/status.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ func (c *K0sController) updateStatus(ctx context.Context, kcp *cpv1beta1.K0sCont
188188
// Set the conditions
189189
conditions.MarkTrue(kcp, cpv1beta1.ControlPlaneReadyCondition)
190190
kcp.Status.Ready = true
191-
kcp.Status.ControlPlaneReady = true
192191
kcp.Status.Inititalized = true
193192

194193
// Set the k0s cluster ID annotation

0 commit comments

Comments
 (0)