Merge pull request #40178 from smarterclayton/move_list_options

Automatic merge from submit-queue

Move ListOptions into meta

metav1.ListOptions is moving to k8s.io/apimachinery/pkg/apis/meta/v1.  The internal version will be reserved for server use (clients will use metav1), and all references changed.

Also, all references to the Namespace* constants are being moved to point to metav1.
This commit is contained in:
Kubernetes Submit Queue 2017-01-23 20:13:26 -08:00 committed by GitHub
commit 61b7b3fb66
957 changed files with 6381 additions and 5456 deletions

20
Godeps/Godeps.json generated
View File

@ -2663,43 +2663,43 @@
},
{
"ImportPath": "k8s.io/gengo/args",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/examples/import-boss/generators",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/examples/set-gen/generators",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/examples/set-gen/sets",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/generator",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/namer",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/parser",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/gengo/types",
"Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed"
"Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563"
},
{
"ImportPath": "k8s.io/heapster/metrics/api/v1/types",

View File

@ -53,7 +53,7 @@ func main() {
if err != nil {
glog.Fatalf("Failed to make client: %v", err)
}
namespace := api.NamespaceSystem
namespace := metav1.NamespaceSystem
envNamespace := os.Getenv("NAMESPACE")
if envNamespace != "" {
if _, err := client.Core().Namespaces().Get(envNamespace, meta_v1.GetOptions{}); err != nil {

View File

@ -39,7 +39,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&APIService{},
&APIServiceList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.GetOptions{},
)

View File

@ -38,10 +38,10 @@ type APIServiceInterface interface {
Update(*v1alpha1.APIService) (*v1alpha1.APIService, error)
UpdateStatus(*v1alpha1.APIService) (*v1alpha1.APIService, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1alpha1.APIService, error)
List(opts v1.ListOptions) (*v1alpha1.APIServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1alpha1.APIServiceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error)
APIServiceExpansion
}
@ -107,7 +107,7 @@ func (c *aPIServices) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Resource("apiservices").
VersionedParams(&listOptions, api.ParameterCodec).
@ -129,7 +129,7 @@ func (c *aPIServices) Get(name string, options meta_v1.GetOptions) (result *v1al
}
// List takes label and field selectors, and returns the list of APIServices that match those selectors.
func (c *aPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
func (c *aPIServices) List(opts meta_v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
result = &v1alpha1.APIServiceList{}
err = c.client.Get().
Resource("apiservices").
@ -140,7 +140,7 @@ func (c *aPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *aPIServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("apiservices").

View File

@ -67,7 +67,7 @@ func (c *FakeAPIServices) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(apiservicesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.APIServiceList{})
@ -83,7 +83,7 @@ func (c *FakeAPIServices) Get(name string, options meta_v1.GetOptions) (result *
return obj.(*v1alpha1.APIService), err
}
func (c *FakeAPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
func (c *FakeAPIServices) List(opts meta_v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(apiservicesResource, opts), &v1alpha1.APIServiceList{})
if obj == nil {
@ -104,7 +104,7 @@ func (c *FakeAPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIService
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeAPIServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(apiservicesResource, opts))
}

View File

@ -37,10 +37,10 @@ type APIServiceInterface interface {
Update(*apiregistration.APIService) (*apiregistration.APIService, error)
UpdateStatus(*apiregistration.APIService) (*apiregistration.APIService, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*apiregistration.APIService, error)
List(opts api.ListOptions) (*apiregistration.APIServiceList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*apiregistration.APIServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error)
APIServiceExpansion
}
@ -106,7 +106,7 @@ func (c *aPIServices) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *aPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *aPIServices) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("apiservices").
VersionedParams(&listOptions, api.ParameterCodec).
@ -128,7 +128,7 @@ func (c *aPIServices) Get(name string, options v1.GetOptions) (result *apiregist
}
// List takes label and field selectors, and returns the list of APIServices that match those selectors.
func (c *aPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) {
func (c *aPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServiceList, err error) {
result = &apiregistration.APIServiceList{}
err = c.client.Get().
Resource("apiservices").
@ -139,7 +139,7 @@ func (c *aPIServices) List(opts api.ListOptions) (result *apiregistration.APISer
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("apiservices").

View File

@ -67,7 +67,7 @@ func (c *FakeAPIServices) Delete(name string, options *api.DeleteOptions) error
return err
}
func (c *FakeAPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeAPIServices) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(apiservicesResource, listOptions)
_, err := c.Fake.Invokes(action, &apiregistration.APIServiceList{})
@ -83,7 +83,7 @@ func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *apire
return obj.(*apiregistration.APIService), err
}
func (c *FakeAPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) {
func (c *FakeAPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(apiservicesResource, opts), &apiregistration.APIServiceList{})
if obj == nil {
@ -104,7 +104,7 @@ func (c *FakeAPIServices) List(opts api.ListOptions) (result *apiregistration.AP
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *FakeAPIServices) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(apiservicesResource, opts))
}

View File

@ -19,9 +19,8 @@ go_library(
"//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset:go_default_library",
"//cmd/kube-aggregator/pkg/client/informers/internalinterfaces:go_default_library",
"//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/cache:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/watch",
],

View File

@ -19,14 +19,13 @@ limitations under the License.
package internalversion
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration"
internalclientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset"
internalinterfaces "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/internalinterfaces"
internalversion "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
cache "k8s.io/kubernetes/pkg/client/cache"
time "time"
)
@ -46,18 +45,10 @@ func newAPIServiceInformer(client internalclientset.Interface, resyncPeriod time
sharedIndexInformer := cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
var internalOptions api.ListOptions
if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.Apiregistration().APIServices().List(internalOptions)
return client.Apiregistration().APIServices().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
var internalOptions api.ListOptions
if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.Apiregistration().APIServices().Watch(internalOptions)
return client.Apiregistration().APIServices().Watch(options)
},
},
&apiregistration.APIService{},

View File

@ -19,8 +19,8 @@ go_library(
"//cmd/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library",
"//cmd/kube-aggregator/pkg/client/informers/internalinterfaces:go_default_library",
"//cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/cache:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/watch",
],

View File

@ -19,13 +19,13 @@ limitations under the License.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
apiregistration_v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1"
clientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset"
internalinterfaces "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/internalinterfaces"
v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1"
v1 "k8s.io/kubernetes/pkg/api/v1"
cache "k8s.io/kubernetes/pkg/client/cache"
time "time"
)

View File

@ -49,7 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&MasterConfiguration{},
&NodeConfiguration{},
&ClusterInfo{},
&api.ListOptions{},
&api.DeleteOptions{},
&metav1.ExportOptions{},
)

View File

@ -49,10 +49,10 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&MasterConfiguration{},
&NodeConfiguration{},
&ClusterInfo{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.ExportOptions{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -35,7 +35,6 @@ go_library(
"//cmd/kubeadm/app/preflight:go_default_library",
"//cmd/kubeadm/app/util:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/kubectl:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library",
"//pkg/util/flag:go_default_library",
@ -44,6 +43,7 @@ go_library(
"//vendor:github.com/blang/semver",
"//vendor:github.com/renstrom/dedent",
"//vendor:github.com/spf13/cobra",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/fields",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/util/net",

View File

@ -27,13 +27,13 @@ import (
"github.com/renstrom/dedent"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
kubemaster "k8s.io/kubernetes/cmd/kubeadm/app/master"
"k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig"
kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/kubectl"
)
@ -167,11 +167,11 @@ func RunListTokens(out io.Writer, errW io.Writer, cmd *cobra.Command) error {
api.SecretTypeField: string(api.SecretTypeBootstrapToken),
},
)
listOptions := v1.ListOptions{
listOptions := metav1.ListOptions{
FieldSelector: tokenSelector.String(),
}
results, err := client.Secrets(api.NamespaceSystem).List(listOptions)
results, err := client.Secrets(metav1.NamespaceSystem).List(listOptions)
if err != nil {
return fmt.Errorf("failed to list bootstrap tokens [%v]", err)
}
@ -222,7 +222,7 @@ func RunDeleteToken(out io.Writer, cmd *cobra.Command, tokenId string) error {
}
tokenSecretName := fmt.Sprintf("%s%s", kubeadmutil.BootstrapTokenSecretPrefix, tokenId)
if err := client.Secrets(api.NamespaceSystem).Delete(tokenSecretName, nil); err != nil {
if err := client.Secrets(metav1.NamespaceSystem).Delete(tokenSecretName, nil); err != nil {
return fmt.Errorf("failed to delete bootstrap token [%v]", err)
}
fmt.Fprintf(out, "[token] bootstrap token deleted: %s\n", tokenId)

View File

@ -26,7 +26,6 @@ go_library(
"//cmd/kubeadm/app/images:go_default_library",
"//cmd/kubeadm/app/phases/kubeconfig:go_default_library",
"//cmd/kubeadm/app/util:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/resource:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/extensions/v1beta1:go_default_library",

View File

@ -21,10 +21,10 @@ import (
"net"
"path"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
"k8s.io/kubernetes/cmd/kubeadm/app/images"
"k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
@ -268,7 +268,7 @@ func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientse
SetMasterTaintTolerations(&kubeProxyDaemonSet.Spec.Template.ObjectMeta)
SetNodeAffinity(&kubeProxyDaemonSet.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity())
if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil {
if _, err := client.Extensions().DaemonSets(metav1.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil {
return fmt.Errorf("failed creating essential kube-proxy addon [%v]", err)
}
@ -279,10 +279,10 @@ func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientse
SetNodeAffinity(&kubeDNSDeployment.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity())
kubeDNSServiceAccount := &v1.ServiceAccount{}
kubeDNSServiceAccount.ObjectMeta.Name = KubeDNS
if _, err := client.ServiceAccounts(api.NamespaceSystem).Create(kubeDNSServiceAccount); err != nil {
if _, err := client.ServiceAccounts(metav1.NamespaceSystem).Create(kubeDNSServiceAccount); err != nil {
return fmt.Errorf("failed creating kube-dns service account [%v]", err)
}
if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kubeDNSDeployment); err != nil {
if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(kubeDNSDeployment); err != nil {
return fmt.Errorf("failed creating essential kube-dns addon [%v]", err)
}
@ -293,7 +293,7 @@ func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientse
kubeDNSService := NewService(KubeDNS, *kubeDNSServiceSpec)
kubeDNSService.ObjectMeta.Labels["kubernetes.io/name"] = "KubeDNS"
if _, err := client.Services(api.NamespaceSystem).Create(kubeDNSService); err != nil {
if _, err := client.Services(metav1.NamespaceSystem).Create(kubeDNSService); err != nil {
return fmt.Errorf("failed creating essential kube-dns addon [%v]", err)
}

View File

@ -28,7 +28,6 @@ import (
"k8s.io/client-go/tools/clientcmd"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
"k8s.io/kubernetes/cmd/kubeadm/app/images"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
@ -73,7 +72,7 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) {
fmt.Println("[apiclient] Waiting for at least one node to register and become ready")
start := time.Now()
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
nodeList, err := client.Nodes().List(v1.ListOptions{})
nodeList, err := client.Nodes().List(metav1.ListOptions{})
if err != nil {
fmt.Println("[apiclient] Temporarily unable to list nodes (will retry)")
return false, nil
@ -107,7 +106,7 @@ func WaitForAPI(client *clientset.Clientset) {
start := time.Now()
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
// TODO: use /healthz API instead of this
cs, err := client.ComponentStatuses().List(v1.ListOptions{})
cs, err := client.ComponentStatuses().List(metav1.ListOptions{})
if err != nil {
if apierrs.IsForbidden(err) {
fmt.Println("[apiclient] Waiting for API server authorization")
@ -176,7 +175,7 @@ func NewDeployment(deploymentName string, replicas int32, podSpec v1.PodSpec) *e
// It's safe to do this for alpha, as we don't have HA and there is no way we can get
// more then one node here (TODO(phase1+) use os.Hostname)
func findMyself(client *clientset.Clientset) (*v1.Node, error) {
nodeList, err := client.Nodes().List(v1.ListOptions{})
nodeList, err := client.Nodes().List(metav1.ListOptions{})
if err != nil {
return nil, fmt.Errorf("unable to list nodes [%v]", err)
}
@ -274,7 +273,7 @@ func createDummyDeployment(client *clientset.Clientset) {
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
// TODO: we should check the error, as some cases may be fatal
if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(dummyDeployment); err != nil {
if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(dummyDeployment); err != nil {
fmt.Printf("[apiclient] Failed to create test deployment [%v] (will retry)\n", err)
return false, nil
}
@ -282,7 +281,7 @@ func createDummyDeployment(client *clientset.Clientset) {
})
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
d, err := client.Extensions().Deployments(api.NamespaceSystem).Get("dummy", metav1.GetOptions{})
d, err := client.Extensions().Deployments(metav1.NamespaceSystem).Get("dummy", metav1.GetOptions{})
if err != nil {
fmt.Printf("[apiclient] Failed to get test deployment [%v] (will retry)\n", err)
return false, nil
@ -296,7 +295,7 @@ func createDummyDeployment(client *clientset.Clientset) {
fmt.Println("[apiclient] Test deployment succeeded")
// TODO: In the future, make sure the ReplicaSet and Pod are garbage collected
if err := client.Extensions().Deployments(api.NamespaceSystem).Delete("dummy", &v1.DeleteOptions{}); err != nil {
if err := client.Extensions().Deployments(metav1.NamespaceSystem).Delete("dummy", &v1.DeleteOptions{}); err != nil {
fmt.Printf("[apiclient] Failed to delete test deployment [%v] (will ignore)\n", err)
}
}

View File

@ -30,7 +30,6 @@ import (
kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1"
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
@ -136,10 +135,10 @@ func CreateDiscoveryDeploymentAndSecret(cfg *kubeadmapi.MasterConfiguration, cli
kd := newKubeDiscovery(cfg, caCert)
if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kd.Deployment); err != nil {
if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(kd.Deployment); err != nil {
return fmt.Errorf("failed to create %q deployment [%v]", kubeDiscoveryName, err)
}
if _, err := client.Secrets(api.NamespaceSystem).Create(kd.Secret); err != nil {
if _, err := client.Secrets(metav1.NamespaceSystem).Create(kd.Secret); err != nil {
return fmt.Errorf("failed to create %q secret [%v]", kubeDiscoverySecretName, err)
}
@ -147,7 +146,7 @@ func CreateDiscoveryDeploymentAndSecret(cfg *kubeadmapi.MasterConfiguration, cli
start := time.Now()
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
d, err := client.Extensions().Deployments(api.NamespaceSystem).Get(kubeDiscoveryName, metav1.GetOptions{})
d, err := client.Extensions().Deployments(metav1.NamespaceSystem).Get(kubeDiscoveryName, metav1.GetOptions{})
if err != nil {
return false, nil
}

View File

@ -27,7 +27,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
"k8s.io/kubernetes/cmd/kubeadm/app/images"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
ext "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
@ -69,7 +68,7 @@ func launchSelfHostedAPIServer(cfg *kubeadmapi.MasterConfiguration, client *clie
start := time.Now()
apiServer := getAPIServerDS(cfg, volumes, volumeMounts)
if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(&apiServer); err != nil {
if _, err := client.Extensions().DaemonSets(metav1.NamespaceSystem).Create(&apiServer); err != nil {
return fmt.Errorf("failed to create self-hosted %q daemon set [%v]", kubeAPIServer, err)
}
@ -77,7 +76,7 @@ func launchSelfHostedAPIServer(cfg *kubeadmapi.MasterConfiguration, client *clie
// TODO: This might be pointless, checking the pods is probably enough.
// It does however get us a count of how many there should be which may be useful
// with HA.
apiDS, err := client.DaemonSets(api.NamespaceSystem).Get("self-hosted-"+kubeAPIServer,
apiDS, err := client.DaemonSets(metav1.NamespaceSystem).Get("self-hosted-"+kubeAPIServer,
metav1.GetOptions{})
if err != nil {
fmt.Println("[self-hosted] error getting apiserver DaemonSet:", err)
@ -114,7 +113,7 @@ func launchSelfHostedControllerManager(cfg *kubeadmapi.MasterConfiguration, clie
start := time.Now()
ctrlMgr := getControllerManagerDeployment(cfg, volumes, volumeMounts)
if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(&ctrlMgr); err != nil {
if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(&ctrlMgr); err != nil {
return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeControllerManager, err)
}
@ -133,7 +132,7 @@ func launchSelfHostedControllerManager(cfg *kubeadmapi.MasterConfiguration, clie
func launchSelfHostedScheduler(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset, volumes []v1.Volume, volumeMounts []v1.VolumeMount) error {
start := time.Now()
scheduler := getSchedulerDeployment(cfg)
if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(&scheduler); err != nil {
if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(&scheduler); err != nil {
return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeScheduler, err)
}
@ -153,8 +152,8 @@ func launchSelfHostedScheduler(cfg *kubeadmapi.MasterConfiguration, client *clie
func waitForPodsWithLabel(client *clientset.Clientset, appLabel string, mustBeRunning bool) {
wait.PollInfinite(apiCallRetryInterval, func() (bool, error) {
// TODO: Do we need a stronger label link than this?
listOpts := v1.ListOptions{LabelSelector: fmt.Sprintf("k8s-app=%s", appLabel)}
apiPods, err := client.Pods(api.NamespaceSystem).List(listOpts)
listOpts := metav1.ListOptions{LabelSelector: fmt.Sprintf("k8s-app=%s", appLabel)}
apiPods, err := client.Pods(metav1.NamespaceSystem).List(listOpts)
if err != nil {
fmt.Printf("[self-hosted] error getting %s pods [%v]\n", appLabel, err)
return false, nil

View File

@ -13,7 +13,6 @@ go_library(
tags = ["automanaged"],
deps = [
"//cmd/kubeadm/app/master:go_default_library",
"//pkg/api:go_default_library",
"//pkg/apis/rbac/v1beta1:go_default_library",
"//pkg/client/clientset_generated/clientset:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",

View File

@ -21,7 +21,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/cmd/kubeadm/app/master"
"k8s.io/kubernetes/pkg/api"
rbac "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
)
@ -66,7 +65,7 @@ func CreateKubeDNSRBACClusterRole(clientset *clientset.Clientset) error {
subject := rbac.Subject{
Kind: "ServiceAccount",
Name: master.KubeDNS,
Namespace: api.NamespaceSystem,
Namespace: metav1.NamespaceSystem,
}
clusterRoleBinding := rbac.ClusterRoleBinding{

View File

@ -136,11 +136,11 @@ func UpdateOrCreateToken(client *clientset.Clientset, d *kubeadmapi.TokenDiscove
secretName := fmt.Sprintf("%s%s", BootstrapTokenSecretPrefix, d.ID)
var lastErr error
for i := 0; i < tokenCreateRetries; i++ {
secret, err := client.Secrets(api.NamespaceSystem).Get(secretName, metav1.GetOptions{})
secret, err := client.Secrets(metav1.NamespaceSystem).Get(secretName, metav1.GetOptions{})
if err == nil {
// Secret with this ID already exists, update it:
secret.Data = encodeTokenSecretData(d, tokenDuration)
if _, err := client.Secrets(api.NamespaceSystem).Update(secret); err == nil {
if _, err := client.Secrets(metav1.NamespaceSystem).Update(secret); err == nil {
return nil
} else {
lastErr = err
@ -157,7 +157,7 @@ func UpdateOrCreateToken(client *clientset.Clientset, d *kubeadmapi.TokenDiscove
Type: api.SecretTypeBootstrapToken,
Data: encodeTokenSecretData(d, tokenDuration),
}
if _, err := client.Secrets(api.NamespaceSystem).Create(secret); err == nil {
if _, err := client.Secrets(metav1.NamespaceSystem).Create(secret); err == nil {
return nil
} else {
lastErr = err

View File

@ -145,11 +145,10 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.
if g.version == "" {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"})
} else {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"})
}
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"})
m["GetOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"})
noMethods := extractBoolTagOrDie("noMethods", t.SecondClosestCommentLines) == true

View File

@ -92,11 +92,10 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i
if g.version == "" {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"})
} else {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"})
}
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"})
m["GetOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"})
sw.Do(getterComment, m)

View File

@ -16,7 +16,6 @@ go_library(
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",

View File

@ -19,7 +19,6 @@ package testgroup
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api"
)
var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: runtime.APIVersionInternal}
@ -36,9 +35,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&TestTypeList{},
)
scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{},
)
scheme.AddKnownTypes(SchemeGroupVersion)
return nil
}

View File

@ -38,7 +38,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
)
scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.Status{},
&metav1.ExportOptions{},

View File

@ -72,7 +72,7 @@ func (c *FakeTestTypes) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeTestTypes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeTestTypes) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &testgroup.TestTypeList{})
@ -89,7 +89,7 @@ func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *testgro
return obj.(*testgroup.TestType), err
}
func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList, err error) {
func (c *FakeTestTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(testtypesResource, c.ns, opts), &testgroup.TestTypeList{})
@ -111,7 +111,7 @@ func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup.TestTypeLi
}
// Watch returns a watch.Interface that watches the requested testTypes.
func (c *FakeTestTypes) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(testtypesResource, c.ns, opts))

View File

@ -37,10 +37,10 @@ type TestTypeInterface interface {
Update(*testgroup.TestType) (*testgroup.TestType, error)
UpdateStatus(*testgroup.TestType) (*testgroup.TestType, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*testgroup.TestType, error)
List(opts api.ListOptions) (*testgroup.TestTypeList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*testgroup.TestTypeList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error)
TestTypeExpansion
}
@ -112,7 +112,7 @@ func (c *testTypes) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *testTypes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *testTypes) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("testtypes").
@ -136,7 +136,7 @@ func (c *testTypes) Get(name string, options v1.GetOptions) (result *testgroup.T
}
// List takes label and field selectors, and returns the list of TestTypes that match those selectors.
func (c *testTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList, err error) {
func (c *testTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, err error) {
result = &testgroup.TestTypeList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *testTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList,
}
// Watch returns a watch.Interface that watches the requested testTypes.
func (c *testTypes) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -69,16 +69,14 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w
listerPackage := fmt.Sprintf("%s/%s/%s", g.listersPackage, g.groupVersion.Group.NonEmpty(), strings.ToLower(g.groupVersion.Version.NonEmpty()))
var (
clientSetInterface, namespaceAll *types.Type
clientSetInterface *types.Type
informerFor string
)
if len(g.groupVersion.Version) == 0 {
clientSetInterface = c.Universe.Type(types.Name{Package: g.internalClientSetPackage, Name: "Interface"})
namespaceAll = c.Universe.Type(apiNamespaceAll)
informerFor = "InternalInformerFor"
} else {
clientSetInterface = c.Universe.Type(types.Name{Package: g.versionedClientSetPackage, Name: "Interface"})
namespaceAll = c.Universe.Type(v1NamespaceAll)
informerFor = "VersionedInformerFor"
}
@ -96,7 +94,7 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w
"interfacesSharedInformerFactory": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "SharedInformerFactory"}),
"listOptions": c.Universe.Type(listOptions),
"lister": c.Universe.Type(types.Name{Package: listerPackage, Name: t.Name.Name + "Lister"}),
"namespaceAll": namespaceAll,
"namespaceAll": c.Universe.Type(metav1NamespaceAll),
"namespaced": !extractBoolTagOrDie("nonNamespaced", t.SecondClosestCommentLines),
"newLister": c.Universe.Function(types.Name{Package: listerPackage, Name: "New" + t.Name.Name + "Lister"}),
"runtimeObject": c.Universe.Type(runtimeObject),
@ -140,18 +138,10 @@ func new$.type|public$Informer(client $.clientSetInterface|raw$, resyncPeriod $.
sharedIndexInformer := $.cacheNewSharedIndexInformer|raw$(
&$.cacheListWatch|raw${
ListFunc: func(options $.v1ListOptions|raw$) ($.runtimeObject|raw$, error) {
var internalOptions $.listOptions|raw$
if err := $.apiScheme|raw$.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).List(internalOptions)
return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).List(options)
},
WatchFunc: func(options $.v1ListOptions|raw$) ($.watchInterface|raw$, error) {
var internalOptions $.listOptions|raw$
if err := $.apiScheme|raw$.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).Watch(internalOptions)
return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).Watch(options)
},
},
&$.type|raw${},

View File

@ -19,7 +19,6 @@ package generators
import "k8s.io/gengo/types"
var (
apiNamespaceAll = types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "NamespaceAll"}
apiScheme = types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "Scheme"}
cacheGenericLister = types.Name{Package: "k8s.io/kubernetes/pkg/client/cache", Name: "GenericLister"}
cacheIndexers = types.Name{Package: "k8s.io/kubernetes/pkg/client/cache", Name: "Indexers"}
@ -36,7 +35,7 @@ var (
schemaGroupVersionResource = types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionResource"}
syncMutex = types.Name{Package: "sync", Name: "Mutex"}
timeDuration = types.Name{Package: "time", Name: "Duration"}
v1ListOptions = types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"}
v1NamespaceAll = types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "NamespaceAll"}
v1ListOptions = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}
metav1NamespaceAll = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "NamespaceAll"}
watchInterface = types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}
)

View File

@ -50,6 +50,7 @@ go_test(
"//plugin/pkg/scheduler/api:go_default_library",
"//plugin/pkg/scheduler/api/latest:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/util/validation/field",

View File

@ -26,6 +26,8 @@ import (
"testing"
"github.com/golang/glog"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/validation/field"
@ -48,7 +50,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
switch t := obj.(type) {
case *api.ReplicationController:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateReplicationController(t)
case *api.ReplicationControllerList:
@ -57,7 +59,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
}
case *api.Service:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateService(t)
case *api.ServiceList:
@ -66,7 +68,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
}
case *api.Pod:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePod(t)
case *api.PodList:
@ -77,44 +79,44 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
errors = validation.ValidatePersistentVolume(t)
case *api.PersistentVolumeClaim:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePersistentVolumeClaim(t)
case *api.PodTemplate:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePodTemplate(t)
case *api.Endpoints:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateEndpoints(t)
case *api.Namespace:
errors = validation.ValidateNamespace(t)
case *api.Secret:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateSecret(t)
case *api.LimitRange:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateLimitRange(t)
case *api.ResourceQuota:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateResourceQuota(t)
case *extensions.Deployment:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateDeployment(t)
case *batch.Job:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
// Job needs generateSelector called before validation, and job.Validate does this.
// See: https://github.com/kubernetes/kubernetes/issues/20951#issuecomment-187787040
@ -122,17 +124,17 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
errors = job.Strategy.Validate(nil, t)
case *extensions.Ingress:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateIngress(t)
case *extensions.DaemonSet:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateDaemonSet(t)
case *apps.StatefulSet:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = appsvalidation.ValidateStatefulSet(t)
default:

View File

@ -11,15 +11,12 @@ go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"register.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/fields",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",

View File

@ -1,37 +0,0 @@
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package core
import (
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/api"
)
func addDefaultingFuncs(scheme *runtime.Scheme) error {
return scheme.AddDefaultingFuncs(
func(obj *api.ListOptions) {
if obj.LabelSelector == nil {
obj.LabelSelector = labels.Everything()
}
if obj.FieldSelector == nil {
obj.FieldSelector = fields.Everything()
}
},
)
}

View File

@ -54,7 +54,7 @@ func Resource(resource string) schema.GroupResource {
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs)
AddToScheme = SchemeBuilder.AddToScheme
)
@ -67,7 +67,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&api.Service{},
&api.Namespace{},
&api.NamespaceList{},
&api.ListOptions{},
&api.DeleteOptions{},
&api.Secret{},
&api.SecretList{},

View File

@ -41,7 +41,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&v1.Namespace{},
&v1.NamespaceList{},
&v1.ServiceList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&v1.Secret{},
&v1.SecretList{},

View File

@ -47,7 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Cluster{},
&ClusterList{},
&api.ListOptions{},
&api.DeleteOptions{},
)
return nil

View File

@ -38,7 +38,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Cluster{},
&ClusterList{},
&v1.ListOptions{},
&v1.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},

View File

@ -102,9 +102,7 @@ func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef

View File

@ -118,9 +118,7 @@ func DeepCopy_federation_ClusterSpec(in interface{}, out interface{}, c *convers
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
copy(*out, *in)
}
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef

View File

@ -72,7 +72,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.Delet
return err
}
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
@ -89,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptio
return obj.(*v1.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
@ -111,7 +111,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))

View File

@ -38,10 +38,10 @@ type HorizontalPodAutoscalerInterface interface {
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Delete(name string, options *api_v1.DeleteOptions) error
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts api_v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@ -113,7 +113,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOpt
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
@ -137,7 +137,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions)
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
result = &v1.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.Hor
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -72,7 +72,7 @@ func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error {
return err
}
func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.JobList{})
@ -89,7 +89,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job,
return obj.(*v1.Job), err
}
func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{})
@ -111,7 +111,7 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error)
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))

View File

@ -38,10 +38,10 @@ type JobInterface interface {
Update(*v1.Job) (*v1.Job, error)
UpdateStatus(*v1.Job) (*v1.Job, error)
Delete(name string, options *api_v1.DeleteOptions) error
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
List(opts api_v1.ListOptions) (*v1.JobList, error)
Watch(opts api_v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.JobList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
JobExpansion
}
@ -113,7 +113,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
@ -137,7 +137,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
result = &v1.JobList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -36,10 +36,10 @@ type ConfigMapInterface interface {
Create(*v1.ConfigMap) (*v1.ConfigMap, error)
Update(*v1.ConfigMap) (*v1.ConfigMap, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
List(opts v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
ConfigMapExpansion
}
@ -95,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
@ -119,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
result = &v1.ConfigMapList{}
err = c.client.Get().
Namespace(c.ns).
@ -131,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -36,10 +36,10 @@ type EventInterface interface {
Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
List(opts v1.ListOptions) (*v1.EventList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.EventList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion
}
@ -95,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
@ -119,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event,
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
result = &v1.EventList{}
err = c.client.Get().
Namespace(c.ns).
@ -131,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -61,7 +61,7 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v
return obj.(*v1.ConfigMap), err
}
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
@ -100,7 +100,7 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))

View File

@ -61,7 +61,7 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.EventList{})
@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev
return obj.(*v1.Event), err
}
func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) {
func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
@ -100,7 +100,7 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error)
}
// Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))

View File

@ -66,7 +66,7 @@ func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.NamespaceList{})
@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v
return obj.(*v1.Namespace), err
}
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
if obj == nil {
@ -103,7 +103,7 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
}

View File

@ -61,7 +61,7 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.SecretList{})
@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options meta_v1.GetOptions) (result *v1.S
return obj.(*v1.Secret), err
}
func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
func (c *FakeSecrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
@ -100,7 +100,7 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err erro
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeSecrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))

View File

@ -71,7 +71,7 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ServiceList{})
@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options meta_v1.GetOptions) (result *v1.
return obj.(*v1.Service), err
}
func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
func (c *FakeServices) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
@ -110,7 +110,7 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err er
}
// Watch returns a watch.Interface that watches the requested services.
func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))

View File

@ -37,10 +37,10 @@ type NamespaceInterface interface {
Update(*v1.Namespace) (*v1.Namespace, error)
UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
List(opts v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
NamespaceExpansion
}
@ -106,7 +106,7 @@ func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Resource("namespaces").
VersionedParams(&listOptions, api.ParameterCodec).
@ -128,7 +128,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
result = &v1.NamespaceList{}
err = c.client.Get().
Resource("namespaces").
@ -139,7 +139,7 @@ func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err er
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("namespaces").

View File

@ -36,10 +36,10 @@ type SecretInterface interface {
Create(*v1.Secret) (*v1.Secret, error)
Update(*v1.Secret) (*v1.Secret, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Secret, error)
List(opts v1.ListOptions) (*v1.SecretList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.SecretList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
SecretExpansion
}
@ -95,7 +95,7 @@ func (c *secrets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").
@ -119,7 +119,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
result = &v1.SecretList{}
err = c.client.Get().
Namespace(c.ns).
@ -131,7 +131,7 @@ func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -37,10 +37,10 @@ type ServiceInterface interface {
Update(*v1.Service) (*v1.Service, error)
UpdateStatus(*v1.Service) (*v1.Service, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
List(opts v1.ListOptions) (*v1.ServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
ServiceExpansion
}
@ -112,7 +112,7 @@ func (c *services) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").
@ -136,7 +136,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
result = &v1.ServiceList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error)
}
// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -38,10 +38,10 @@ type DaemonSetInterface interface {
Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.DaemonSet, error)
List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1beta1.DaemonSetList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
DaemonSetExpansion
}
@ -113,7 +113,7 @@ func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
@ -137,7 +137,7 @@ func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1bet
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
result = &v1beta1.DaemonSetList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -38,10 +38,10 @@ type DeploymentInterface interface {
Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Deployment, error)
List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
DeploymentExpansion
}
@ -113,7 +113,7 @@ func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
@ -137,7 +137,7 @@ func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1be
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
func (c *deployments) List(opts meta_v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
result = &v1beta1.DeploymentList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -72,7 +72,7 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{})
@ -89,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string, options meta_v1.GetOptions) (result *v
return obj.(*v1beta1.DaemonSet), err
}
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
func (c *FakeDaemonSets) List(opts meta_v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &v1beta1.DaemonSetList{})
@ -111,7 +111,7 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetLis
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDaemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
@ -89,7 +89,7 @@ func (c *FakeDeployments) Get(name string, options meta_v1.GetOptions) (result *
return obj.(*v1beta1.Deployment), err
}
func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
func (c *FakeDeployments) List(opts meta_v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{})
@ -111,7 +111,7 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDeployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.IngressList{})
@ -89,7 +89,7 @@ func (c *FakeIngresses) Get(name string, options meta_v1.GetOptions) (result *v1
return obj.(*v1beta1.Ingress), err
}
func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
func (c *FakeIngresses) List(opts meta_v1.ListOptions) (result *v1beta1.IngressList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{})
@ -111,7 +111,7 @@ func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList,
}
// Watch returns a watch.Interface that watches the requested ingresses.
func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIngresses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{})
@ -89,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string, options meta_v1.GetOptions) (result *
return obj.(*v1beta1.ReplicaSet), err
}
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
func (c *FakeReplicaSets) List(opts meta_v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{})
@ -111,7 +111,7 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetL
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeReplicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))

