Skip to content

Commit

Permalink
feat: support for the Proxmox Cluster API provider by IONOS
Browse files Browse the repository at this point in the history
Signed-off-by: Dario Tranchitella <[email protected]>
  • Loading branch information
prometherion committed Nov 9, 2024
1 parent b3d2f9c commit 16465ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/control-plane-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13366,6 +13366,7 @@ rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- proxmoxclusters
- tinkerbellclusters
- vsphereclusters
verbs:
Expand Down
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- proxmoxclusters
- tinkerbellclusters
- vsphereclusters
verbs:
Expand Down
6 changes: 4 additions & 2 deletions controllers/kamajicontrolplane_controller_cluster_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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 {
Expand Down

0 comments on commit 16465ad

Please sign in to comment.