diff --git a/config/control-plane-components.yaml b/config/control-plane-components.yaml index 1b18815..e38082e 100644 --- a/config/control-plane-components.yaml +++ b/config/control-plane-components.yaml @@ -13366,6 +13366,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: + - proxmoxclusters - tinkerbellclusters - vsphereclusters verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ebe176e..a348b34 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -81,6 +81,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: + - proxmoxclusters - tinkerbellclusters - vsphereclusters verbs: diff --git a/controllers/kamajicontrolplane_controller_cluster_patch.go b/controllers/kamajicontrolplane_controller_cluster_patch.go index 256d4c7..b5fb1d2 100644 --- a/controllers/kamajicontrolplane_controller_cluster_patch.go +++ b/controllers/kamajicontrolplane_controller_cluster_patch.go @@ -101,6 +101,8 @@ func (r *KamajiControlPlaneReconciler) patchCluster(ctx context.Context, cluster return r.patchOpenStackCluster(ctx, cluster, endpoint, port) case "PacketCluster": return r.patchGenericCluster(ctx, cluster, endpoint, port, true) + case "ProxmoxCluster": + return r.checkOrPatchGenericCluster(ctx, cluster, endpoint, port) case "TinkerbellCluster": return r.checkOrPatchGenericCluster(ctx, cluster, endpoint, port) case "VSphereCluster": @@ -110,8 +112,8 @@ func (r *KamajiControlPlaneReconciler) patchCluster(ctx context.Context, cluster } } -//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=vsphereclusters;tinkerbellclusters,verbs=get -//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=vsphereclusters;tinkerbellclusters,verbs=patch +//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=proxmoxclusters;vsphereclusters;tinkerbellclusters,verbs=get +//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=proxmoxclusters;vsphereclusters;tinkerbellclusters,verbs=patch func (r *KamajiControlPlaneReconciler) checkOrPatchGenericCluster(ctx context.Context, cluster capiv1beta1.Cluster, endpoint string, port int64) error { if err := r.checkGenericCluster(ctx, cluster, endpoint, port); err != nil {