View File

@ -38,10 +38,10 @@ type IngressInterface interface {
Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Ingress, error)
List(opts v1.ListOptions) (*v1beta1.IngressList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1beta1.IngressList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
IngressExpansion
}
@ -113,7 +113,7 @@ func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingresses").
@ -137,7 +137,7 @@ func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1beta
}
// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
func (c *ingresses) List(opts meta_v1.ListOptions) (result *v1beta1.IngressList, err error) {
result = &v1beta1.IngressList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err
}
// Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *ingresses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -38,10 +38,10 @@ type ReplicaSetInterface interface {
Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.ReplicaSet, error)
List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1beta1.ReplicaSetList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
ReplicaSetExpansion
}
@ -113,7 +113,7 @@ func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").
@ -137,7 +137,7 @@ func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1be
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
result = &v1beta1.ReplicaSetList{}
err = c.client.Get().
Namespace(c.ns).
@ -149,7 +149,7 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *replicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -38,10 +38,10 @@ type ClusterInterface interface {
Update(*v1beta1.Cluster) (*v1beta1.Cluster, error)
UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error
Get(name string, options meta_v1.GetOptions) (*v1beta1.Cluster, error)
List(opts v1.ListOptions) (*v1beta1.ClusterList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
List(opts meta_v1.ListOptions) (*v1beta1.ClusterList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error)
ClusterExpansion
}
@ -107,7 +107,7 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
return c.client.Delete().
Resource("clusters").
VersionedParams(&listOptions, api.ParameterCodec).
@ -129,7 +129,7 @@ func (c *clusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1
}
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err error) {
func (c *clusters) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterList, err error) {
result = &v1beta1.ClusterList{}
err = c.client.Get().
Resource("clusters").
@ -140,7 +140,7 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err e
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *clusters) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("clusters").

