kubernetes-retired / cluster-registry

[EOL] Cluster Registry API
https://kubernetes.github.io/cluster-registry/
Apache License 2.0
238 stars 94 forks source link

Re-generate client to make it compilable with 1.13 libraries #271

Closed ash2k closed 3 years ago

ash2k commented 5 years ago

Please re-generate client, it currently does not work with 1.13 libraries. Getting:

vendor/k8s.io/cluster-registry/pkg/client/clientset/versioned/typed/clusterregistry/v1alpha1/fake/fake_cluster.go:135:44: not enough arguments in call to testing.NewPatchSubresourceAction
        have (schema.GroupVersionResource, string, string, []byte, []string...)
        want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)

/sig multicluster

qiujian16 commented 5 years ago

meet the same issue

hangyan commented 5 years ago

same issue

fejta-bot commented 5 years ago

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

fejta-bot commented 4 years ago

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

ash2k commented 4 years ago

/remove-lifecycle rotten /lifecycle frozen

SleepyBrett commented 4 years ago

same issue.

glindsell commented 4 years ago

Same issue

zlcnju commented 4 years ago

Same issue

alebedev87 commented 3 years ago

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.

nikhita commented 3 years ago

Closing, this repo is being archived. Please see https://github.com/kubernetes/org/issues/1499 for more details.