Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ServerClaim-handling in MetalMachine Controller #9

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

hardikdr
Copy link
Member

Proposed Changes

Fixes #

@github-actions github-actions bot added size/L api-change documentation Improvements or additions to documentation enhancement New feature or request labels Jul 26, 2024
@hardikdr hardikdr force-pushed the enh/metalmachine-controller branch from b5f2fd2 to ed4880d Compare July 29, 2024 13:19
@defo89
Copy link
Contributor

defo89 commented Jul 29, 2024

seems we need to add scheme to avoid no kind is registered for the type v1alpha1.ServerClaim

› git diff cmd/main.go
diff --git a/cmd/main.go b/cmd/main.go
index 0b4f64e..1fc6707 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -6,6 +6,7 @@ package main
 import (
        "crypto/tls"
        "flag"
+       metalv1alpha1 "github.com/ironcore-dev/metal-operator/api/v1alpha1"
        "os"

        clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
@@ -39,6 +40,7 @@ func init() {
        utilruntime.Must(clientgoscheme.AddToScheme(scheme))
        utilruntime.Must(clusterv1.AddToScheme(scheme))
        utilruntime.Must(infrastructurev1alpha1.AddToScheme(scheme))
+       utilruntime.Must(metalv1alpha1.AddToScheme(scheme))
        // +kubebuilder:scaffold:scheme
 }

@hardikdr hardikdr marked this pull request as ready for review July 29, 2024 18:26
@hardikdr hardikdr force-pushed the enh/metalmachine-controller branch from ed4880d to 8539d19 Compare July 30, 2024 12:44
Copy link
Contributor

@defo89 defo89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if metal-operator runs in same cluster, we would need to add more rbac

// +kubebuilder:rbac:groups=metal.ironcore.dev,resources=serverclaims,verbs=get;list;watch;create;update;patch;delete

otherwise it looks good, thanks!

@hardikdr hardikdr force-pushed the enh/metalmachine-controller branch from 8539d19 to 944c031 Compare July 30, 2024 15:10
@hardikdr
Copy link
Member Author

Thanks, it makes sense, added the RBAC permissions there.

@hardikdr hardikdr force-pushed the enh/metalmachine-controller branch from 944c031 to 315b60d Compare July 30, 2024 15:14
@hardikdr hardikdr merged commit e2f6029 into main Jul 30, 2024
8 checks passed
@hardikdr hardikdr deleted the enh/metalmachine-controller branch July 30, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change documentation Improvements or additions to documentation enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants