Skip to content

Commit 5a7056b

Browse files
committed
fix
1 parent f49c1d1 commit 5a7056b

7 files changed

+29
-15
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ spec:
6060
type: object
6161
aroClusterName:
6262
description: |-
63-
Cluster name must beDiskStorageAccountType valid DNS-1035 label, so it must consist of lower case alphanumeric
63+
Cluster name must be valid DNS-1035 label, so it must consist of lower case alphanumeric
6464
characters or '-', start with an alphabetic character, end with an alphanumeric character
6565
and have a max length of 54 characters.
6666
maxLength: 54
@@ -188,7 +188,7 @@ spec:
188188
Microsoft.ManagedIdentity/userAssignedIdentities
189189
type: string
190190
clusterApiAzureManagedIdentities:
191-
description: ClusterApiAzureManagedIdentities "cluster-api-azure"
191+
description: ClusterAPIAzureManagedIdentities "cluster-api-azure"
192192
Microsoft.ManagedIdentity/userAssignedIdentities
193193
type: string
194194
controlPlaneOperatorsManagedIdentities:
@@ -247,6 +247,10 @@ spec:
247247
egress to the Internet. Allowed value is loadBalancer
248248
type: string
249249
resourceGroup:
250+
description: Resource group name where the ARO-hcp will be attached
251+
to it.
252+
type: string
253+
resourceGroupRef:
250254
description: ResourceGroup Ref name that is used to create the
251255
ResourceGroup CR. The ResourceGroupRef must be in the same namespace
252256
as the AROControlPlane and cannot be set with ResourceGroup.
@@ -297,7 +301,7 @@ spec:
297301
description: AROControlPlaneStatus defines the observed state of AROControlPlane.
298302
properties:
299303
apiURL:
300-
description: ApiURL is the url for the ARO-HCP openshift cluster api
304+
description: APIURL is the url for the ARO-HCP openshift cluster api
301305
endPoint.
302306
type: string
303307
availableUpgrades:

config/crd/patches/capicontract_in_aroclusters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ kind: CustomResourceDefinition
33
metadata:
44
name: aroclusters.infrastructure.cluster.x-k8s.io
55
labels:
6-
cluster.x-k8s.io/v1beta1: v1beta1
6+
cluster.x-k8s.io/v1beta2: v1beta2

config/crd/patches/capicontract_in_arocontrolplanes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ kind: CustomResourceDefinition
33
metadata:
44
name: arocontrolplanes.controlplane.cluster.x-k8s.io
55
labels:
6-
cluster.x-k8s.io/v1beta1: v1beta1
6+
cluster.x-k8s.io/v1beta2: v1beta2

config/crd/patches/capicontract_in_aromachinepools.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ kind: CustomResourceDefinition
33
metadata:
44
name: aromachinepools.infrastructure.cluster.x-k8s.io
55
labels:
6-
cluster.x-k8s.io/v1beta1: v1beta1
6+
cluster.x-k8s.io/v1beta2: v1beta2

exp/api/v1beta2/aromachinepool_types.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,13 @@ type AROMachinePool struct {
175175
Status AROMachinePoolStatus `json:"status,omitempty"`
176176
}
177177

178-
// AROMachinePoolKind is the kind for AROMachinePool.
179-
const AROMachinePoolKind = "AROMachinePool"
178+
const (
179+
// AROMachinePoolKind is the kind for AROMachinePool.
180+
AROMachinePoolKind = "AROMachinePool"
181+
182+
// AROMachinePoolFinalizer is the finalizer added to AROControlPlanes.
183+
AROMachinePoolFinalizer = "aromachinepool/finalizer"
184+
)
180185

181186
// +kubebuilder:object:root=true
182187

exp/controllers/arocluster_controller.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func (r *AROClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma
7272
return nil
7373
}
7474

75-
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters,verbs=get;list;watch;create;update;patch;delete
76-
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters/status,verbs=get;update;patch
77-
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters/finalizers,verbs=update
75+
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters,verbs=get;list;watch;create;update;patch;delete
76+
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters/status,verbs=get;update;patch
77+
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=aroclusters/finalizers,verbs=update
7878

7979
// Reconcile reconciles an AROCluster.
8080
func (r *AROClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error) {
@@ -86,8 +86,9 @@ func (r *AROClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
8686
)
8787
defer done()
8888

89-
log = log.WithValues("namespace", req.Namespace, "azureCluster", req.Name)
89+
log = log.WithValues("namespace", req.Namespace, "AROCluster", req.Name)
9090

91+
// Fetch the AROCluster instance
9192
aroCluster := &infrav2exp.AROCluster{}
9293
err := r.Get(ctx, req.NamespacedName, aroCluster)
9394
if err != nil {

main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ import (
6161
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
6262
"sigs.k8s.io/cluster-api-provider-azure/azure"
6363
"sigs.k8s.io/cluster-api-provider-azure/controllers"
64+
cplanev1beta2exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/controlplane/v1beta2"
6465
infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1"
66+
infrav1beta2exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta2"
6567
infrav1controllersexp "sigs.k8s.io/cluster-api-provider-azure/exp/controllers"
6668
"sigs.k8s.io/cluster-api-provider-azure/feature"
6769
"sigs.k8s.io/cluster-api-provider-azure/pkg/coalescing"
@@ -79,6 +81,8 @@ func init() {
7981
_ = clientgoscheme.AddToScheme(scheme)
8082
_ = infrav1.AddToScheme(scheme)
8183
_ = infrav1exp.AddToScheme(scheme)
84+
_ = cplanev1beta2exp.AddToScheme(scheme)
85+
_ = infrav1beta2exp.AddToScheme(scheme)
8286
_ = clusterv1.AddToScheme(scheme)
8387
_ = expv1.AddToScheme(scheme)
8488
_ = kubeadmv1.AddToScheme(scheme)
@@ -611,23 +615,23 @@ func registerControllers(ctx context.Context, mgr manager.Manager) {
611615
Client: mgr.GetClient(),
612616
WatchFilterValue: watchFilterValue,
613617
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureClusterConcurrency}); err != nil {
614-
setupLog.Error(err, "unable to create controller", "controller", "AroCluster")
618+
setupLog.Error(err, "unable to create controller", "controller", "AROCluster")
615619
os.Exit(1)
616620
}
617621

618622
if err := (&infrav1controllersexp.AROControlPlaneReconciler{
619623
Client: mgr.GetClient(),
620624
WatchFilterValue: watchFilterValue,
621625
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureClusterConcurrency}); err != nil {
622-
setupLog.Error(err, "unable to create controller", "controller", "AroControlPlane")
626+
setupLog.Error(err, "unable to create controller", "controller", "AROControlPlane")
623627
os.Exit(1)
624628
}
625629

626630
if err := (&infrav1controllersexp.AroMachinePoolReconciler{
627631
Client: mgr.GetClient(),
628632
WatchFilterValue: watchFilterValue,
629633
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: azureMachinePoolConcurrency}); err != nil {
630-
setupLog.Error(err, "unable to create controller", "controller", "AroMachinePool")
634+
setupLog.Error(err, "unable to create controller", "controller", "AROMachinePool")
631635
os.Exit(1)
632636
}
633637
}

0 commit comments

Comments
 (0)