Skip to content

Commit 0effc02

Browse files
author
Joshua Reed
committed
Cleanup.
1 parent 2a3396d commit 0effc02

4 files changed

+6
-60
lines changed

config/crd/bases/infrastructure.cluster.x-k8s.io_cloudstackclusters.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,22 +284,6 @@ spec:
284284
- zone
285285
type: object
286286
type: array
287-
identityRef:
288-
description: CloudStackIdentityReference is a reference to an infrastructure
289-
provider identity to be used to provision cluster resources.
290-
properties:
291-
kind:
292-
description: Kind of the identity. Must be supported by the infrastructure
293-
provider and may be either cluster or namespace-scoped.
294-
minLength: 1
295-
type: string
296-
name:
297-
description: Name of the infrastructure identity to be used.
298-
type: string
299-
required:
300-
- kind
301-
- name
302-
type: object
303287
required:
304288
- controlPlaneEndpoint
305289
- failureDomains

config/crd/bases/infrastructure.cluster.x-k8s.io_cloudstackmachines.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,6 @@ spec:
390390
id:
391391
description: ID.
392392
type: string
393-
identityRef:
394-
description: IdentityRef is a reference to a identity to be used when
395-
reconciling this cluster
396-
properties:
397-
kind:
398-
description: Kind of the identity. Must be supported by the infrastructure
399-
provider and may be either cluster or namespace-scoped.
400-
minLength: 1
401-
type: string
402-
name:
403-
description: Name of the infrastructure identity to be used.
404-
type: string
405-
required:
406-
- kind
407-
- name
408-
type: object
409393
instanceID:
410394
description: Instance ID. Should only be useful to modify an existing
411395
instance.
@@ -476,11 +460,8 @@ spec:
476460
ready:
477461
description: Ready indicates the readiness of the provider resource.
478462
type: boolean
479-
zoneID:
480-
description: Zone ID is used so that the zone can be computed once
481-
per reconcile and then propagate.
482-
type: string
483463
required:
464+
- addresses
484465
- ready
485466
type: object
486467
type: object

config/crd/bases/infrastructure.cluster.x-k8s.io_cloudstackmachinetemplates.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -343,24 +343,6 @@ spec:
343343
id:
344344
description: ID.
345345
type: string
346-
identityRef:
347-
description: IdentityRef is a reference to a identity to be
348-
used when reconciling this cluster
349-
properties:
350-
kind:
351-
description: Kind of the identity. Must be supported by
352-
the infrastructure provider and may be either cluster
353-
or namespace-scoped.
354-
minLength: 1
355-
type: string
356-
name:
357-
description: Name of the infrastructure identity to be
358-
used.
359-
type: string
360-
required:
361-
- kind
362-
- name
363-
type: object
364346
instanceID:
365347
description: Instance ID. Should only be useful to modify
366348
an existing instance.

controllers/utils/base_reconciler.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ type ReconciliationRunner struct {
7878
type ConcreteRunner interface {
7979
ReconcileDelete() (ctrl.Result, error)
8080
Reconcile() (ctrl.Result, error)
81-
GetReconcilationSubject() client.Object
8281
}
8382

83+
// NewRunner creates a new ReconciliationRunner pointing to the concrete reconciliation subject.
8484
func NewRunner(concreteRunner ConcreteRunner, subject client.Object, kind string) *ReconciliationRunner {
8585
r := ReconciliationRunner{ReconcilerBase: &ReconcilerBase{}}
8686
r.CSCluster = &infrav1.CloudStackCluster{}
@@ -92,13 +92,11 @@ func NewRunner(concreteRunner ConcreteRunner, subject client.Object, kind string
9292
return &r
9393
}
9494

95-
func (r *ReconciliationRunner) GetReconcilationSubject() client.Object {
96-
return r.ReconciliationSubject
97-
}
98-
95+
// UsingBaseReconciler sets up the reconciler to use base reconciler data and either default or alternative
96+
// feature implementations.
9997
func (r *ReconciliationRunner) UsingBaseReconciler(base ReconcilerBase) *ReconciliationRunner {
10098
*r.ReconcilerBase = base
101-
// Now that we have the base either register the base fed extensions or default ones.
99+
// Either register the base fed extensions or default ones.
102100
if base.CloudClientExtension == nil {
103101
r.CloudClientExtension = (&CloudClientImplementation{}).RegisterExtension(r)
104102
} else {
@@ -148,6 +146,7 @@ func (r *ReconciliationRunner) RunIf(conditional func() bool, fn CloudStackRecon
148146
}
149147
}
150148

149+
// Else can be used to run a different stage if a previous conditional was false.
151150
func (r *ReconciliationRunner) Else(fn CloudStackReconcilerMethod) CloudStackReconcilerMethod {
152151
return func() (ctrl.Result, error) {
153152
if !r.ConditionalResult {

0 commit comments

Comments
 (0)