View File

@ -67,7 +67,7 @@ func (c *FakeClusters) Delete(name string, options *v1.DeleteOptions) error {
return err
}
func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(clustersResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ClusterList{})
@ -83,7 +83,7 @@ func (c *FakeClusters) Get(name string, options meta_v1.GetOptions) (result *v1b
return obj.(*v1beta1.Cluster), err
}
func (c *FakeClusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err error) {
func (c *FakeClusters) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(clustersResource, opts), &v1beta1.ClusterList{})
if obj == nil {
@ -104,7 +104,7 @@ func (c *FakeClusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, e
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeClusters) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(clustersResource, opts))
}

View File

@ -72,7 +72,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp
return err
}
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{})
@ -89,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (
return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{})
@ -111,7 +111,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autos
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))

View File

@ -37,10 +37,10 @@ type HorizontalPodAutoscalerInterface interface {
Update(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
UpdateStatus(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*autoscaling.HorizontalPodAutoscaler, error)
List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@ -112,7 +112,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
@ -136,7 +136,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
result = &autoscaling.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscali
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -72,7 +72,7 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &batch.JobList{})
@ -89,7 +89,7 @@ func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch.Job, e
return obj.(*batch.Job), err
}
func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
func (c *FakeJobs) List(opts v1.ListOptions) (result *batch.JobList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(jobsResource, c.ns, opts), &batch.JobList{})
@ -111,7 +111,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error)
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))

