Closed ash2k closed 3 years ago
meet the same issue
same issue
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/remove-lifecycle rotten /lifecycle frozen
same issue.
Same issue
Same issue
It looks like at some point in time kubebuilder
stopped generating clientset due to changes in controller-runtime
, see the description of this issue.
I tried to use controller-runtime
go module and it worked well. I just needed to add ClusterRegistry
scheme to the standard Kubernetes one:
import (
"k8s.io/client-go/kubernetes/scheme"
crapi "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
)
...
func myFunc() {
kubeCl, err := ctrlclient.New(kubeConfig, ctrlclient.Options{})
if err != nil {
return
}
crapi.AddToScheme(scheme.Scheme)
clusters := &crapi.ClusterList{}
err := kubeCl.List(context.TODO(), clusters)
if err != nil {
return
}
for _, c := range clusters.Items {
fmt.Println("Cluster:", c.Name)
}
}
I hope this will be of help for those who are looking to use ClusterRegistry
with recent go
versions.
Closing, this repo is being archived. Please see https://github.com/kubernetes/org/issues/1499 for more details.
Please re-generate client, it currently does not work with 1.13 libraries. Getting:
/sig multicluster