@@ -47,6 +47,7 @@ import (
4747 clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
4848 "sigs.k8s.io/cluster-api/controllers/clustercache"
4949 "sigs.k8s.io/cluster-api/controllers/remote"
50+ runtimeclient "sigs.k8s.io/cluster-api/exp/runtime/client"
5051 "sigs.k8s.io/cluster-api/util"
5152 "sigs.k8s.io/cluster-api/util/annotations"
5253 "sigs.k8s.io/cluster-api/util/cache"
@@ -93,6 +94,9 @@ type RKE2ControlPlaneReconciler struct {
9394
9495 SecretCachingClient client.Client
9596
97+ // RuntimeClient is the runtime client to interact with extensions.
98+ RuntimeClient runtimeclient.Client
99+
96100 // WatchFilterValue is the label value used to filter events prior to reconciliation.
97101 WatchFilterValue string
98102
@@ -112,6 +116,7 @@ type RKE2ControlPlaneReconciler struct {
112116// +kubebuilder:rbac:groups="bootstrap.cluster.x-k8s.io",resources=rke2configs,verbs=get;list;watch;create;patch;delete
113117// +kubebuilder:rbac:groups="infrastructure.cluster.x-k8s.io",resources=*,verbs=get;list;watch;create;patch;delete
114118// +kubebuilder:rbac:groups="apiextensions.k8s.io",resources=customresourcedefinitions,verbs=get;list;watch
119+ // +kubebuilder:rbac:groups=runtime.cluster.x-k8s.io,resources=extensionconfigs,verbs=get;list;watch
115120
116121// Reconcile is part of the main kubernetes reconciliation loop which aims to
117122// move the current state of the cluster closer to the desired state.
0 commit comments