View File

@ -37,10 +37,10 @@ type JobInterface interface {
Update(*batch.Job) (*batch.Job, error)
UpdateStatus(*batch.Job) (*batch.Job, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*batch.Job, error)
List(opts api.ListOptions) (*batch.JobList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*batch.JobList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error)
JobExpansion
}
@ -112,7 +112,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
@ -136,7 +136,7 @@ func (c *jobs) Get(name string, options v1.GetOptions) (result *batch.Job, err e
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) {
result = &batch.JobList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) {
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -35,10 +35,10 @@ type ConfigMapInterface interface {
Create(*api.ConfigMap) (*api.ConfigMap, error)
Update(*api.ConfigMap) (*api.ConfigMap, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*api.ConfigMap, error)
List(opts api.ListOptions) (*api.ConfigMapList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*api.ConfigMapList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error)
ConfigMapExpansion
}
@ -94,7 +94,7 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
@ -118,7 +118,7 @@ func (c *configMaps) Get(name string, options v1.GetOptions) (result *api.Config
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) {
func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) {
result = &api.ConfigMapList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +130,7 @@ func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -35,10 +35,10 @@ type EventInterface interface {
Create(*api.Event) (*api.Event, error)
Update(*api.Event) (*api.Event, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*api.Event, error)
List(opts api.ListOptions) (*api.EventList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*api.EventList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error)
EventExpansion
}
@ -94,7 +94,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
@ -118,7 +118,7 @@ func (c *events) Get(name string, options v1.GetOptions) (result *api.Event, err
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) {
func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) {
result = &api.EventList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +130,7 @@ func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) {
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -61,7 +61,7 @@ func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &api.ConfigMapList{})
@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *api.Co
return obj.(*api.ConfigMap), err
}
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) {
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &api.ConfigMapList{})
@ -100,7 +100,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList,
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))

