Skip to content

Commit

Permalink
feat: add patch support for IonosCloudCluster
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Valderrama <[email protected]>
  • Loading branch information
avorima committed Jul 16, 2024
1 parent e5fe5af commit e4c2c5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ rules:
resources:
- awsclusters
- hetznerclusters
- ionoscloudclusters
- kubevirtclusters
- nutanixclusters
- packetclusters
Expand Down
4 changes: 3 additions & 1 deletion controllers/kamajicontrolplane_controller_cluster_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func (r *KamajiControlPlaneReconciler) patchCluster(ctx context.Context, cluster
return r.patchGenericCluster(ctx, cluster, endpoint, port, false)
case "HetznerCluster":
return r.patchGenericCluster(ctx, cluster, endpoint, port, false)
case "IonosCloudCluster":
return r.patchGenericCluster(ctx, cluster, endpoint, port, false)
case "KubevirtCluster":
return r.patchGenericCluster(ctx, cluster, endpoint, port, true)
case "Metal3Cluster":
Expand Down Expand Up @@ -72,7 +74,7 @@ func (r *KamajiControlPlaneReconciler) checkOrPatchGenericCluster(ctx context.Co
return nil
}

//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awsclusters;hetznerclusters;kubevirtclusters;nutanixclusters;packetclusters,verbs=patch
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awsclusters;hetznerclusters;kubevirtclusters;nutanixclusters;packetclusters;ionoscloudclusters,verbs=patch
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=kubevirtclusters/status;nutanixclusters/status;packetclusters/status,verbs=patch

func (r *KamajiControlPlaneReconciler) patchGenericCluster(ctx context.Context, cluster capiv1beta1.Cluster, endpoint string, port int64, patchStatus bool) error {
Expand Down

0 comments on commit e4c2c5c

Please sign in to comment.