diff --git a/PROJECT b/PROJECT index 2077e88e..7a439738 100644 --- a/PROJECT +++ b/PROJECT @@ -10,7 +10,7 @@ repo: github.com/kyma-project/infrastructure-manager resources: - api: crdVersion: v1 - namespaced: false + namespaced: true controller: true domain: kyma-project.io group: infrastructuremanager diff --git a/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml b/config/crd/bases/clusterinventory.kyma-project.io_clusterinventories.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml b/config/crd/bases/clusterinventory.kyma-project.io_clusters.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index c5c7711b..78ec8c8b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,7 +7,7 @@ rules: - apiGroups: - infrastructuremanager.kyma-project.io resources: - - clusters + - gardenerclusters verbs: - create - delete @@ -19,13 +19,13 @@ rules: - apiGroups: - infrastructuremanager.kyma-project.io resources: - - clusters/finalizers + - gardenerclusters/finalizers verbs: - update - apiGroups: - infrastructuremanager.kyma-project.io resources: - - clusters/status + - gardenerclusters/status verbs: - get - patch diff --git a/internal/controller/cluster_controller.go b/internal/controller/cluster_controller.go index 97e0f5a9..496fef79 100644 --- a/internal/controller/cluster_controller.go +++ b/internal/controller/cluster_controller.go @@ -32,9 +32,9 @@ type ClusterReconciler struct { Scheme *runtime.Scheme } -//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=clusters/finalizers,verbs=update +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=gardenerclusters,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=gardenerclusters/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=infrastructuremanager.kyma-project.io,resources=gardenerclusters/finalizers,verbs=update // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state.