View File

@ -61,7 +61,7 @@ func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &api.EventList{})
@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *api.Event,
return obj.(*api.Event), err
}
func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err error) {
func (c *FakeEvents) List(opts v1.ListOptions) (result *api.EventList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(eventsResource, c.ns, opts), &api.EventList{})
@ -100,7 +100,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro
}
// Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))

View File

@ -66,7 +66,7 @@ func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &api.NamespaceList{})
@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *api.Na
return obj.(*api.Namespace), err
}
func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &api.NamespaceList{})
if obj == nil {
@ -103,7 +103,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList,
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
}

View File

@ -61,7 +61,7 @@ func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &api.SecretList{})
@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *api.Secre
return obj.(*api.Secret), err
}
func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err error) {
func (c *FakeSecrets) List(opts v1.ListOptions) (result *api.SecretList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(secretsResource, c.ns, opts), &api.SecretList{})
@ -100,7 +100,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))

View File

@ -71,7 +71,7 @@ func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &api.ServiceList{})
@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options v1.GetOptions) (result *api.Serv
return obj.(*api.Service), err
}
func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err error) {
func (c *FakeServices) List(opts v1.ListOptions) (result *api.ServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(servicesResource, c.ns, opts), &api.ServiceList{})
@ -110,7 +110,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err
}
// Watch returns a watch.Interface that watches the requested services.
func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))

