Skip to content

Commit 13fd601

Browse files
author
Alexandr Demicev
committed
Setup skeleton for in-place updates implementation
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
1 parent 94f7882 commit 13fd601

File tree

7 files changed

+1389
-1
lines changed

7 files changed

+1389
-1
lines changed

controlplane/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
- "--diagnostics-address=${CAPRKE2_DIAGNOSTICS_ADDRESS:=:8443}"
2626
- "--insecure-diagnostics=${CAPRKE2_INSECURE_DIAGNOSTICS:=false}"
2727
- "--v=${CAPRKE2_DEBUG_LEVEL:=0}"
28-
- "--concurrency=${CONCURRENCY_NUMBER:=10}"
28+
- "--feature-gates=InPlaceUpdates=${EXP_IN_PLACE_UPDATES:=false}"
2929
image: controller:latest
3030
name: manager
3131
env:

controlplane/internal/controllers/rke2controlplane_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)