mirror of https://github.com/kubernetes/kops.git
regenerate apimachinery
This commit is contained in:
parent
2f3346a6e3
commit
68418eb036
|
@ -10,8 +10,6 @@ go_library(
|
|||
"//pkg/apis/kops/v1alpha1:go_default_library",
|
||||
"//pkg/apis/kops/v1alpha2:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
],
|
||||
|
|
|
@ -11,8 +11,6 @@ go_library(
|
|||
"//pkg/apis/kops/v1alpha2:go_default_library",
|
||||
"//pkg/apiserver/registry/cluster:go_default_library",
|
||||
"//pkg/apiserver/registry/instancegroup:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
|
|
|
@ -19,7 +19,6 @@ limitations under the License.
|
|||
package clientset
|
||||
|
||||
import (
|
||||
glog "github.com/golang/glog"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
|
@ -90,7 +89,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||
|
||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
glog.Errorf("failed to create the DiscoveryClient: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
return &cs, nil
|
||||
|
|
|
@ -45,9 +45,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
}
|
||||
}
|
||||
|
||||
fakePtr := testing.Fake{}
|
||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
cs := &Clientset{}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
|
@ -57,7 +58,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
return true, watch, nil
|
||||
})
|
||||
|
||||
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
|
||||
return cs
|
||||
}
|
||||
|
||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||
|
|
|
@ -10,8 +10,6 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/kops/install:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
|
|
|
@ -19,10 +19,6 @@ limitations under the License.
|
|||
package scheme
|
||||
|
||||
import (
|
||||
os "os"
|
||||
|
||||
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
@ -34,15 +30,12 @@ var Scheme = runtime.NewScheme()
|
|||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
|
||||
var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||
var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
Install(GroupFactoryRegistry, Registry, Scheme)
|
||||
Install(Scheme)
|
||||
}
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||
kops.Install(groupFactoryRegistry, registry, scheme)
|
||||
func Install(scheme *runtime.Scheme) {
|
||||
kops.Install(scheme)
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *kops.ClusterList, err
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.ClusterList{}
|
||||
list := &kops.ClusterList{ListMeta: obj.(*kops.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*kops.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGro
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.InstanceGroupList{}
|
||||
list := &kops.InstanceGroupList{ListMeta: obj.(*kops.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*kops.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeKeysets) List(opts v1.ListOptions) (result *kops.KeysetList, err er
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.KeysetList{}
|
||||
list := &kops.KeysetList{ListMeta: obj.(*kops.KeysetList).ListMeta}
|
||||
for _, item := range obj.(*kops.KeysetList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredenti
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.SSHCredentialList{}
|
||||
list := &kops.SSHCredentialList{ListMeta: obj.(*kops.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*kops.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -81,17 +81,12 @@ func New(c rest.Interface) *KopsClient {
|
|||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
g, err := scheme.Registry.Group("kops")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||
gv := g.GroupVersion
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("kops")[0].Group {
|
||||
gv := scheme.Scheme.PrioritizedVersionsForGroup("kops")[0]
|
||||
config.GroupVersion = &gv
|
||||
}
|
||||
config.NegotiatedSerializer = scheme.Codecs
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList,
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ClusterList{}
|
||||
list := &v1alpha1.ClusterList{ListMeta: obj.(*v1alpha1.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *v1alpha1.Instanc
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.InstanceGroupList{}
|
||||
list := &v1alpha1.InstanceGroupList{ListMeta: obj.(*v1alpha1.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCred
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.SSHCredentialList{}
|
||||
list := &v1alpha1.SSHCredentialList{ListMeta: obj.(*v1alpha1.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList,
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ClusterList{}
|
||||
list := &v1alpha2.ClusterList{ListMeta: obj.(*v1alpha2.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *v1alpha2.Instanc
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.InstanceGroupList{}
|
||||
list := &v1alpha2.InstanceGroupList{ListMeta: obj.(*v1alpha2.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeKeysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, er
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.KeysetList{}
|
||||
list := &v1alpha2.KeysetList{ListMeta: obj.(*v1alpha2.KeysetList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.KeysetList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCred
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.SSHCredentialList{}
|
||||
list := &v1alpha2.SSHCredentialList{ListMeta: obj.(*v1alpha2.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -19,7 +19,6 @@ limitations under the License.
|
|||
package internalclientset
|
||||
|
||||
import (
|
||||
glog "github.com/golang/glog"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
|
@ -90,7 +89,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||
|
||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
glog.Errorf("failed to create the DiscoveryClient: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
return &cs, nil
|
||||
|
|
|
@ -45,9 +45,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
}
|
||||
}
|
||||
|
||||
fakePtr := testing.Fake{}
|
||||
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
cs := &Clientset{}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
|
@ -57,7 +58,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
return true, watch, nil
|
||||
})
|
||||
|
||||
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
|
||||
return cs
|
||||
}
|
||||
|
||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||
|
|
|
@ -10,8 +10,6 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/kops/install:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
|
|
|
@ -19,10 +19,6 @@ limitations under the License.
|
|||
package scheme
|
||||
|
||||
import (
|
||||
os "os"
|
||||
|
||||
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
|
||||
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
@ -34,15 +30,12 @@ var Scheme = runtime.NewScheme()
|
|||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
|
||||
var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
|
||||
var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
Install(GroupFactoryRegistry, Registry, Scheme)
|
||||
Install(Scheme)
|
||||
}
|
||||
|
||||
// Install registers the API group and adds types to a scheme
|
||||
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
|
||||
kops.Install(groupFactoryRegistry, registry, scheme)
|
||||
func Install(scheme *runtime.Scheme) {
|
||||
kops.Install(scheme)
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *kops.ClusterList, err
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.ClusterList{}
|
||||
list := &kops.ClusterList{ListMeta: obj.(*kops.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*kops.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGro
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.InstanceGroupList{}
|
||||
list := &kops.InstanceGroupList{ListMeta: obj.(*kops.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*kops.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeKeysets) List(opts v1.ListOptions) (result *kops.KeysetList, err er
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.KeysetList{}
|
||||
list := &kops.KeysetList{ListMeta: obj.(*kops.KeysetList).ListMeta}
|
||||
for _, item := range obj.(*kops.KeysetList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredenti
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &kops.SSHCredentialList{}
|
||||
list := &kops.SSHCredentialList{ListMeta: obj.(*kops.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*kops.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -81,17 +81,12 @@ func New(c rest.Interface) *KopsClient {
|
|||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
g, err := scheme.Registry.Group("kops")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||
gv := g.GroupVersion
|
||||
if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("kops")[0].Group {
|
||||
gv := scheme.Scheme.PrioritizedVersionsForGroup("kops")[0]
|
||||
config.GroupVersion = &gv
|
||||
}
|
||||
config.NegotiatedSerializer = scheme.Codecs
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList,
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ClusterList{}
|
||||
list := &v1alpha1.ClusterList{ListMeta: obj.(*v1alpha1.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *v1alpha1.Instanc
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.InstanceGroupList{}
|
||||
list := &v1alpha1.InstanceGroupList{ListMeta: obj.(*v1alpha1.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCred
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.SSHCredentialList{}
|
||||
list := &v1alpha1.SSHCredentialList{ListMeta: obj.(*v1alpha1.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList,
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ClusterList{}
|
||||
list := &v1alpha2.ClusterList{ListMeta: obj.(*v1alpha2.ClusterList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeInstanceGroups) List(opts v1.ListOptions) (result *v1alpha2.Instanc
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.InstanceGroupList{}
|
||||
list := &v1alpha2.InstanceGroupList{ListMeta: obj.(*v1alpha2.InstanceGroupList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.InstanceGroupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeKeysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, er
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.KeysetList{}
|
||||
list := &v1alpha2.KeysetList{ListMeta: obj.(*v1alpha2.KeysetList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.KeysetList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
|
@ -62,7 +62,7 @@ func (c *FakeSSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCred
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.SSHCredentialList{}
|
||||
list := &v1alpha2.SSHCredentialList{ListMeta: obj.(*v1alpha2.SSHCredentialList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.SSHCredentialList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
|
|
Loading…
Reference in New Issue