View File

@ -36,10 +36,10 @@ type NamespaceInterface interface {
Update(*api.Namespace) (*api.Namespace, error)
UpdateStatus(*api.Namespace) (*api.Namespace, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*api.Namespace, error)
List(opts api.ListOptions) (*api.NamespaceList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*api.NamespaceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error)
NamespaceExpansion
}
@ -105,7 +105,7 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("namespaces").
VersionedParams(&listOptions, api.ParameterCodec).
@ -127,7 +127,7 @@ func (c *namespaces) Get(name string, options v1.GetOptions) (result *api.Namesp
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) {
result = &api.NamespaceList{}
err = c.client.Get().
Resource("namespaces").
@ -138,7 +138,7 @@ func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("namespaces").

View File

@ -35,10 +35,10 @@ type SecretInterface interface {
Create(*api.Secret) (*api.Secret, error)
Update(*api.Secret) (*api.Secret, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*api.Secret, error)
List(opts api.ListOptions) (*api.SecretList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*api.SecretList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error)
SecretExpansion
}
@ -94,7 +94,7 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").
@ -118,7 +118,7 @@ func (c *secrets) Get(name string, options v1.GetOptions) (result *api.Secret, e
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) {
func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error) {
result = &api.SecretList{}
err = c.client.Get().
Namespace(c.ns).
@ -130,7 +130,7 @@ func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error)
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -36,10 +36,10 @@ type ServiceInterface interface {
Update(*api.Service) (*api.Service, error)
UpdateStatus(*api.Service) (*api.Service, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*api.Service, error)
List(opts api.ListOptions) (*api.ServiceList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*api.ServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error)
ServiceExpansion
}
@ -111,7 +111,7 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").
@ -135,7 +135,7 @@ func (c *services) Get(name string, options v1.GetOptions) (result *api.Service,
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) {
func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error) {
result = &api.ServiceList{}
err = c.client.Get().
Namespace(c.ns).
@ -147,7 +147,7 @@ func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err erro
}
// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -37,10 +37,10 @@ type DaemonSetInterface interface {
Update(*extensions.DaemonSet) (*extensions.DaemonSet, error)
UpdateStatus(*extensions.DaemonSet) (*extensions.DaemonSet, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*extensions.DaemonSet, error)
List(opts api.ListOptions) (*extensions.DaemonSetList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*extensions.DaemonSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error)
DaemonSetExpansion
}
@ -112,7 +112,7 @@ func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
@ -136,7 +136,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *extensions
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) {
result = &extensions.DaemonSetList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetLis
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -37,10 +37,10 @@ type DeploymentInterface interface {
Update(*extensions.Deployment) (*extensions.Deployment, error)
UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*extensions.Deployment, error)
List(opts api.ListOptions) (*extensions.DeploymentList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*extensions.DeploymentList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error)
DeploymentExpansion
}
@ -112,7 +112,7 @@ func (c *deployments) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
@ -136,7 +136,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *extension
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) {
func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) {
result = &extensions.DeploymentList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentL
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -72,7 +72,7 @@ func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &extensions.DaemonSetList{})
@ -89,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *extens
return obj.(*extensions.DaemonSet), err
}
func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &extensions.DaemonSetList{})
@ -111,7 +111,7 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error
return err
}
func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &extensions.DeploymentList{})
@ -89,7 +89,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *exten
return obj.(*extensions.Deployment), err
}
func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) {
func (c *FakeDeployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &extensions.DeploymentList{})
@ -111,7 +111,7 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &extensions.IngressList{})
@ -89,7 +89,7 @@ func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *extensi
return obj.(*extensions.Ingress), err
}
func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
func (c *FakeIngresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &extensions.IngressList{})
@ -111,7 +111,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi
}
// Watch returns a watch.Interface that watches the requested ingresses.
func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))

