Skip to content

Commit

Permalink
Register type
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Oct 21, 2024
1 parent 4c5d9db commit 3527c73
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/agent/spirecrd/crdmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ import (
"k8s.io/client-go/rest"
//"k8s.io/client-go/dynamic"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/scheme"
// metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/schema"
spirev1alpha1 "github.com/spiffe/spire-controller-manager/api/v1alpha1"
)

/*var gvrClusterFederatedTrustDomain = schema.GroupVersionResource{
var gvr = schema.GroupVersion{
Group: "spire.spiffe.io",
Version: "v1alpha1",
Resource: "clusterfederatedtrustdomains",
}*/
}

var SchemeBuilder = &scheme.Builder{GroupVersion: gvr}

// CRDManager defines the interface for managing CRDs
type CRDManager interface {
Expand All @@ -44,6 +46,9 @@ func NewSPIRECRDManager(className string) (*SPIRECRDManager, error) {
return nil, fmt.Errorf("Error creating kube client: %v", err)
}

SchemeBuilder.Register(&spirev1alpha1.ClusterFederatedTrustDomain{})
SchemeBuilder.Register(&spirev1alpha1.ClusterFederatedTrustDomainList{})

return &SPIRECRDManager{
className: className,
kubeClient: kubeClient,
Expand Down

0 comments on commit 3527c73

Please sign in to comment.