View File

@ -72,7 +72,7 @@ func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error
return err
}
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{})
@ -89,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *exten
return obj.(*extensions.ReplicaSet), err
}
func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) {
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &extensions.ReplicaSetList{})
@ -111,7 +111,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))

View File

@ -37,10 +37,10 @@ type IngressInterface interface {
Update(*extensions.Ingress) (*extensions.Ingress, error)
UpdateStatus(*extensions.Ingress) (*extensions.Ingress, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*extensions.Ingress, error)
List(opts api.ListOptions) (*extensions.IngressList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*extensions.IngressList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error)
IngressExpansion
}
@ -112,7 +112,7 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingresses").
@ -136,7 +136,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *extensions.
}
// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) {
result = &extensions.IngressList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList,
}
// Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -37,10 +37,10 @@ type ReplicaSetInterface interface {
Update(*extensions.ReplicaSet) (*extensions.ReplicaSet, error)
UpdateStatus(*extensions.ReplicaSet) (*extensions.ReplicaSet, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*extensions.ReplicaSet, error)
List(opts api.ListOptions) (*extensions.ReplicaSetList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*extensions.ReplicaSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error)
ReplicaSetExpansion
}
@ -112,7 +112,7 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").
@ -136,7 +136,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *extension
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) {
func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) {
result = &extensions.ReplicaSetList{}
err = c.client.Get().
Namespace(c.ns).
@ -148,7 +148,7 @@ func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetL
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Namespace(c.ns).

View File

@ -37,10 +37,10 @@ type ClusterInterface interface {
Update(*federation.Cluster) (*federation.Cluster, error)
UpdateStatus(*federation.Cluster) (*federation.Cluster, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*federation.Cluster, error)
List(opts api.ListOptions) (*federation.ClusterList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
List(opts v1.ListOptions) (*federation.ClusterList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error)
ClusterExpansion
}
@ -106,7 +106,7 @@ func (c *clusters) Delete(name string, options *api.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *clusters) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("clusters").
VersionedParams(&listOptions, api.ParameterCodec).
@ -128,7 +128,7 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *federation.C
}
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts api.ListOptions) (result *federation.ClusterList, err error) {
func (c *clusters) List(opts v1.ListOptions) (result *federation.ClusterList, err error) {
result = &federation.ClusterList{}
err = c.client.Get().
Resource("clusters").
@ -139,7 +139,7 @@ func (c *clusters) List(opts api.ListOptions) (result *federation.ClusterList, e
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("clusters").

View File

@ -67,7 +67,7 @@ func (c *FakeClusters) Delete(name string, options *api.DeleteOptions) error {
return err
}
func (c *FakeClusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
func (c *FakeClusters) DeleteCollection(options *api.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(clustersResource, listOptions)
_, err := c.Fake.Invokes(action, &federation.ClusterList{})
@ -83,7 +83,7 @@ func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *federati
return obj.(*federation.Cluster), err
}
func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterList, err error) {
func (c *FakeClusters) List(opts v1.ListOptions) (result *federation.ClusterList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(clustersResource, opts), &federation.ClusterList{})
if obj == nil {
@ -104,7 +104,7 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterLis
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) {
func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(clustersResource, opts))
}

View File

@ -142,7 +142,7 @@ func getRegionNameForNode(node api.Node) (string, error) {
// Find the names of all zones and the region in which we have nodes in this cluster.
func getZoneNames(client *clientset.Clientset) (zones []string, region string, err error) {
zoneNames := sets.NewString()
nodes, err := client.Core().Nodes().List(api.ListOptions{})
nodes, err := client.Core().Nodes().List(metav1.ListOptions{})
if err != nil {
glog.Errorf("Failed to list nodes while getting zone names: %v", err)
return nil, "", err

View File

@ -21,6 +21,7 @@ import (
"time"
"github.com/golang/glog"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/sets"
@ -29,7 +30,6 @@ import (
federationv1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
clustercache "k8s.io/kubernetes/federation/client/cache"
federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/controller"
)
@ -64,10 +64,10 @@ func NewclusterController(federationClient federationclientset.Interface, cluste
}
cc.clusterStore.Store, cc.clusterController = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return cc.federationClient.Federation().Clusters().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return cc.federationClient.Federation().Clusters().Watch(options)
},
},
@ -134,7 +134,7 @@ func (cc *ClusterController) GetClusterStatus(cluster *federationv1beta1.Cluster
// UpdateClusterStatus checks cluster status and get the metrics from cluster's restapi
func (cc *ClusterController) UpdateClusterStatus() error {
clusters, err := cc.federationClient.Federation().Clusters().List(v1.ListOptions{})
clusters, err := cc.federationClient.Federation().Clusters().List(metav1.ListOptions{})
if err != nil {
return err
}

View File

@ -24,6 +24,7 @@ go_library(
"//pkg/client/record:go_default_library",
"//pkg/controller:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",

View File

@ -19,6 +19,7 @@ package configmap
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkgruntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
@ -98,11 +99,11 @@ func NewConfigMapController(client federationclientset.Interface) *ConfigMapCont
// Start informer on federated API servers on configmaps that should be federated.
configmapcontroller.configmapInformerStore, configmapcontroller.configmapInformerController = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) {
return client.Core().ConfigMaps(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return client.Core().ConfigMaps(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return client.Core().ConfigMaps(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return client.Core().ConfigMaps(metav1.NamespaceAll).Watch(options)
},
},
&apiv1.ConfigMap{},
@ -115,11 +116,11 @@ func NewConfigMapController(client federationclientset.Interface) *ConfigMapCont
func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) {
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Core().ConfigMaps(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Core().ConfigMaps(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return targetClient.Core().ConfigMaps(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return targetClient.Core().ConfigMaps(metav1.NamespaceAll).Watch(options)
},
},
&apiv1.ConfigMap{},

View File

@ -27,6 +27,7 @@ go_library(
"//pkg/controller:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/api/errors",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/watch",

View File

@ -22,6 +22,7 @@ import (
"time"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
pkgruntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
@ -105,11 +106,11 @@ func NewDaemonSetController(client federationclientset.Interface) *DaemonSetCont
// Start informer in federated API servers on daemonsets that should be federated.
daemonsetcontroller.daemonsetInformerStore, daemonsetcontroller.daemonsetInformerController = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) {
return client.Extensions().DaemonSets(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return client.Extensions().DaemonSets(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return client.Extensions().DaemonSets(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return client.Extensions().DaemonSets(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1.DaemonSet{},
@ -122,11 +123,11 @@ func NewDaemonSetController(client federationclientset.Interface) *DaemonSetCont
func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) {
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Extensions().DaemonSets(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Extensions().DaemonSets(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return targetClient.Extensions().DaemonSets(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return targetClient.Extensions().DaemonSets(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1.DaemonSet{},

View File

@ -31,6 +31,7 @@ go_library(
"//pkg/util/workqueue:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/api/errors",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/util/wait",
"//vendor:k8s.io/apimachinery/pkg/watch",

View File

@ -26,6 +26,7 @@ import (
"github.com/golang/glog"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/watch"
@ -122,11 +123,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen
deploymentFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) {
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) {
return clientset.Extensions().Deployments(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return clientset.Extensions().Deployments(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return clientset.Extensions().Deployments(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return clientset.Extensions().Deployments(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1.Deployment{},
@ -149,11 +150,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen
podFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) {
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) {
return clientset.Core().Pods(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return clientset.Core().Pods(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return clientset.Core().Pods(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return clientset.Core().Pods(metav1.NamespaceAll).Watch(options)
},
},
&apiv1.Pod{},
@ -169,11 +170,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen
fdc.deploymentStore, fdc.deploymentController = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) {
return fdc.fedClient.Extensions().Deployments(apiv1.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
return fdc.fedClient.Extensions().Deployments(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) {
return fdc.fedClient.Extensions().Deployments(apiv1.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return fdc.fedClient.Extensions().Deployments(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1.Deployment{},

View File

@ -177,7 +177,7 @@ func newDeploymentWithReplicas(name string, replicas int32) *extensionsv1.Deploy
return &extensionsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: apiv1.NamespaceDefault,
Namespace: metav1.NamespaceDefault,
SelfLink: "/api/v1/namespaces/default/deployments/name",
},
Spec: extensionsv1.DeploymentSpec{

View File

@ -140,11 +140,11 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
// Start informer in federated API servers on ingresses that should be federated.
ic.ingressInformerStore, ic.ingressInformerController = cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) {
return client.Extensions().Ingresses(api.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return client.Extensions().Ingresses(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return client.Extensions().Ingresses(api.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return client.Extensions().Ingresses(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1beta1.Ingress{},
@ -161,11 +161,11 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) {
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Extensions().Ingresses(api.NamespaceAll).List(options)
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
return targetClient.Extensions().Ingresses(metav1.NamespaceAll).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return targetClient.Extensions().Ingresses(api.NamespaceAll).Watch(options)
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
return targetClient.Extensions().Ingresses(metav1.NamespaceAll).Watch(options)
},
},
&extensionsv1beta1.Ingress{},
@ -194,13 +194,13 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
glog.V(4).Infof("Returning new informer for cluster %q", cluster.Name)
return cache.NewInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) {
ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) {
if targetClient == nil {
glog.Errorf("Internal error: targetClient is nil")
}
return targetClient.Core().ConfigMaps(uidConfigMapNamespace).List(options) // we only want to list one by name - unfortunately Kubernetes don't have a selector for that.
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if targetClient == nil {
glog.Errorf("Internal error: targetClient is nil")
}

Some files were not shown because too many files have changed in this diff Show More