diff --git a/cluster/addons/fluentd-elasticsearch/es-image/BUILD b/cluster/addons/fluentd-elasticsearch/es-image/BUILD index 2d97357375a2..b878eb61d946 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/BUILD +++ b/cluster/addons/fluentd-elasticsearch/es-image/BUILD @@ -16,9 +16,9 @@ go_library( srcs = ["elasticsearch_logging_discovery.go"], importpath = "k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image", deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library", diff --git a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go index a9158128bb62..ee2bc13daadd 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go +++ b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go @@ -24,13 +24,13 @@ import ( "strings" "time" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/klog" - api "k8s.io/kubernetes/pkg/apis/core" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" ) func buildConfigFromEnvs(masterURL, kubeconfigPath string) (*restclient.Config, error) { @@ -48,7 +48,7 @@ func buildConfigFromEnvs(masterURL, kubeconfigPath string) (*restclient.Config, &clientcmd.ConfigOverrides{ClusterInfo: clientapi.Cluster{Server: masterURL}}).ClientConfig() } -func flattenSubsets(subsets []api.EndpointSubset) []string { +func flattenSubsets(subsets []corev1.EndpointSubset) []string { ips := []string{} for _, ss := range subsets { for _, addr := range ss.Addresses { @@ -75,13 +75,13 @@ func main() { namespace := metav1.NamespaceSystem envNamespace := os.Getenv("NAMESPACE") if envNamespace != "" { - if _, err := client.Core().Namespaces().Get(envNamespace, metav1.GetOptions{}); err != nil { + if _, err := client.CoreV1().Namespaces().Get(envNamespace, metav1.GetOptions{}); err != nil { klog.Fatalf("%s namespace doesn't exist: %v", envNamespace, err) } namespace = envNamespace } - var elasticsearch *api.Service + var elasticsearch *corev1.Service serviceName := os.Getenv("ELASTICSEARCH_SERVICE_NAME") if serviceName == "" { serviceName = "elasticsearch-logging" @@ -90,7 +90,7 @@ func main() { // Look for endpoints associated with the Elasticsearch logging service. // First wait for the service to become available. for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - elasticsearch, err = client.Core().Services(namespace).Get(serviceName, metav1.GetOptions{}) + elasticsearch, err = client.CoreV1().Services(namespace).Get(serviceName, metav1.GetOptions{}) if err == nil { break } @@ -102,12 +102,12 @@ func main() { return } - var endpoints *api.Endpoints + var endpoints *corev1.Endpoints addrs := []string{} // Wait for some endpoints. count, _ := strconv.Atoi(os.Getenv("MINIMUM_MASTER_NODES")) for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - endpoints, err = client.Core().Endpoints(namespace).Get(serviceName, metav1.GetOptions{}) + endpoints, err = client.CoreV1().Endpoints(namespace).Get(serviceName, metav1.GetOptions{}) if err != nil { continue } diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 346648703062..add561e071b8 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -71,7 +71,6 @@ INTERNAL_DIRS_CSV=$(IFS=',';echo "${INTERNAL_DIRS[*]// /,}";IFS=$) # This can be called with one flag, --verify-only, so it works for both the # update- and verify- scripts. -${clientgen} --input-base="k8s.io/kubernetes/pkg/apis" --input="${INTERNAL_DIRS_CSV}" "$@" ${clientgen} --output-base "${KUBE_ROOT}/vendor" --output-package="k8s.io/client-go" --clientset-name="kubernetes" --input-base="k8s.io/kubernetes/vendor/k8s.io/api" --input="${GV_DIRS_CSV}" --go-header-file ${KUBE_ROOT}/hack/boilerplate/boilerplate.generatego.txt "$@" listergen_external_apis=( diff --git a/pkg/BUILD b/pkg/BUILD index 976abb056524..902581f13746 100644 --- a/pkg/BUILD +++ b/pkg/BUILD @@ -53,7 +53,6 @@ filegroup( "//pkg/auth/authorizer/abac:all-srcs", "//pkg/auth/nodeidentifier:all-srcs", "//pkg/capabilities:all-srcs", - "//pkg/client/clientset_generated/internalclientset:all-srcs", "//pkg/client/conditions:all-srcs", "//pkg/client/leaderelectionconfig:all-srcs", "//pkg/client/metrics/prometheus:all-srcs", diff --git a/pkg/client/clientset_generated/.import-restrictions b/pkg/client/clientset_generated/.import-restrictions deleted file mode 100644 index d3a3fedea37e..000000000000 --- a/pkg/client/clientset_generated/.import-restrictions +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io/kubernetes/pkg/client/unversioned", - "AllowedPrefixes": [ - ] - } - ] -} - diff --git a/pkg/client/clientset_generated/internalclientset/BUILD b/pkg/client/clientset_generated/internalclientset/BUILD deleted file mode 100644 index 72b70c039e8b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/BUILD +++ /dev/null @@ -1,75 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset", - deps = [ - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/node/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//staging/src/k8s.io/client-go/discovery:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/fake:all-srcs", - "//pkg/client/clientset_generated/internalclientset/scheme:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/node/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:all-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go deleted file mode 100644 index 8086193ec9aa..000000000000 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalclientset - -import ( - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - admissionregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion" - appsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" - auditregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion" - authenticationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" - authorizationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" - autoscalinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion" - batchinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion" - certificatesinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion" - coordinationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion" - coreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - eventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion" - extensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" - networkinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion" - nodeinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/node/internalversion" - policyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" - schedulinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion" - settingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion" - storageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - Admissionregistration() admissionregistrationinternalversion.AdmissionregistrationInterface - Core() coreinternalversion.CoreInterface - Apps() appsinternalversion.AppsInterface - Auditregistration() auditregistrationinternalversion.AuditregistrationInterface - Authentication() authenticationinternalversion.AuthenticationInterface - Authorization() authorizationinternalversion.AuthorizationInterface - Autoscaling() autoscalinginternalversion.AutoscalingInterface - Batch() batchinternalversion.BatchInterface - Certificates() certificatesinternalversion.CertificatesInterface - Coordination() coordinationinternalversion.CoordinationInterface - Events() eventsinternalversion.EventsInterface - Extensions() extensionsinternalversion.ExtensionsInterface - Networking() networkinginternalversion.NetworkingInterface - Node() nodeinternalversion.NodeInterface - Policy() policyinternalversion.PolicyInterface - Rbac() rbacinternalversion.RbacInterface - Scheduling() schedulinginternalversion.SchedulingInterface - Settings() settingsinternalversion.SettingsInterface - Storage() storageinternalversion.StorageInterface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - admissionregistration *admissionregistrationinternalversion.AdmissionregistrationClient - core *coreinternalversion.CoreClient - apps *appsinternalversion.AppsClient - auditregistration *auditregistrationinternalversion.AuditregistrationClient - authentication *authenticationinternalversion.AuthenticationClient - authorization *authorizationinternalversion.AuthorizationClient - autoscaling *autoscalinginternalversion.AutoscalingClient - batch *batchinternalversion.BatchClient - certificates *certificatesinternalversion.CertificatesClient - coordination *coordinationinternalversion.CoordinationClient - events *eventsinternalversion.EventsClient - extensions *extensionsinternalversion.ExtensionsClient - networking *networkinginternalversion.NetworkingClient - node *nodeinternalversion.NodeClient - policy *policyinternalversion.PolicyClient - rbac *rbacinternalversion.RbacClient - scheduling *schedulinginternalversion.SchedulingClient - settings *settingsinternalversion.SettingsClient - storage *storageinternalversion.StorageClient -} - -// Admissionregistration retrieves the AdmissionregistrationClient -func (c *Clientset) Admissionregistration() admissionregistrationinternalversion.AdmissionregistrationInterface { - return c.admissionregistration -} - -// Core retrieves the CoreClient -func (c *Clientset) Core() coreinternalversion.CoreInterface { - return c.core -} - -// Apps retrieves the AppsClient -func (c *Clientset) Apps() appsinternalversion.AppsInterface { - return c.apps -} - -// Auditregistration retrieves the AuditregistrationClient -func (c *Clientset) Auditregistration() auditregistrationinternalversion.AuditregistrationInterface { - return c.auditregistration -} - -// Authentication retrieves the AuthenticationClient -func (c *Clientset) Authentication() authenticationinternalversion.AuthenticationInterface { - return c.authentication -} - -// Authorization retrieves the AuthorizationClient -func (c *Clientset) Authorization() authorizationinternalversion.AuthorizationInterface { - return c.authorization -} - -// Autoscaling retrieves the AutoscalingClient -func (c *Clientset) Autoscaling() autoscalinginternalversion.AutoscalingInterface { - return c.autoscaling -} - -// Batch retrieves the BatchClient -func (c *Clientset) Batch() batchinternalversion.BatchInterface { - return c.batch -} - -// Certificates retrieves the CertificatesClient -func (c *Clientset) Certificates() certificatesinternalversion.CertificatesInterface { - return c.certificates -} - -// Coordination retrieves the CoordinationClient -func (c *Clientset) Coordination() coordinationinternalversion.CoordinationInterface { - return c.coordination -} - -// Events retrieves the EventsClient -func (c *Clientset) Events() eventsinternalversion.EventsInterface { - return c.events -} - -// Extensions retrieves the ExtensionsClient -func (c *Clientset) Extensions() extensionsinternalversion.ExtensionsInterface { - return c.extensions -} - -// Networking retrieves the NetworkingClient -func (c *Clientset) Networking() networkinginternalversion.NetworkingInterface { - return c.networking -} - -// Node retrieves the NodeClient -func (c *Clientset) Node() nodeinternalversion.NodeInterface { - return c.node -} - -// Policy retrieves the PolicyClient -func (c *Clientset) Policy() policyinternalversion.PolicyInterface { - return c.policy -} - -// Rbac retrieves the RbacClient -func (c *Clientset) Rbac() rbacinternalversion.RbacInterface { - return c.rbac -} - -// Scheduling retrieves the SchedulingClient -func (c *Clientset) Scheduling() schedulinginternalversion.SchedulingInterface { - return c.scheduling -} - -// Settings retrieves the SettingsClient -func (c *Clientset) Settings() settingsinternalversion.SettingsInterface { - return c.settings -} - -// Storage retrieves the StorageClient -func (c *Clientset) Storage() storageinternalversion.StorageInterface { - return c.storage -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.admissionregistration, err = admissionregistrationinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.core, err = coreinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.apps, err = appsinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.auditregistration, err = auditregistrationinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authentication, err = authenticationinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.authorization, err = authorizationinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.autoscaling, err = autoscalinginternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.batch, err = batchinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.certificates, err = certificatesinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.coordination, err = coordinationinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.events, err = eventsinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.extensions, err = extensionsinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.networking, err = networkinginternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.node, err = nodeinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.policy, err = policyinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.rbac, err = rbacinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.scheduling, err = schedulinginternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.settings, err = settingsinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.storage, err = storageinternalversion.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.admissionregistration = admissionregistrationinternalversion.NewForConfigOrDie(c) - cs.core = coreinternalversion.NewForConfigOrDie(c) - cs.apps = appsinternalversion.NewForConfigOrDie(c) - cs.auditregistration = auditregistrationinternalversion.NewForConfigOrDie(c) - cs.authentication = authenticationinternalversion.NewForConfigOrDie(c) - cs.authorization = authorizationinternalversion.NewForConfigOrDie(c) - cs.autoscaling = autoscalinginternalversion.NewForConfigOrDie(c) - cs.batch = batchinternalversion.NewForConfigOrDie(c) - cs.certificates = certificatesinternalversion.NewForConfigOrDie(c) - cs.coordination = coordinationinternalversion.NewForConfigOrDie(c) - cs.events = eventsinternalversion.NewForConfigOrDie(c) - cs.extensions = extensionsinternalversion.NewForConfigOrDie(c) - cs.networking = networkinginternalversion.NewForConfigOrDie(c) - cs.node = nodeinternalversion.NewForConfigOrDie(c) - cs.policy = policyinternalversion.NewForConfigOrDie(c) - cs.rbac = rbacinternalversion.NewForConfigOrDie(c) - cs.scheduling = schedulinginternalversion.NewForConfigOrDie(c) - cs.settings = settingsinternalversion.NewForConfigOrDie(c) - cs.storage = storageinternalversion.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.admissionregistration = admissionregistrationinternalversion.New(c) - cs.core = coreinternalversion.New(c) - cs.apps = appsinternalversion.New(c) - cs.auditregistration = auditregistrationinternalversion.New(c) - cs.authentication = authenticationinternalversion.New(c) - cs.authorization = authorizationinternalversion.New(c) - cs.autoscaling = autoscalinginternalversion.New(c) - cs.batch = batchinternalversion.New(c) - cs.certificates = certificatesinternalversion.New(c) - cs.coordination = coordinationinternalversion.New(c) - cs.events = eventsinternalversion.New(c) - cs.extensions = extensionsinternalversion.New(c) - cs.networking = networkinginternalversion.New(c) - cs.node = nodeinternalversion.New(c) - cs.policy = policyinternalversion.New(c) - cs.rbac = rbacinternalversion.New(c) - cs.scheduling = schedulinginternalversion.New(c) - cs.settings = settingsinternalversion.New(c) - cs.storage = storageinternalversion.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/pkg/client/clientset_generated/internalclientset/doc.go b/pkg/client/clientset_generated/internalclientset/doc.go deleted file mode 100644 index 01b3d5e0f63c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package internalclientset diff --git a/pkg/client/clientset_generated/internalclientset/fake/BUILD b/pkg/client/clientset_generated/internalclientset/fake/BUILD deleted file mode 100644 index fd3bf6627816..000000000000 --- a/pkg/client/clientset_generated/internalclientset/fake/BUILD +++ /dev/null @@ -1,98 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake", - deps = [ - "//pkg/apis/admissionregistration:go_default_library", - "//pkg/apis/apps:go_default_library", - "//pkg/apis/auditregistration:go_default_library", - "//pkg/apis/authentication:go_default_library", - "//pkg/apis/authorization:go_default_library", - "//pkg/apis/autoscaling:go_default_library", - "//pkg/apis/batch:go_default_library", - "//pkg/apis/certificates:go_default_library", - "//pkg/apis/coordination:go_default_library", - "//pkg/apis/core:go_default_library", - "//pkg/apis/events:go_default_library", - "//pkg/apis/extensions:go_default_library", - "//pkg/apis/networking:go_default_library", - "//pkg/apis/node:go_default_library", - "//pkg/apis/policy:go_default_library", - "//pkg/apis/rbac:go_default_library", - "//pkg/apis/scheduling:go_default_library", - "//pkg/apis/settings:go_default_library", - "//pkg/apis/storage:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/events/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/node/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/discovery:go_default_library", - "//staging/src/k8s.io/client-go/discovery/fake:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go deleted file mode 100644 index 6ed44bed2d52..000000000000 --- a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - admissionregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion" - fakeadmissionregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake" - appsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" - fakeappsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake" - auditregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion" - fakeauditregistrationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake" - authenticationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" - fakeauthenticationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake" - authorizationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" - fakeauthorizationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake" - autoscalinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion" - fakeautoscalinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake" - batchinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion" - fakebatchinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake" - certificatesinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion" - fakecertificatesinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake" - coordinationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion" - fakecoordinationinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake" - coreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - fakecoreinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake" - eventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion" - fakeeventsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake" - extensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" - fakeextensionsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake" - networkinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion" - fakenetworkinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake" - nodeinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/node/internalversion" - fakenodeinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake" - policyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - fakepolicyinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake" - rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" - fakerbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake" - schedulinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion" - fakeschedulinginternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake" - settingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion" - fakesettingsinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake" - storageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" - fakestorageinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// Admissionregistration retrieves the AdmissionregistrationClient -func (c *Clientset) Admissionregistration() admissionregistrationinternalversion.AdmissionregistrationInterface { - return &fakeadmissionregistrationinternalversion.FakeAdmissionregistration{Fake: &c.Fake} -} - -// Core retrieves the CoreClient -func (c *Clientset) Core() coreinternalversion.CoreInterface { - return &fakecoreinternalversion.FakeCore{Fake: &c.Fake} -} - -// Apps retrieves the AppsClient -func (c *Clientset) Apps() appsinternalversion.AppsInterface { - return &fakeappsinternalversion.FakeApps{Fake: &c.Fake} -} - -// Auditregistration retrieves the AuditregistrationClient -func (c *Clientset) Auditregistration() auditregistrationinternalversion.AuditregistrationInterface { - return &fakeauditregistrationinternalversion.FakeAuditregistration{Fake: &c.Fake} -} - -// Authentication retrieves the AuthenticationClient -func (c *Clientset) Authentication() authenticationinternalversion.AuthenticationInterface { - return &fakeauthenticationinternalversion.FakeAuthentication{Fake: &c.Fake} -} - -// Authorization retrieves the AuthorizationClient -func (c *Clientset) Authorization() authorizationinternalversion.AuthorizationInterface { - return &fakeauthorizationinternalversion.FakeAuthorization{Fake: &c.Fake} -} - -// Autoscaling retrieves the AutoscalingClient -func (c *Clientset) Autoscaling() autoscalinginternalversion.AutoscalingInterface { - return &fakeautoscalinginternalversion.FakeAutoscaling{Fake: &c.Fake} -} - -// Batch retrieves the BatchClient -func (c *Clientset) Batch() batchinternalversion.BatchInterface { - return &fakebatchinternalversion.FakeBatch{Fake: &c.Fake} -} - -// Certificates retrieves the CertificatesClient -func (c *Clientset) Certificates() certificatesinternalversion.CertificatesInterface { - return &fakecertificatesinternalversion.FakeCertificates{Fake: &c.Fake} -} - -// Coordination retrieves the CoordinationClient -func (c *Clientset) Coordination() coordinationinternalversion.CoordinationInterface { - return &fakecoordinationinternalversion.FakeCoordination{Fake: &c.Fake} -} - -// Events retrieves the EventsClient -func (c *Clientset) Events() eventsinternalversion.EventsInterface { - return &fakeeventsinternalversion.FakeEvents{Fake: &c.Fake} -} - -// Extensions retrieves the ExtensionsClient -func (c *Clientset) Extensions() extensionsinternalversion.ExtensionsInterface { - return &fakeextensionsinternalversion.FakeExtensions{Fake: &c.Fake} -} - -// Networking retrieves the NetworkingClient -func (c *Clientset) Networking() networkinginternalversion.NetworkingInterface { - return &fakenetworkinginternalversion.FakeNetworking{Fake: &c.Fake} -} - -// Node retrieves the NodeClient -func (c *Clientset) Node() nodeinternalversion.NodeInterface { - return &fakenodeinternalversion.FakeNode{Fake: &c.Fake} -} - -// Policy retrieves the PolicyClient -func (c *Clientset) Policy() policyinternalversion.PolicyInterface { - return &fakepolicyinternalversion.FakePolicy{Fake: &c.Fake} -} - -// Rbac retrieves the RbacClient -func (c *Clientset) Rbac() rbacinternalversion.RbacInterface { - return &fakerbacinternalversion.FakeRbac{Fake: &c.Fake} -} - -// Scheduling retrieves the SchedulingClient -func (c *Clientset) Scheduling() schedulinginternalversion.SchedulingInterface { - return &fakeschedulinginternalversion.FakeScheduling{Fake: &c.Fake} -} - -// Settings retrieves the SettingsClient -func (c *Clientset) Settings() settingsinternalversion.SettingsInterface { - return &fakesettingsinternalversion.FakeSettings{Fake: &c.Fake} -} - -// Storage retrieves the StorageClient -func (c *Clientset) Storage() storageinternalversion.StorageInterface { - return &fakestorageinternalversion.FakeStorage{Fake: &c.Fake} -} diff --git a/pkg/client/clientset_generated/internalclientset/fake/doc.go b/pkg/client/clientset_generated/internalclientset/fake/doc.go deleted file mode 100644 index 9b99e7167091..000000000000 --- a/pkg/client/clientset_generated/internalclientset/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/fake/register.go b/pkg/client/clientset_generated/internalclientset/fake/register.go deleted file mode 100644 index 7ab10624bcf2..000000000000 --- a/pkg/client/clientset_generated/internalclientset/fake/register.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - admissionregistrationinternalversion "k8s.io/kubernetes/pkg/apis/admissionregistration" - appsinternalversion "k8s.io/kubernetes/pkg/apis/apps" - auditregistrationinternalversion "k8s.io/kubernetes/pkg/apis/auditregistration" - authenticationinternalversion "k8s.io/kubernetes/pkg/apis/authentication" - authorizationinternalversion "k8s.io/kubernetes/pkg/apis/authorization" - autoscalinginternalversion "k8s.io/kubernetes/pkg/apis/autoscaling" - batchinternalversion "k8s.io/kubernetes/pkg/apis/batch" - certificatesinternalversion "k8s.io/kubernetes/pkg/apis/certificates" - coordinationinternalversion "k8s.io/kubernetes/pkg/apis/coordination" - coreinternalversion "k8s.io/kubernetes/pkg/apis/core" - eventsinternalversion "k8s.io/kubernetes/pkg/apis/events" - extensionsinternalversion "k8s.io/kubernetes/pkg/apis/extensions" - networkinginternalversion "k8s.io/kubernetes/pkg/apis/networking" - nodeinternalversion "k8s.io/kubernetes/pkg/apis/node" - policyinternalversion "k8s.io/kubernetes/pkg/apis/policy" - rbacinternalversion "k8s.io/kubernetes/pkg/apis/rbac" - schedulinginternalversion "k8s.io/kubernetes/pkg/apis/scheduling" - settingsinternalversion "k8s.io/kubernetes/pkg/apis/settings" - storageinternalversion "k8s.io/kubernetes/pkg/apis/storage" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - admissionregistrationinternalversion.AddToScheme, - coreinternalversion.AddToScheme, - appsinternalversion.AddToScheme, - auditregistrationinternalversion.AddToScheme, - authenticationinternalversion.AddToScheme, - authorizationinternalversion.AddToScheme, - autoscalinginternalversion.AddToScheme, - batchinternalversion.AddToScheme, - certificatesinternalversion.AddToScheme, - coordinationinternalversion.AddToScheme, - eventsinternalversion.AddToScheme, - extensionsinternalversion.AddToScheme, - networkinginternalversion.AddToScheme, - nodeinternalversion.AddToScheme, - policyinternalversion.AddToScheme, - rbacinternalversion.AddToScheme, - schedulinginternalversion.AddToScheme, - settingsinternalversion.AddToScheme, - storageinternalversion.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/pkg/client/clientset_generated/internalclientset/scheme/BUILD b/pkg/client/clientset_generated/internalclientset/scheme/BUILD deleted file mode 100644 index f5075035ab1c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/scheme/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme", - deps = [ - "//pkg/apis/admissionregistration/install:go_default_library", - "//pkg/apis/apps/install:go_default_library", - "//pkg/apis/auditregistration/install:go_default_library", - "//pkg/apis/authentication/install:go_default_library", - "//pkg/apis/authorization/install:go_default_library", - "//pkg/apis/autoscaling/install:go_default_library", - "//pkg/apis/batch/install:go_default_library", - "//pkg/apis/certificates/install:go_default_library", - "//pkg/apis/coordination/install:go_default_library", - "//pkg/apis/core/install:go_default_library", - "//pkg/apis/events/install:go_default_library", - "//pkg/apis/extensions/install:go_default_library", - "//pkg/apis/networking/install:go_default_library", - "//pkg/apis/node/install:go_default_library", - "//pkg/apis/policy/install:go_default_library", - "//pkg/apis/rbac/install:go_default_library", - "//pkg/apis/scheduling/install:go_default_library", - "//pkg/apis/settings/install:go_default_library", - "//pkg/apis/storage/install:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/scheme/doc.go b/pkg/client/clientset_generated/internalclientset/scheme/doc.go deleted file mode 100644 index 7dc3756168fa..000000000000 --- a/pkg/client/clientset_generated/internalclientset/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/pkg/client/clientset_generated/internalclientset/scheme/register.go b/pkg/client/clientset_generated/internalclientset/scheme/register.go deleted file mode 100644 index 2be7cc3cc718..000000000000 --- a/pkg/client/clientset_generated/internalclientset/scheme/register.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration/install" - apps "k8s.io/kubernetes/pkg/apis/apps/install" - auditregistration "k8s.io/kubernetes/pkg/apis/auditregistration/install" - authentication "k8s.io/kubernetes/pkg/apis/authentication/install" - authorization "k8s.io/kubernetes/pkg/apis/authorization/install" - autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling/install" - batch "k8s.io/kubernetes/pkg/apis/batch/install" - certificates "k8s.io/kubernetes/pkg/apis/certificates/install" - coordination "k8s.io/kubernetes/pkg/apis/coordination/install" - core "k8s.io/kubernetes/pkg/apis/core/install" - events "k8s.io/kubernetes/pkg/apis/events/install" - extensions "k8s.io/kubernetes/pkg/apis/extensions/install" - networking "k8s.io/kubernetes/pkg/apis/networking/install" - node "k8s.io/kubernetes/pkg/apis/node/install" - policy "k8s.io/kubernetes/pkg/apis/policy/install" - rbac "k8s.io/kubernetes/pkg/apis/rbac/install" - scheduling "k8s.io/kubernetes/pkg/apis/scheduling/install" - settings "k8s.io/kubernetes/pkg/apis/settings/install" - storage "k8s.io/kubernetes/pkg/apis/storage/install" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - Install(Scheme) -} - -// Install registers the API group and adds types to a scheme -func Install(scheme *runtime.Scheme) { - admissionregistration.Install(scheme) - core.Install(scheme) - apps.Install(scheme) - auditregistration.Install(scheme) - authentication.Install(scheme) - authorization.Install(scheme) - autoscaling.Install(scheme) - batch.Install(scheme) - certificates.Install(scheme) - coordination.Install(scheme) - events.Install(scheme) - extensions.Install(scheme) - networking.Install(scheme) - node.Install(scheme) - policy.Install(scheme) - rbac.Install(scheme) - scheduling.Install(scheme) - settings.Install(scheme) - storage.Install(scheme) -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD deleted file mode 100644 index 3943a53c91ec..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "admissionregistration_client.go", - "doc.go", - "generated_expansion.go", - "mutatingwebhookconfiguration.go", - "validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion", - deps = [ - "//pkg/apis/admissionregistration:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go deleted file mode 100644 index db4bc4f46c4a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/admissionregistration_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AdmissionregistrationInterface interface { - RESTClient() rest.Interface - MutatingWebhookConfigurationsGetter - ValidatingWebhookConfigurationsGetter -} - -// AdmissionregistrationClient is used to interact with features provided by the admissionregistration.k8s.io group. -type AdmissionregistrationClient struct { - restClient rest.Interface -} - -func (c *AdmissionregistrationClient) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface { - return newMutatingWebhookConfigurations(c) -} - -func (c *AdmissionregistrationClient) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface { - return newValidatingWebhookConfigurations(c) -} - -// NewForConfig creates a new AdmissionregistrationClient for the given config. -func NewForConfig(c *rest.Config) (*AdmissionregistrationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AdmissionregistrationClient{client}, nil -} - -// NewForConfigOrDie creates a new AdmissionregistrationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AdmissionregistrationClient for the given RESTClient. -func New(c rest.Interface) *AdmissionregistrationClient { - return &AdmissionregistrationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("admissionregistration.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("admissionregistration.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AdmissionregistrationClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD deleted file mode 100644 index 398ae535df6a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_admissionregistration_client.go", - "fake_mutatingwebhookconfiguration.go", - "fake_validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake", - deps = [ - "//pkg/apis/admissionregistration:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go deleted file mode 100644 index 620e25d932b9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_admissionregistration_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion" -) - -type FakeAdmissionregistration struct { - *testing.Fake -} - -func (c *FakeAdmissionregistration) MutatingWebhookConfigurations() internalversion.MutatingWebhookConfigurationInterface { - return &FakeMutatingWebhookConfigurations{c} -} - -func (c *FakeAdmissionregistration) ValidatingWebhookConfigurations() internalversion.ValidatingWebhookConfigurationInterface { - return &FakeValidatingWebhookConfigurations{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAdmissionregistration) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_mutatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_mutatingwebhookconfiguration.go deleted file mode 100644 index b25de22e7135..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_mutatingwebhookconfiguration.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface -type FakeMutatingWebhookConfigurations struct { - Fake *FakeAdmissionregistration -} - -var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "", Resource: "mutatingwebhookconfigurations"} - -var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "", Kind: "MutatingWebhookConfiguration"} - -// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &admissionregistration.MutatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.MutatingWebhookConfiguration), err -} - -// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.MutatingWebhookConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &admissionregistration.MutatingWebhookConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &admissionregistration.MutatingWebhookConfigurationList{ListMeta: obj.(*admissionregistration.MutatingWebhookConfigurationList).ListMeta} - for _, item := range obj.(*admissionregistration.MutatingWebhookConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts)) -} - -// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *admissionregistration.MutatingWebhookConfiguration) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistration.MutatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.MutatingWebhookConfiguration), err -} - -// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *admissionregistration.MutatingWebhookConfiguration) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistration.MutatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.MutatingWebhookConfiguration), err -} - -// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistration.MutatingWebhookConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &admissionregistration.MutatingWebhookConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistration.MutatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.MutatingWebhookConfiguration), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go deleted file mode 100644 index 727ce2bbf0d5..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/fake/fake_validatingwebhookconfiguration.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" -) - -// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface -type FakeValidatingWebhookConfigurations struct { - Fake *FakeAdmissionregistration -} - -var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "", Resource: "validatingwebhookconfigurations"} - -var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "", Kind: "ValidatingWebhookConfiguration"} - -// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &admissionregistration.ValidatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ValidatingWebhookConfiguration), err -} - -// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ValidatingWebhookConfigurationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &admissionregistration.ValidatingWebhookConfigurationList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &admissionregistration.ValidatingWebhookConfigurationList{ListMeta: obj.(*admissionregistration.ValidatingWebhookConfigurationList).ListMeta} - for _, item := range obj.(*admissionregistration.ValidatingWebhookConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts)) -} - -// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistration.ValidatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ValidatingWebhookConfiguration), err -} - -// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistration.ValidatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ValidatingWebhookConfiguration), err -} - -// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistration.ValidatingWebhookConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions) - - _, err := c.Fake.Invokes(action, &admissionregistration.ValidatingWebhookConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistration.ValidatingWebhookConfiguration{}) - if obj == nil { - return nil, err - } - return obj.(*admissionregistration.ValidatingWebhookConfiguration), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go deleted file mode 100644 index f27ec5c64ce2..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type MutatingWebhookConfigurationExpansion interface{} - -type ValidatingWebhookConfigurationExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/mutatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/mutatingwebhookconfiguration.go deleted file mode 100644 index 6f3c0d1aa133..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/mutatingwebhookconfiguration.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface. -// A group's client should implement this interface. -type MutatingWebhookConfigurationsGetter interface { - MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface -} - -// MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources. -type MutatingWebhookConfigurationInterface interface { - Create(*admissionregistration.MutatingWebhookConfiguration) (*admissionregistration.MutatingWebhookConfiguration, error) - Update(*admissionregistration.MutatingWebhookConfiguration) (*admissionregistration.MutatingWebhookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*admissionregistration.MutatingWebhookConfiguration, error) - List(opts v1.ListOptions) (*admissionregistration.MutatingWebhookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.MutatingWebhookConfiguration, err error) - MutatingWebhookConfigurationExpansion -} - -// mutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface -type mutatingWebhookConfigurations struct { - client rest.Interface -} - -// newMutatingWebhookConfigurations returns a MutatingWebhookConfigurations -func newMutatingWebhookConfigurations(c *AdmissionregistrationClient) *mutatingWebhookConfigurations { - return &mutatingWebhookConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any. -func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - result = &admissionregistration.MutatingWebhookConfiguration{} - err = c.client.Get(). - Resource("mutatingwebhookconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. -func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.MutatingWebhookConfigurationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &admissionregistration.MutatingWebhookConfigurationList{} - err = c.client.Get(). - Resource("mutatingwebhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations. -func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("mutatingwebhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *admissionregistration.MutatingWebhookConfiguration) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - result = &admissionregistration.MutatingWebhookConfiguration{} - err = c.client.Post(). - Resource("mutatingwebhookconfigurations"). - Body(mutatingWebhookConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *admissionregistration.MutatingWebhookConfiguration) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - result = &admissionregistration.MutatingWebhookConfiguration{} - err = c.client.Put(). - Resource("mutatingwebhookconfigurations"). - Name(mutatingWebhookConfiguration.Name). - Body(mutatingWebhookConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("mutatingwebhookconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("mutatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.MutatingWebhookConfiguration, err error) { - result = &admissionregistration.MutatingWebhookConfiguration{} - err = c.client.Patch(pt). - Resource("mutatingwebhookconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go b/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go deleted file mode 100644 index 183b85bdb773..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion/validatingwebhookconfiguration.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface. -// A group's client should implement this interface. -type ValidatingWebhookConfigurationsGetter interface { - ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface -} - -// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. -type ValidatingWebhookConfigurationInterface interface { - Create(*admissionregistration.ValidatingWebhookConfiguration) (*admissionregistration.ValidatingWebhookConfiguration, error) - Update(*admissionregistration.ValidatingWebhookConfiguration) (*admissionregistration.ValidatingWebhookConfiguration, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*admissionregistration.ValidatingWebhookConfiguration, error) - List(opts v1.ListOptions) (*admissionregistration.ValidatingWebhookConfigurationList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) - ValidatingWebhookConfigurationExpansion -} - -// validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface -type validatingWebhookConfigurations struct { - client rest.Interface -} - -// newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations -func newValidatingWebhookConfigurations(c *AdmissionregistrationClient) *validatingWebhookConfigurations { - return &validatingWebhookConfigurations{ - client: c.RESTClient(), - } -} - -// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any. -func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - result = &admissionregistration.ValidatingWebhookConfiguration{} - err = c.client.Get(). - Resource("validatingwebhookconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. -func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistration.ValidatingWebhookConfigurationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &admissionregistration.ValidatingWebhookConfigurationList{} - err = c.client.Get(). - Resource("validatingwebhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations. -func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("validatingwebhookconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - result = &admissionregistration.ValidatingWebhookConfiguration{} - err = c.client.Post(). - Resource("validatingwebhookconfigurations"). - Body(validatingWebhookConfiguration). - Do(). - Into(result) - return -} - -// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistration.ValidatingWebhookConfiguration) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - result = &admissionregistration.ValidatingWebhookConfiguration{} - err = c.client.Put(). - Resource("validatingwebhookconfigurations"). - Name(validatingWebhookConfiguration.Name). - Body(validatingWebhookConfiguration). - Do(). - Into(result) - return -} - -// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs. -func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("validatingwebhookconfigurations"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("validatingwebhookconfigurations"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistration.ValidatingWebhookConfiguration, err error) { - result = &admissionregistration.ValidatingWebhookConfiguration{} - err = c.client.Patch(pt). - Resource("validatingwebhookconfigurations"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD deleted file mode 100644 index 2f786404bccd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "apps_client.go", - "controllerrevision.go", - "daemonset.go", - "deployment.go", - "doc.go", - "generated_expansion.go", - "replicaset.go", - "statefulset.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion", - deps = [ - "//pkg/apis/apps:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go deleted file mode 100644 index e72ae6bb1cba..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AppsInterface interface { - RESTClient() rest.Interface - ControllerRevisionsGetter - DaemonSetsGetter - DeploymentsGetter - ReplicaSetsGetter - StatefulSetsGetter -} - -// AppsClient is used to interact with features provided by the apps group. -type AppsClient struct { - restClient rest.Interface -} - -func (c *AppsClient) ControllerRevisions(namespace string) ControllerRevisionInterface { - return newControllerRevisions(c, namespace) -} - -func (c *AppsClient) DaemonSets(namespace string) DaemonSetInterface { - return newDaemonSets(c, namespace) -} - -func (c *AppsClient) Deployments(namespace string) DeploymentInterface { - return newDeployments(c, namespace) -} - -func (c *AppsClient) ReplicaSets(namespace string) ReplicaSetInterface { - return newReplicaSets(c, namespace) -} - -func (c *AppsClient) StatefulSets(namespace string) StatefulSetInterface { - return newStatefulSets(c, namespace) -} - -// NewForConfig creates a new AppsClient for the given config. -func NewForConfig(c *rest.Config) (*AppsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AppsClient{client}, nil -} - -// NewForConfigOrDie creates a new AppsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AppsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AppsClient for the given RESTClient. -func New(c rest.Interface) *AppsClient { - return &AppsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("apps")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("apps")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AppsClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/controllerrevision.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/controllerrevision.go deleted file mode 100644 index bd3b933bb194..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/controllerrevision.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - apps "k8s.io/kubernetes/pkg/apis/apps" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface. -// A group's client should implement this interface. -type ControllerRevisionsGetter interface { - ControllerRevisions(namespace string) ControllerRevisionInterface -} - -// ControllerRevisionInterface has methods to work with ControllerRevision resources. -type ControllerRevisionInterface interface { - Create(*apps.ControllerRevision) (*apps.ControllerRevision, error) - Update(*apps.ControllerRevision) (*apps.ControllerRevision, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*apps.ControllerRevision, error) - List(opts v1.ListOptions) (*apps.ControllerRevisionList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ControllerRevision, err error) - ControllerRevisionExpansion -} - -// controllerRevisions implements ControllerRevisionInterface -type controllerRevisions struct { - client rest.Interface - ns string -} - -// newControllerRevisions returns a ControllerRevisions -func newControllerRevisions(c *AppsClient, namespace string) *controllerRevisions { - return &controllerRevisions{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *apps.ControllerRevision, err error) { - result = &apps.ControllerRevision{} - err = c.client.Get(). - Namespace(c.ns). - Resource("controllerrevisions"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *controllerRevisions) List(opts v1.ListOptions) (result *apps.ControllerRevisionList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &apps.ControllerRevisionList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("controllerrevisions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("controllerrevisions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(controllerRevision *apps.ControllerRevision) (result *apps.ControllerRevision, err error) { - result = &apps.ControllerRevision{} - err = c.client.Post(). - Namespace(c.ns). - Resource("controllerrevisions"). - Body(controllerRevision). - Do(). - Into(result) - return -} - -// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(controllerRevision *apps.ControllerRevision) (result *apps.ControllerRevision, err error) { - result = &apps.ControllerRevision{} - err = c.client.Put(). - Namespace(c.ns). - Resource("controllerrevisions"). - Name(controllerRevision.Name). - Body(controllerRevision). - Do(). - Into(result) - return -} - -// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("controllerrevisions"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("controllerrevisions"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ControllerRevision, err error) { - result = &apps.ControllerRevision{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("controllerrevisions"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/daemonset.go deleted file mode 100644 index f4b2c3ed31dd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/daemonset.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - apps "k8s.io/kubernetes/pkg/apis/apps" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// DaemonSetsGetter has a method to return a DaemonSetInterface. -// A group's client should implement this interface. -type DaemonSetsGetter interface { - DaemonSets(namespace string) DaemonSetInterface -} - -// DaemonSetInterface has methods to work with DaemonSet resources. -type DaemonSetInterface interface { - Create(*apps.DaemonSet) (*apps.DaemonSet, error) - Update(*apps.DaemonSet) (*apps.DaemonSet, error) - UpdateStatus(*apps.DaemonSet) (*apps.DaemonSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*apps.DaemonSet, error) - List(opts v1.ListOptions) (*apps.DaemonSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.DaemonSet, err error) - DaemonSetExpansion -} - -// daemonSets implements DaemonSetInterface -type daemonSets struct { - client rest.Interface - ns string -} - -// newDaemonSets returns a DaemonSets -func newDaemonSets(c *AppsClient, namespace string) *daemonSets { - return &daemonSets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options v1.GetOptions) (result *apps.DaemonSet, err error) { - result = &apps.DaemonSet{} - err = c.client.Get(). - Namespace(c.ns). - Resource("daemonsets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts v1.ListOptions) (result *apps.DaemonSetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &apps.DaemonSetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("daemonsets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("daemonsets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(daemonSet *apps.DaemonSet) (result *apps.DaemonSet, err error) { - result = &apps.DaemonSet{} - err = c.client.Post(). - Namespace(c.ns). - Resource("daemonsets"). - Body(daemonSet). - Do(). - Into(result) - return -} - -// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(daemonSet *apps.DaemonSet) (result *apps.DaemonSet, err error) { - result = &apps.DaemonSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("daemonsets"). - Name(daemonSet.Name). - Body(daemonSet). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(daemonSet *apps.DaemonSet) (result *apps.DaemonSet, err error) { - result = &apps.DaemonSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("daemonsets"). - Name(daemonSet.Name). - SubResource("status"). - Body(daemonSet). - Do(). - Into(result) - return -} - -// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("daemonsets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("daemonsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.DaemonSet, err error) { - result = &apps.DaemonSet{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("daemonsets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/deployment.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/deployment.go deleted file mode 100644 index 1bf0bf03bc27..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/deployment.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - apps "k8s.io/kubernetes/pkg/apis/apps" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// DeploymentsGetter has a method to return a DeploymentInterface. -// A group's client should implement this interface. -type DeploymentsGetter interface { - Deployments(namespace string) DeploymentInterface -} - -// DeploymentInterface has methods to work with Deployment resources. -type DeploymentInterface interface { - Create(*apps.Deployment) (*apps.Deployment, error) - Update(*apps.Deployment) (*apps.Deployment, error) - UpdateStatus(*apps.Deployment) (*apps.Deployment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*apps.Deployment, error) - List(opts v1.ListOptions) (*apps.DeploymentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.Deployment, err error) - DeploymentExpansion -} - -// deployments implements DeploymentInterface -type deployments struct { - client rest.Interface - ns string -} - -// newDeployments returns a Deployments -func newDeployments(c *AppsClient, namespace string) *deployments { - return &deployments{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options v1.GetOptions) (result *apps.Deployment, err error) { - result = &apps.Deployment{} - err = c.client.Get(). - Namespace(c.ns). - Resource("deployments"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts v1.ListOptions) (result *apps.DeploymentList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &apps.DeploymentList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("deployments"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("deployments"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(deployment *apps.Deployment) (result *apps.Deployment, err error) { - result = &apps.Deployment{} - err = c.client.Post(). - Namespace(c.ns). - Resource("deployments"). - Body(deployment). - Do(). - Into(result) - return -} - -// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(deployment *apps.Deployment) (result *apps.Deployment, err error) { - result = &apps.Deployment{} - err = c.client.Put(). - Namespace(c.ns). - Resource("deployments"). - Name(deployment.Name). - Body(deployment). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(deployment *apps.Deployment) (result *apps.Deployment, err error) { - result = &apps.Deployment{} - err = c.client.Put(). - Namespace(c.ns). - Resource("deployments"). - Name(deployment.Name). - SubResource("status"). - Body(deployment). - Do(). - Into(result) - return -} - -// Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("deployments"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("deployments"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.Deployment, err error) { - result = &apps.Deployment{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("deployments"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD deleted file mode 100644 index 5623ca155078..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apps_client.go", - "fake_controllerrevision.go", - "fake_daemonset.go", - "fake_deployment.go", - "fake_replicaset.go", - "fake_statefulset.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake", - deps = [ - "//pkg/apis/apps:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go deleted file mode 100644 index a964464e92af..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" -) - -type FakeApps struct { - *testing.Fake -} - -func (c *FakeApps) ControllerRevisions(namespace string) internalversion.ControllerRevisionInterface { - return &FakeControllerRevisions{c, namespace} -} - -func (c *FakeApps) DaemonSets(namespace string) internalversion.DaemonSetInterface { - return &FakeDaemonSets{c, namespace} -} - -func (c *FakeApps) Deployments(namespace string) internalversion.DeploymentInterface { - return &FakeDeployments{c, namespace} -} - -func (c *FakeApps) ReplicaSets(namespace string) internalversion.ReplicaSetInterface { - return &FakeReplicaSets{c, namespace} -} - -func (c *FakeApps) StatefulSets(namespace string) internalversion.StatefulSetInterface { - return &FakeStatefulSets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApps) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_controllerrevision.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_controllerrevision.go deleted file mode 100644 index 1f3ea4fee855..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_controllerrevision.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apps "k8s.io/kubernetes/pkg/apis/apps" -) - -// FakeControllerRevisions implements ControllerRevisionInterface -type FakeControllerRevisions struct { - Fake *FakeApps - ns string -} - -var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Version: "", Resource: "controllerrevisions"} - -var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "", Kind: "ControllerRevision"} - -// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *apps.ControllerRevision, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &apps.ControllerRevision{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ControllerRevision), err -} - -// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *apps.ControllerRevisionList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &apps.ControllerRevisionList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apps.ControllerRevisionList{ListMeta: obj.(*apps.ControllerRevisionList).ListMeta} - for _, item := range obj.(*apps.ControllerRevisionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts)) - -} - -// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(controllerRevision *apps.ControllerRevision) (result *apps.ControllerRevision, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps.ControllerRevision{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ControllerRevision), err -} - -// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(controllerRevision *apps.ControllerRevision) (result *apps.ControllerRevision, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps.ControllerRevision{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ControllerRevision), err -} - -// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &apps.ControllerRevision{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &apps.ControllerRevisionList{}) - return err -} - -// Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ControllerRevision, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &apps.ControllerRevision{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ControllerRevision), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_daemonset.go deleted file mode 100644 index 8f786caf365a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_daemonset.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apps "k8s.io/kubernetes/pkg/apis/apps" -) - -// FakeDaemonSets implements DaemonSetInterface -type FakeDaemonSets struct { - Fake *FakeApps - ns string -} - -var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "", Resource: "daemonsets"} - -var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "", Kind: "DaemonSet"} - -// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *apps.DaemonSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &apps.DaemonSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.DaemonSet), err -} - -// List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps.DaemonSetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &apps.DaemonSetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apps.DaemonSetList{ListMeta: obj.(*apps.DaemonSetList).ListMeta} - for _, item := range obj.(*apps.DaemonSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) - -} - -// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(daemonSet *apps.DaemonSet) (result *apps.DaemonSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &apps.DaemonSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.DaemonSet), err -} - -// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(daemonSet *apps.DaemonSet) (result *apps.DaemonSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &apps.DaemonSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.DaemonSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(daemonSet *apps.DaemonSet) (*apps.DaemonSet, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &apps.DaemonSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.DaemonSet), err -} - -// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &apps.DaemonSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &apps.DaemonSetList{}) - return err -} - -// Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.DaemonSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &apps.DaemonSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.DaemonSet), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_deployment.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_deployment.go deleted file mode 100644 index f1623d308aba..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_deployment.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apps "k8s.io/kubernetes/pkg/apis/apps" -) - -// FakeDeployments implements DeploymentInterface -type FakeDeployments struct { - Fake *FakeApps - ns string -} - -var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "", Resource: "deployments"} - -var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "", Kind: "Deployment"} - -// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *apps.Deployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &apps.Deployment{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.Deployment), err -} - -// List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *apps.DeploymentList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &apps.DeploymentList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apps.DeploymentList{ListMeta: obj.(*apps.DeploymentList).ListMeta} - for _, item := range obj.(*apps.DeploymentList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) - -} - -// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *apps.Deployment) (result *apps.Deployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &apps.Deployment{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.Deployment), err -} - -// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *apps.Deployment) (result *apps.Deployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &apps.Deployment{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.Deployment), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *apps.Deployment) (*apps.Deployment, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &apps.Deployment{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.Deployment), err -} - -// Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &apps.Deployment{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &apps.DeploymentList{}) - return err -} - -// Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.Deployment, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &apps.Deployment{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.Deployment), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_replicaset.go deleted file mode 100644 index 88c28d42eb3a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_replicaset.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apps "k8s.io/kubernetes/pkg/apis/apps" -) - -// FakeReplicaSets implements ReplicaSetInterface -type FakeReplicaSets struct { - Fake *FakeApps - ns string -} - -var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "", Resource: "replicasets"} - -var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "", Kind: "ReplicaSet"} - -// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *apps.ReplicaSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &apps.ReplicaSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ReplicaSet), err -} - -// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *apps.ReplicaSetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &apps.ReplicaSetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apps.ReplicaSetList{ListMeta: obj.(*apps.ReplicaSetList).ListMeta} - for _, item := range obj.(*apps.ReplicaSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) - -} - -// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(replicaSet *apps.ReplicaSet) (result *apps.ReplicaSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &apps.ReplicaSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ReplicaSet), err -} - -// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(replicaSet *apps.ReplicaSet) (result *apps.ReplicaSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &apps.ReplicaSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ReplicaSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(replicaSet *apps.ReplicaSet) (*apps.ReplicaSet, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &apps.ReplicaSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ReplicaSet), err -} - -// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &apps.ReplicaSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &apps.ReplicaSetList{}) - return err -} - -// Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ReplicaSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &apps.ReplicaSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.ReplicaSet), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go deleted file mode 100644 index 6a875708a25c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - apps "k8s.io/kubernetes/pkg/apis/apps" -) - -// FakeStatefulSets implements StatefulSetInterface -type FakeStatefulSets struct { - Fake *FakeApps - ns string -} - -var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "", Resource: "statefulsets"} - -var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "", Kind: "StatefulSet"} - -// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps.StatefulSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &apps.StatefulSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.StatefulSet), err -} - -// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &apps.StatefulSetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &apps.StatefulSetList{ListMeta: obj.(*apps.StatefulSetList).ListMeta} - for _, item := range obj.(*apps.StatefulSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) - -} - -// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &apps.StatefulSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.StatefulSet), err -} - -// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &apps.StatefulSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.StatefulSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (*apps.StatefulSet, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &apps.StatefulSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.StatefulSet), err -} - -// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &apps.StatefulSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &apps.StatefulSetList{}) - return err -} - -// Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &apps.StatefulSet{}) - - if obj == nil { - return nil, err - } - return obj.(*apps.StatefulSet), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/generated_expansion.go deleted file mode 100644 index 7987f18b259c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/generated_expansion.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type ControllerRevisionExpansion interface{} - -type DaemonSetExpansion interface{} - -type DeploymentExpansion interface{} - -type ReplicaSetExpansion interface{} - -type StatefulSetExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/replicaset.go deleted file mode 100644 index ea7527f2b19b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/replicaset.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - apps "k8s.io/kubernetes/pkg/apis/apps" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ReplicaSetsGetter has a method to return a ReplicaSetInterface. -// A group's client should implement this interface. -type ReplicaSetsGetter interface { - ReplicaSets(namespace string) ReplicaSetInterface -} - -// ReplicaSetInterface has methods to work with ReplicaSet resources. -type ReplicaSetInterface interface { - Create(*apps.ReplicaSet) (*apps.ReplicaSet, error) - Update(*apps.ReplicaSet) (*apps.ReplicaSet, error) - UpdateStatus(*apps.ReplicaSet) (*apps.ReplicaSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*apps.ReplicaSet, error) - List(opts v1.ListOptions) (*apps.ReplicaSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ReplicaSet, err error) - ReplicaSetExpansion -} - -// replicaSets implements ReplicaSetInterface -type replicaSets struct { - client rest.Interface - ns string -} - -// newReplicaSets returns a ReplicaSets -func newReplicaSets(c *AppsClient, namespace string) *replicaSets { - return &replicaSets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options v1.GetOptions) (result *apps.ReplicaSet, err error) { - result = &apps.ReplicaSet{} - err = c.client.Get(). - Namespace(c.ns). - Resource("replicasets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts v1.ListOptions) (result *apps.ReplicaSetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &apps.ReplicaSetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("replicasets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("replicasets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(replicaSet *apps.ReplicaSet) (result *apps.ReplicaSet, err error) { - result = &apps.ReplicaSet{} - err = c.client.Post(). - Namespace(c.ns). - Resource("replicasets"). - Body(replicaSet). - Do(). - Into(result) - return -} - -// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(replicaSet *apps.ReplicaSet) (result *apps.ReplicaSet, err error) { - result = &apps.ReplicaSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("replicasets"). - Name(replicaSet.Name). - Body(replicaSet). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(replicaSet *apps.ReplicaSet) (result *apps.ReplicaSet, err error) { - result = &apps.ReplicaSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("replicasets"). - Name(replicaSet.Name). - SubResource("status"). - Body(replicaSet). - Do(). - Into(result) - return -} - -// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("replicasets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("replicasets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.ReplicaSet, err error) { - result = &apps.ReplicaSet{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("replicasets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go deleted file mode 100644 index d1a72132927f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - apps "k8s.io/kubernetes/pkg/apis/apps" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// StatefulSetsGetter has a method to return a StatefulSetInterface. -// A group's client should implement this interface. -type StatefulSetsGetter interface { - StatefulSets(namespace string) StatefulSetInterface -} - -// StatefulSetInterface has methods to work with StatefulSet resources. -type StatefulSetInterface interface { - Create(*apps.StatefulSet) (*apps.StatefulSet, error) - Update(*apps.StatefulSet) (*apps.StatefulSet, error) - UpdateStatus(*apps.StatefulSet) (*apps.StatefulSet, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*apps.StatefulSet, error) - List(opts v1.ListOptions) (*apps.StatefulSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) - StatefulSetExpansion -} - -// statefulSets implements StatefulSetInterface -type statefulSets struct { - client rest.Interface - ns string -} - -// newStatefulSets returns a StatefulSets -func newStatefulSets(c *AppsClient, namespace string) *statefulSets { - return &statefulSets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options v1.GetOptions) (result *apps.StatefulSet, err error) { - result = &apps.StatefulSet{} - err = c.client.Get(). - Namespace(c.ns). - Resource("statefulsets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &apps.StatefulSetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("statefulsets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("statefulsets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { - result = &apps.StatefulSet{} - err = c.client.Post(). - Namespace(c.ns). - Resource("statefulsets"). - Body(statefulSet). - Do(). - Into(result) - return -} - -// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { - result = &apps.StatefulSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("statefulsets"). - Name(statefulSet.Name). - Body(statefulSet). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (result *apps.StatefulSet, err error) { - result = &apps.StatefulSet{} - err = c.client.Put(). - Namespace(c.ns). - Resource("statefulsets"). - Name(statefulSet.Name). - SubResource("status"). - Body(statefulSet). - Do(). - Into(result) - return -} - -// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("statefulsets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("statefulsets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { - result = &apps.StatefulSet{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("statefulsets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/BUILD deleted file mode 100644 index 3d1e522b858a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "auditregistration_client.go", - "auditsink.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/auditregistration:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditregistration_client.go deleted file mode 100644 index 07bedcbf5f32..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditregistration_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AuditregistrationInterface interface { - RESTClient() rest.Interface - AuditSinksGetter -} - -// AuditregistrationClient is used to interact with features provided by the auditregistration.k8s.io group. -type AuditregistrationClient struct { - restClient rest.Interface -} - -func (c *AuditregistrationClient) AuditSinks() AuditSinkInterface { - return newAuditSinks(c) -} - -// NewForConfig creates a new AuditregistrationClient for the given config. -func NewForConfig(c *rest.Config) (*AuditregistrationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AuditregistrationClient{client}, nil -} - -// NewForConfigOrDie creates a new AuditregistrationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuditregistrationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AuditregistrationClient for the given RESTClient. -func New(c rest.Interface) *AuditregistrationClient { - return &AuditregistrationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("auditregistration.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("auditregistration.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AuditregistrationClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditsink.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditsink.go deleted file mode 100644 index 8bbb0375af29..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/auditsink.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - auditregistration "k8s.io/kubernetes/pkg/apis/auditregistration" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// AuditSinksGetter has a method to return a AuditSinkInterface. -// A group's client should implement this interface. -type AuditSinksGetter interface { - AuditSinks() AuditSinkInterface -} - -// AuditSinkInterface has methods to work with AuditSink resources. -type AuditSinkInterface interface { - Create(*auditregistration.AuditSink) (*auditregistration.AuditSink, error) - Update(*auditregistration.AuditSink) (*auditregistration.AuditSink, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*auditregistration.AuditSink, error) - List(opts v1.ListOptions) (*auditregistration.AuditSinkList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *auditregistration.AuditSink, err error) - AuditSinkExpansion -} - -// auditSinks implements AuditSinkInterface -type auditSinks struct { - client rest.Interface -} - -// newAuditSinks returns a AuditSinks -func newAuditSinks(c *AuditregistrationClient) *auditSinks { - return &auditSinks{ - client: c.RESTClient(), - } -} - -// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *auditSinks) Get(name string, options v1.GetOptions) (result *auditregistration.AuditSink, err error) { - result = &auditregistration.AuditSink{} - err = c.client.Get(). - Resource("auditsinks"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *auditSinks) List(opts v1.ListOptions) (result *auditregistration.AuditSinkList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &auditregistration.AuditSinkList{} - err = c.client.Get(). - Resource("auditsinks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested auditSinks. -func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("auditsinks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Create(auditSink *auditregistration.AuditSink) (result *auditregistration.AuditSink, err error) { - result = &auditregistration.AuditSink{} - err = c.client.Post(). - Resource("auditsinks"). - Body(auditSink). - Do(). - Into(result) - return -} - -// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Update(auditSink *auditregistration.AuditSink) (result *auditregistration.AuditSink, err error) { - result = &auditregistration.AuditSink{} - err = c.client.Put(). - Resource("auditsinks"). - Name(auditSink.Name). - Body(auditSink). - Do(). - Into(result) - return -} - -// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *auditSinks) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("auditsinks"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *auditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("auditsinks"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched auditSink. -func (c *auditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *auditregistration.AuditSink, err error) { - result = &auditregistration.AuditSink{} - err = c.client.Patch(pt). - Resource("auditsinks"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/BUILD deleted file mode 100644 index 9a65f4ba86ce..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_auditregistration_client.go", - "fake_auditsink.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/auditregistration:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditregistration_client.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditregistration_client.go deleted file mode 100644 index 9cb2f1f3f4ed..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditregistration_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion" -) - -type FakeAuditregistration struct { - *testing.Fake -} - -func (c *FakeAuditregistration) AuditSinks() internalversion.AuditSinkInterface { - return &FakeAuditSinks{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAuditregistration) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditsink.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditsink.go deleted file mode 100644 index eac7d725ae83..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/fake/fake_auditsink.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - auditregistration "k8s.io/kubernetes/pkg/apis/auditregistration" -) - -// FakeAuditSinks implements AuditSinkInterface -type FakeAuditSinks struct { - Fake *FakeAuditregistration -} - -var auditsinksResource = schema.GroupVersionResource{Group: "auditregistration.k8s.io", Version: "", Resource: "auditsinks"} - -var auditsinksKind = schema.GroupVersionKind{Group: "auditregistration.k8s.io", Version: "", Kind: "AuditSink"} - -// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *FakeAuditSinks) Get(name string, options v1.GetOptions) (result *auditregistration.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(auditsinksResource, name), &auditregistration.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*auditregistration.AuditSink), err -} - -// List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *FakeAuditSinks) List(opts v1.ListOptions) (result *auditregistration.AuditSinkList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(auditsinksResource, auditsinksKind, opts), &auditregistration.AuditSinkList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &auditregistration.AuditSinkList{ListMeta: obj.(*auditregistration.AuditSinkList).ListMeta} - for _, item := range obj.(*auditregistration.AuditSinkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested auditSinks. -func (c *FakeAuditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(auditsinksResource, opts)) -} - -// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Create(auditSink *auditregistration.AuditSink) (result *auditregistration.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &auditregistration.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*auditregistration.AuditSink), err -} - -// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Update(auditSink *auditregistration.AuditSink) (result *auditregistration.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &auditregistration.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*auditregistration.AuditSink), err -} - -// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *FakeAuditSinks) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &auditregistration.AuditSink{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAuditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOptions) - - _, err := c.Fake.Invokes(action, &auditregistration.AuditSinkList{}) - return err -} - -// Patch applies the patch and returns the patched auditSink. -func (c *FakeAuditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *auditregistration.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &auditregistration.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*auditregistration.AuditSink), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/generated_expansion.go deleted file mode 100644 index 4d3547b8d251..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/auditregistration/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type AuditSinkExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD deleted file mode 100644 index 76541435608e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authentication_client.go", - "doc.go", - "generated_expansion.go", - "tokenreview.go", - "tokenreview_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion", - deps = [ - "//pkg/apis/authentication:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go deleted file mode 100644 index 086b38b4624a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AuthenticationInterface interface { - RESTClient() rest.Interface - TokenReviewsGetter -} - -// AuthenticationClient is used to interact with features provided by the authentication.k8s.io group. -type AuthenticationClient struct { - restClient rest.Interface -} - -func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { - return newTokenReviews(c) -} - -// NewForConfig creates a new AuthenticationClient for the given config. -func NewForConfig(c *rest.Config) (*AuthenticationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AuthenticationClient{client}, nil -} - -// NewForConfigOrDie creates a new AuthenticationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuthenticationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AuthenticationClient for the given RESTClient. -func New(c rest.Interface) *AuthenticationClient { - return &AuthenticationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("authentication.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("authentication.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AuthenticationClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD deleted file mode 100644 index 91e8a178b95a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authentication_client.go", - "fake_generated_expansion.go", - "fake_tokenreview.go", - "fake_tokenreview_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake", - deps = [ - "//pkg/apis/authentication:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go deleted file mode 100644 index 8328a297fda6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" -) - -type FakeAuthentication struct { - *testing.Fake -} - -func (c *FakeAuthentication) TokenReviews() internalversion.TokenReviewInterface { - return &FakeTokenReviews{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAuthentication) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_generated_expansion.go deleted file mode 100644 index 8754e39d87c0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_generated_expansion.go +++ /dev/null @@ -1,17 +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 fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview.go deleted file mode 100644 index 57747669a174..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeTokenReviews implements TokenReviewInterface -type FakeTokenReviews struct { - Fake *FakeAuthentication -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview_expansion.go deleted file mode 100644 index 1c5fbf960136..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_tokenreview_expansion.go +++ /dev/null @@ -1,27 +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 fake - -import ( - core "k8s.io/client-go/testing" - authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" -) - -func (c *FakeTokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authenticationapi.SchemeGroupVersion.WithResource("tokenreviews"), tokenReview), &authenticationapi.TokenReview{}) - return obj.(*authenticationapi.TokenReview), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go deleted file mode 100644 index 04939f148cc6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// TokenReviewsGetter has a method to return a TokenReviewInterface. -// A group's client should implement this interface. -type TokenReviewsGetter interface { - TokenReviews() TokenReviewInterface -} - -// TokenReviewInterface has methods to work with TokenReview resources. -type TokenReviewInterface interface { - TokenReviewExpansion -} - -// tokenReviews implements TokenReviewInterface -type tokenReviews struct { - client rest.Interface -} - -// newTokenReviews returns a TokenReviews -func newTokenReviews(c *AuthenticationClient) *tokenReviews { - return &tokenReviews{ - client: c.RESTClient(), - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview_expansion.go deleted file mode 100644 index 57bdc3ccda5f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview_expansion.go +++ /dev/null @@ -1,35 +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 internalversion - -import ( - authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" -) - -type TokenReviewExpansion interface { - Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) -} - -func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { - result = &authenticationapi.TokenReview{} - err = c.client.Post(). - Resource("tokenreviews"). - Body(tokenReview). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD deleted file mode 100644 index 4244f1a4fe62..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authorization_client.go", - "doc.go", - "generated_expansion.go", - "localsubjectaccessreview.go", - "localsubjectaccessreview_expansion.go", - "selfsubjectaccessreview.go", - "selfsubjectaccessreview_expansion.go", - "selfsubjectrulesreview.go", - "selfsubjectrulesreview_expansion.go", - "subjectaccessreview.go", - "subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion", - deps = [ - "//pkg/apis/authorization:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go deleted file mode 100644 index f97f54644bce..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AuthorizationInterface interface { - RESTClient() rest.Interface - LocalSubjectAccessReviewsGetter - SelfSubjectAccessReviewsGetter - SelfSubjectRulesReviewsGetter - SubjectAccessReviewsGetter -} - -// AuthorizationClient is used to interact with features provided by the authorization.k8s.io group. -type AuthorizationClient struct { - restClient rest.Interface -} - -func (c *AuthorizationClient) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { - return newLocalSubjectAccessReviews(c, namespace) -} - -func (c *AuthorizationClient) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface { - return newSelfSubjectAccessReviews(c) -} - -func (c *AuthorizationClient) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface { - return newSelfSubjectRulesReviews(c) -} - -func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface { - return newSubjectAccessReviews(c) -} - -// NewForConfig creates a new AuthorizationClient for the given config. -func NewForConfig(c *rest.Config) (*AuthorizationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AuthorizationClient{client}, nil -} - -// NewForConfigOrDie creates a new AuthorizationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuthorizationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AuthorizationClient for the given RESTClient. -func New(c rest.Interface) *AuthorizationClient { - return &AuthorizationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("authorization.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("authorization.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AuthorizationClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD deleted file mode 100644 index 4e02027b717a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authorization_client.go", - "fake_generated_expansion.go", - "fake_localsubjectaccessreview.go", - "fake_localsubjectaccessreview_expansion.go", - "fake_selfsubjectaccessreview.go", - "fake_selfsubjectaccessreview_expansion.go", - "fake_selfsubjectrulesreview.go", - "fake_selfsubjectrulesreview_expansion.go", - "fake_subjectaccessreview.go", - "fake_subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake", - deps = [ - "//pkg/apis/authorization:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go deleted file mode 100644 index 004beb512b2c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" -) - -type FakeAuthorization struct { - *testing.Fake -} - -func (c *FakeAuthorization) LocalSubjectAccessReviews(namespace string) internalversion.LocalSubjectAccessReviewInterface { - return &FakeLocalSubjectAccessReviews{c, namespace} -} - -func (c *FakeAuthorization) SelfSubjectAccessReviews() internalversion.SelfSubjectAccessReviewInterface { - return &FakeSelfSubjectAccessReviews{c} -} - -func (c *FakeAuthorization) SelfSubjectRulesReviews() internalversion.SelfSubjectRulesReviewInterface { - return &FakeSelfSubjectRulesReviews{c} -} - -func (c *FakeAuthorization) SubjectAccessReviews() internalversion.SubjectAccessReviewInterface { - return &FakeSubjectAccessReviews{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAuthorization) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_generated_expansion.go deleted file mode 100644 index 8754e39d87c0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_generated_expansion.go +++ /dev/null @@ -1,17 +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 fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview.go deleted file mode 100644 index 598b53cd945d..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface -type FakeLocalSubjectAccessReviews struct { - Fake *FakeAuthorization - ns string -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview_expansion.go deleted file mode 100644 index 7cf295fedcd5..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,28 +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 fake - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" - - core "k8s.io/client-go/testing" -) - -func (c *FakeLocalSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewCreateAction(authorizationapi.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), c.ns, sar), &authorizationapi.SubjectAccessReview{}) - return obj.(*authorizationapi.LocalSubjectAccessReview), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview.go deleted file mode 100644 index cf65fabb51bb..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface -type FakeSelfSubjectAccessReviews struct { - Fake *FakeAuthorization -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview_expansion.go deleted file mode 100644 index af3ee45c0659..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,27 +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 fake - -import ( - core "k8s.io/client-go/testing" - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -func (c *FakeSelfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectaccessreviews"), sar), &authorizationapi.SelfSubjectAccessReview{}) - return obj.(*authorizationapi.SelfSubjectAccessReview), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview.go deleted file mode 100644 index 39eefcf142d8..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface -type FakeSelfSubjectRulesReviews struct { - Fake *FakeAuthorization -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview_expansion.go deleted file mode 100644 index d08aaef4a7d7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2017 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 fake - -import ( - core "k8s.io/client-go/testing" - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -func (c *FakeSelfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), srr), &authorizationapi.SelfSubjectRulesReview{}) - return obj.(*authorizationapi.SelfSubjectRulesReview), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview.go deleted file mode 100644 index b51347ef6ac3..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeSubjectAccessReviews implements SubjectAccessReviewInterface -type FakeSubjectAccessReviews struct { - Fake *FakeAuthorization -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview_expansion.go deleted file mode 100644 index c1a999923172..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_subjectaccessreview_expansion.go +++ /dev/null @@ -1,28 +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 fake - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" - - core "k8s.io/client-go/testing" -) - -func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{}) - return obj.(*authorizationapi.SubjectAccessReview), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go deleted file mode 100644 index b98f8b0a70c0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. -// A group's client should implement this interface. -type LocalSubjectAccessReviewsGetter interface { - LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface -} - -// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. -type LocalSubjectAccessReviewInterface interface { - LocalSubjectAccessReviewExpansion -} - -// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface -type localSubjectAccessReviews struct { - client rest.Interface - ns string -} - -// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews -func newLocalSubjectAccessReviews(c *AuthorizationClient, namespace string) *localSubjectAccessReviews { - return &localSubjectAccessReviews{ - client: c.RESTClient(), - ns: namespace, - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview_expansion.go deleted file mode 100644 index b49970bfeac0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview_expansion.go +++ /dev/null @@ -1,36 +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 internalversion - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -type LocalSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) -} - -func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { - result = &authorizationapi.LocalSubjectAccessReview{} - err = c.client.Post(). - Namespace(c.ns). - Resource("localsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go deleted file mode 100644 index 978ca20c116d..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. -// A group's client should implement this interface. -type SelfSubjectAccessReviewsGetter interface { - SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface -} - -// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. -type SelfSubjectAccessReviewInterface interface { - SelfSubjectAccessReviewExpansion -} - -// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface -type selfSubjectAccessReviews struct { - client rest.Interface -} - -// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews -func newSelfSubjectAccessReviews(c *AuthorizationClient) *selfSubjectAccessReviews { - return &selfSubjectAccessReviews{ - client: c.RESTClient(), - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview_expansion.go deleted file mode 100644 index fcfe9e97b5bb..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview_expansion.go +++ /dev/null @@ -1,35 +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 internalversion - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -type SelfSubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) -} - -func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { - result = &authorizationapi.SelfSubjectAccessReview{} - err = c.client.Post(). - Resource("selfsubjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview.go deleted file mode 100644 index 1a1d5701bbeb..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface. -// A group's client should implement this interface. -type SelfSubjectRulesReviewsGetter interface { - SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface -} - -// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. -type SelfSubjectRulesReviewInterface interface { - SelfSubjectRulesReviewExpansion -} - -// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface -type selfSubjectRulesReviews struct { - client rest.Interface -} - -// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews -func newSelfSubjectRulesReviews(c *AuthorizationClient) *selfSubjectRulesReviews { - return &selfSubjectRulesReviews{ - client: c.RESTClient(), - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview_expansion.go deleted file mode 100644 index 5f8f754a68f7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectrulesreview_expansion.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2017 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 internalversion - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -type SelfSubjectRulesReviewExpansion interface { - Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) -} - -func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { - result = &authorizationapi.SelfSubjectRulesReview{} - err = c.client.Post(). - Resource("selfsubjectrulesreviews"). - Body(srr). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go deleted file mode 100644 index f442b59a1a6b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. -// A group's client should implement this interface. -type SubjectAccessReviewsGetter interface { - SubjectAccessReviews() SubjectAccessReviewInterface -} - -// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. -type SubjectAccessReviewInterface interface { - SubjectAccessReviewExpansion -} - -// subjectAccessReviews implements SubjectAccessReviewInterface -type subjectAccessReviews struct { - client rest.Interface -} - -// newSubjectAccessReviews returns a SubjectAccessReviews -func newSubjectAccessReviews(c *AuthorizationClient) *subjectAccessReviews { - return &subjectAccessReviews{ - client: c.RESTClient(), - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview_expansion.go deleted file mode 100644 index 44d672d604a1..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview_expansion.go +++ /dev/null @@ -1,35 +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 internalversion - -import ( - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" -) - -type SubjectAccessReviewExpansion interface { - Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) -} - -func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { - result = &authorizationapi.SubjectAccessReview{} - err = c.client.Post(). - Resource("subjectaccessreviews"). - Body(sar). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD deleted file mode 100644 index b7988c3307f7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "autoscaling_client.go", - "doc.go", - "generated_expansion.go", - "horizontalpodautoscaler.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion", - deps = [ - "//pkg/apis/autoscaling:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go deleted file mode 100644 index e00bc91913aa..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type AutoscalingInterface interface { - RESTClient() rest.Interface - HorizontalPodAutoscalersGetter -} - -// AutoscalingClient is used to interact with features provided by the autoscaling group. -type AutoscalingClient struct { - restClient rest.Interface -} - -func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { - return newHorizontalPodAutoscalers(c, namespace) -} - -// NewForConfig creates a new AutoscalingClient for the given config. -func NewForConfig(c *rest.Config) (*AutoscalingClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &AutoscalingClient{client}, nil -} - -// NewForConfigOrDie creates a new AutoscalingClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AutoscalingClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new AutoscalingClient for the given RESTClient. -func New(c rest.Interface) *AutoscalingClient { - return &AutoscalingClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("autoscaling")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("autoscaling")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *AutoscalingClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD deleted file mode 100644 index f17feedc31ef..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_autoscaling_client.go", - "fake_horizontalpodautoscaler.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake", - deps = [ - "//pkg/apis/autoscaling:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go deleted file mode 100644 index cfb590b39998..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion" -) - -type FakeAutoscaling struct { - *testing.Fake -} - -func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalversion.HorizontalPodAutoscalerInterface { - return &FakeHorizontalPodAutoscalers{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeAutoscaling) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go deleted file mode 100644 index 9082d70ba075..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" -) - -// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface -type FakeHorizontalPodAutoscalers struct { - Fake *FakeAutoscaling - ns string -} - -var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "", Resource: "horizontalpodautoscalers"} - -var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "", Kind: "HorizontalPodAutoscaler"} - -// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.HorizontalPodAutoscaler), err -} - -// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &autoscaling.HorizontalPodAutoscalerList{ListMeta: obj.(*autoscaling.HorizontalPodAutoscalerList).ListMeta} - for _, item := range obj.(*autoscaling.HorizontalPodAutoscalerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) - -} - -// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.HorizontalPodAutoscaler), err -} - -// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.HorizontalPodAutoscaler), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.HorizontalPodAutoscaler), err -} - -// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{}) - return err -} - -// Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &autoscaling.HorizontalPodAutoscaler{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.HorizontalPodAutoscaler), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/generated_expansion.go deleted file mode 100644 index f00428522bde..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type HorizontalPodAutoscalerExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go deleted file mode 100644 index 2c5293c67ce4..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. -// A group's client should implement this interface. -type HorizontalPodAutoscalersGetter interface { - HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface -} - -// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. -type HorizontalPodAutoscalerInterface interface { - Create(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) - Update(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) - UpdateStatus(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*autoscaling.HorizontalPodAutoscaler, 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 -} - -// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface -type horizontalPodAutoscalers struct { - client rest.Interface - ns string -} - -// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers -func newHorizontalPodAutoscalers(c *AutoscalingClient, namespace string) *horizontalPodAutoscalers { - return &horizontalPodAutoscalers{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) { - result = &autoscaling.HorizontalPodAutoscaler{} - err = c.client.Get(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &autoscaling.HorizontalPodAutoscalerList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { - result = &autoscaling.HorizontalPodAutoscaler{} - err = c.client.Post(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - Body(horizontalPodAutoscaler). - Do(). - Into(result) - return -} - -// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { - result = &autoscaling.HorizontalPodAutoscaler{} - err = c.client.Put(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - Name(horizontalPodAutoscaler.Name). - Body(horizontalPodAutoscaler). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { - result = &autoscaling.HorizontalPodAutoscaler{} - err = c.client.Put(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - Name(horizontalPodAutoscaler.Name). - SubResource("status"). - Body(horizontalPodAutoscaler). - Do(). - Into(result) - return -} - -// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { - result = &autoscaling.HorizontalPodAutoscaler{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("horizontalpodautoscalers"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD deleted file mode 100644 index 103af3f55891..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "batch_client.go", - "cronjob.go", - "doc.go", - "generated_expansion.go", - "job.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion", - deps = [ - "//pkg/apis/batch:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go deleted file mode 100644 index ebfcb85a2649..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type BatchInterface interface { - RESTClient() rest.Interface - CronJobsGetter - JobsGetter -} - -// BatchClient is used to interact with features provided by the batch group. -type BatchClient struct { - restClient rest.Interface -} - -func (c *BatchClient) CronJobs(namespace string) CronJobInterface { - return newCronJobs(c, namespace) -} - -func (c *BatchClient) Jobs(namespace string) JobInterface { - return newJobs(c, namespace) -} - -// NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *rest.Config) (*BatchClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &BatchClient{client}, nil -} - -// NewForConfigOrDie creates a new BatchClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *BatchClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new BatchClient for the given RESTClient. -func New(c rest.Interface) *BatchClient { - return &BatchClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("batch")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("batch")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *BatchClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go deleted file mode 100644 index 04f959524aa5..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - batch "k8s.io/kubernetes/pkg/apis/batch" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// CronJobsGetter has a method to return a CronJobInterface. -// A group's client should implement this interface. -type CronJobsGetter interface { - CronJobs(namespace string) CronJobInterface -} - -// CronJobInterface has methods to work with CronJob resources. -type CronJobInterface interface { - Create(*batch.CronJob) (*batch.CronJob, error) - Update(*batch.CronJob) (*batch.CronJob, error) - UpdateStatus(*batch.CronJob) (*batch.CronJob, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*batch.CronJob, error) - List(opts v1.ListOptions) (*batch.CronJobList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) - CronJobExpansion -} - -// cronJobs implements CronJobInterface -type cronJobs struct { - client rest.Interface - ns string -} - -// newCronJobs returns a CronJobs -func newCronJobs(c *BatchClient, namespace string) *cronJobs { - return &cronJobs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *cronJobs) Get(name string, options v1.GetOptions) (result *batch.CronJob, err error) { - result = &batch.CronJob{} - err = c.client.Get(). - Namespace(c.ns). - Resource("cronjobs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *cronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &batch.CronJobList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("cronjobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested cronJobs. -func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("cronjobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Create(cronJob *batch.CronJob) (result *batch.CronJob, err error) { - result = &batch.CronJob{} - err = c.client.Post(). - Namespace(c.ns). - Resource("cronjobs"). - Body(cronJob). - Do(). - Into(result) - return -} - -// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Update(cronJob *batch.CronJob) (result *batch.CronJob, err error) { - result = &batch.CronJob{} - err = c.client.Put(). - Namespace(c.ns). - Resource("cronjobs"). - Name(cronJob.Name). - Body(cronJob). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *cronJobs) UpdateStatus(cronJob *batch.CronJob) (result *batch.CronJob, err error) { - result = &batch.CronJob{} - err = c.client.Put(). - Namespace(c.ns). - Resource("cronjobs"). - Name(cronJob.Name). - SubResource("status"). - Body(cronJob). - Do(). - Into(result) - return -} - -// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("cronjobs"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("cronjobs"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { - result = &batch.CronJob{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("cronjobs"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD deleted file mode 100644 index 37980b1ae5cd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_batch_client.go", - "fake_cronjob.go", - "fake_job.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake", - deps = [ - "//pkg/apis/batch:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go deleted file mode 100644 index 2e6a3b7569a6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion" -) - -type FakeBatch struct { - *testing.Fake -} - -func (c *FakeBatch) CronJobs(namespace string) internalversion.CronJobInterface { - return &FakeCronJobs{c, namespace} -} - -func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface { - return &FakeJobs{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeBatch) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go deleted file mode 100644 index dd6b5f5c1473..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - batch "k8s.io/kubernetes/pkg/apis/batch" -) - -// FakeCronJobs implements CronJobInterface -type FakeCronJobs struct { - Fake *FakeBatch - ns string -} - -var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "", Resource: "cronjobs"} - -var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "", Kind: "CronJob"} - -// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *batch.CronJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &batch.CronJob{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.CronJob), err -} - -// List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *FakeCronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &batch.CronJobList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &batch.CronJobList{ListMeta: obj.(*batch.CronJobList).ListMeta} - for _, item := range obj.(*batch.CronJobList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cronJobs. -func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) - -} - -// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Create(cronJob *batch.CronJob) (result *batch.CronJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &batch.CronJob{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.CronJob), err -} - -// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Update(cronJob *batch.CronJob) (result *batch.CronJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &batch.CronJob{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.CronJob), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCronJobs) UpdateStatus(cronJob *batch.CronJob) (*batch.CronJob, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &batch.CronJob{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.CronJob), err -} - -// Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &batch.CronJob{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &batch.CronJobList{}) - return err -} - -// Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &batch.CronJob{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.CronJob), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go deleted file mode 100644 index 658dd2ad7c1b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - batch "k8s.io/kubernetes/pkg/apis/batch" -) - -// FakeJobs implements JobInterface -type FakeJobs struct { - Fake *FakeBatch - ns string -} - -var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "", Resource: "jobs"} - -var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "", Kind: "Job"} - -// Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch.Job, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batch.Job{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.Job), err -} - -// List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *FakeJobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batch.JobList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &batch.JobList{ListMeta: obj.(*batch.JobList).ListMeta} - for _, item := range obj.(*batch.JobList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts)) - -} - -// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Create(job *batch.Job) (result *batch.Job, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batch.Job{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.Job), err -} - -// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Update(job *batch.Job) (result *batch.Job, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batch.Job{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.Job), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobs) UpdateStatus(job *batch.Job) (*batch.Job, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batch.Job{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.Job), err -} - -// Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batch.Job{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &batch.JobList{}) - return err -} - -// Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &batch.Job{}) - - if obj == nil { - return nil, err - } - return obj.(*batch.Job), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/generated_expansion.go deleted file mode 100644 index e8f42d1c5b64..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type CronJobExpansion interface{} - -type JobExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go deleted file mode 100644 index fe5cd67e80f5..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - batch "k8s.io/kubernetes/pkg/apis/batch" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// JobsGetter has a method to return a JobInterface. -// A group's client should implement this interface. -type JobsGetter interface { - Jobs(namespace string) JobInterface -} - -// JobInterface has methods to work with Job resources. -type JobInterface interface { - Create(*batch.Job) (*batch.Job, error) - Update(*batch.Job) (*batch.Job, error) - UpdateStatus(*batch.Job) (*batch.Job, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*batch.Job, 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 -} - -// jobs implements JobInterface -type jobs struct { - client rest.Interface - ns string -} - -// newJobs returns a Jobs -func newJobs(c *BatchClient, namespace string) *jobs { - return &jobs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string, options v1.GetOptions) (result *batch.Job, err error) { - result = &batch.Job{} - err = c.client.Get(). - Namespace(c.ns). - Resource("jobs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &batch.JobList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Create(job *batch.Job) (result *batch.Job, err error) { - result = &batch.Job{} - err = c.client.Post(). - Namespace(c.ns). - Resource("jobs"). - Body(job). - Do(). - Into(result) - return -} - -// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Update(job *batch.Job) (result *batch.Job, err error) { - result = &batch.Job{} - err = c.client.Put(). - Namespace(c.ns). - Resource("jobs"). - Name(job.Name). - Body(job). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) { - result = &batch.Job{} - err = c.client.Put(). - Namespace(c.ns). - Resource("jobs"). - Name(job.Name). - SubResource("status"). - Body(job). - Do(). - Into(result) - return -} - -// Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("jobs"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("jobs"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { - result = &batch.Job{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("jobs"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD deleted file mode 100644 index 33809f40ff79..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "certificates_client.go", - "certificatesigningrequest.go", - "certificatesigningrequest_expansion.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion", - deps = [ - "//pkg/apis/certificates:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go deleted file mode 100644 index 852a42975298..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type CertificatesInterface interface { - RESTClient() rest.Interface - CertificateSigningRequestsGetter -} - -// CertificatesClient is used to interact with features provided by the certificates.k8s.io group. -type CertificatesClient struct { - restClient rest.Interface -} - -func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { - return newCertificateSigningRequests(c) -} - -// NewForConfig creates a new CertificatesClient for the given config. -func NewForConfig(c *rest.Config) (*CertificatesClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CertificatesClient{client}, nil -} - -// NewForConfigOrDie creates a new CertificatesClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CertificatesClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CertificatesClient for the given RESTClient. -func New(c rest.Interface) *CertificatesClient { - return &CertificatesClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("certificates.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("certificates.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CertificatesClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go deleted file mode 100644 index b1584f20195c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - certificates "k8s.io/kubernetes/pkg/apis/certificates" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. -// A group's client should implement this interface. -type CertificateSigningRequestsGetter interface { - CertificateSigningRequests() CertificateSigningRequestInterface -} - -// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. -type CertificateSigningRequestInterface interface { - Create(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) - Update(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) - UpdateStatus(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*certificates.CertificateSigningRequest, error) - List(opts v1.ListOptions) (*certificates.CertificateSigningRequestList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) - CertificateSigningRequestExpansion -} - -// certificateSigningRequests implements CertificateSigningRequestInterface -type certificateSigningRequests struct { - client rest.Interface -} - -// newCertificateSigningRequests returns a CertificateSigningRequests -func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests { - return &certificateSigningRequests{ - client: c.RESTClient(), - } -} - -// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Get(). - Resource("certificatesigningrequests"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &certificates.CertificateSigningRequestList{} - err = c.client.Get(). - Resource("certificatesigningrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("certificatesigningrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Post(). - Resource("certificatesigningrequests"). - Body(certificateSigningRequest). - Do(). - Into(result) - return -} - -// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Put(). - Resource("certificatesigningrequests"). - Name(certificateSigningRequest.Name). - Body(certificateSigningRequest). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Put(). - Resource("certificatesigningrequests"). - Name(certificateSigningRequest.Name). - SubResource("status"). - Body(certificateSigningRequest). - Do(). - Into(result) - return -} - -// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("certificatesigningrequests"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("certificatesigningrequests"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Patch(pt). - Resource("certificatesigningrequests"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest_expansion.go deleted file mode 100644 index ffdde2056055..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest_expansion.go +++ /dev/null @@ -1,35 +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 internalversion - -import "k8s.io/kubernetes/pkg/apis/certificates" - -type CertificateSigningRequestExpansion interface { - UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) -} - -func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - result = &certificates.CertificateSigningRequest{} - err = c.client.Put(). - Resource("certificatesigningrequests"). - Name(certificateSigningRequest.Name). - Body(certificateSigningRequest). - SubResource("approval"). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD deleted file mode 100644 index 602f7d0b2872..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_certificates_client.go", - "fake_certificatesigningrequest.go", - "fake_certificatesigningrequest_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake", - deps = [ - "//pkg/apis/certificates:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go deleted file mode 100644 index eac0f91ce141..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion" -) - -type FakeCertificates struct { - *testing.Fake -} - -func (c *FakeCertificates) CertificateSigningRequests() internalversion.CertificateSigningRequestInterface { - return &FakeCertificateSigningRequests{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCertificates) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go deleted file mode 100644 index 1c1dd60bc9cd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - certificates "k8s.io/kubernetes/pkg/apis/certificates" -) - -// FakeCertificateSigningRequests implements CertificateSigningRequestInterface -type FakeCertificateSigningRequests struct { - Fake *FakeCertificates -} - -var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "", Resource: "certificatesigningrequests"} - -var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "", Kind: "CertificateSigningRequest"} - -// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) (result *certificates.CertificateSigningRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} - -// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &certificates.CertificateSigningRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &certificates.CertificateSigningRequestList{ListMeta: obj.(*certificates.CertificateSigningRequestList).ListMeta} - for _, item := range obj.(*certificates.CertificateSigningRequestList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) -} - -// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} - -// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} - -// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &certificates.CertificateSigningRequest{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) - - _, err := c.Fake.Invokes(action, &certificates.CertificateSigningRequestList{}) - return err -} - -// Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest_expansion.go deleted file mode 100644 index 43607928a3f9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest_expansion.go +++ /dev/null @@ -1,31 +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 fake - -import ( - core "k8s.io/client-go/testing" - "k8s.io/kubernetes/pkg/apis/certificates" -) - -func (c *FakeCertificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { - obj, err := c.Fake. - Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{}) - if obj == nil { - return nil, err - } - return obj.(*certificates.CertificateSigningRequest), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/BUILD deleted file mode 100644 index abf2f9c479d4..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "coordination_client.go", - "doc.go", - "generated_expansion.go", - "lease.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/coordination:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/coordination_client.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/coordination_client.go deleted file mode 100644 index af5307b7602a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/coordination_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type CoordinationInterface interface { - RESTClient() rest.Interface - LeasesGetter -} - -// CoordinationClient is used to interact with features provided by the coordination.k8s.io group. -type CoordinationClient struct { - restClient rest.Interface -} - -func (c *CoordinationClient) Leases(namespace string) LeaseInterface { - return newLeases(c, namespace) -} - -// NewForConfig creates a new CoordinationClient for the given config. -func NewForConfig(c *rest.Config) (*CoordinationClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CoordinationClient{client}, nil -} - -// NewForConfigOrDie creates a new CoordinationClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoordinationClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CoordinationClient for the given RESTClient. -func New(c rest.Interface) *CoordinationClient { - return &CoordinationClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("coordination.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("coordination.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CoordinationClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/BUILD deleted file mode 100644 index a5426f71be53..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_coordination_client.go", - "fake_lease.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/coordination:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_coordination_client.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_coordination_client.go deleted file mode 100644 index 34c26c87f1e7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_coordination_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion" -) - -type FakeCoordination struct { - *testing.Fake -} - -func (c *FakeCoordination) Leases(namespace string) internalversion.LeaseInterface { - return &FakeLeases{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCoordination) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_lease.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_lease.go deleted file mode 100644 index dda16fd4c6b7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/fake/fake_lease.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - coordination "k8s.io/kubernetes/pkg/apis/coordination" -) - -// FakeLeases implements LeaseInterface -type FakeLeases struct { - Fake *FakeCoordination - ns string -} - -var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", Version: "", Resource: "leases"} - -var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "", Kind: "Lease"} - -// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *coordination.Lease, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(leasesResource, c.ns, name), &coordination.Lease{}) - - if obj == nil { - return nil, err - } - return obj.(*coordination.Lease), err -} - -// List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *FakeLeases) List(opts v1.ListOptions) (result *coordination.LeaseList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &coordination.LeaseList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &coordination.LeaseList{ListMeta: obj.(*coordination.LeaseList).ListMeta} - for _, item := range obj.(*coordination.LeaseList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested leases. -func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) - -} - -// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Create(lease *coordination.Lease) (result *coordination.Lease, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &coordination.Lease{}) - - if obj == nil { - return nil, err - } - return obj.(*coordination.Lease), err -} - -// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Update(lease *coordination.Lease) (result *coordination.Lease, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &coordination.Lease{}) - - if obj == nil { - return nil, err - } - return obj.(*coordination.Lease), err -} - -// Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &coordination.Lease{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &coordination.LeaseList{}) - return err -} - -// Patch applies the patch and returns the patched lease. -func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *coordination.Lease, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &coordination.Lease{}) - - if obj == nil { - return nil, err - } - return obj.(*coordination.Lease), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/generated_expansion.go deleted file mode 100644 index 852379fbd9fe..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type LeaseExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/lease.go b/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/lease.go deleted file mode 100644 index fd4987e48972..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion/lease.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - coordination "k8s.io/kubernetes/pkg/apis/coordination" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// LeasesGetter has a method to return a LeaseInterface. -// A group's client should implement this interface. -type LeasesGetter interface { - Leases(namespace string) LeaseInterface -} - -// LeaseInterface has methods to work with Lease resources. -type LeaseInterface interface { - Create(*coordination.Lease) (*coordination.Lease, error) - Update(*coordination.Lease) (*coordination.Lease, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*coordination.Lease, error) - List(opts v1.ListOptions) (*coordination.LeaseList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *coordination.Lease, err error) - LeaseExpansion -} - -// leases implements LeaseInterface -type leases struct { - client rest.Interface - ns string -} - -// newLeases returns a Leases -func newLeases(c *CoordinationClient, namespace string) *leases { - return &leases{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. -func (c *leases) Get(name string, options v1.GetOptions) (result *coordination.Lease, err error) { - result = &coordination.Lease{} - err = c.client.Get(). - Namespace(c.ns). - Resource("leases"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Leases that match those selectors. -func (c *leases) List(opts v1.ListOptions) (result *coordination.LeaseList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &coordination.LeaseList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("leases"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested leases. -func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("leases"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Create(lease *coordination.Lease) (result *coordination.Lease, err error) { - result = &coordination.Lease{} - err = c.client.Post(). - Namespace(c.ns). - Resource("leases"). - Body(lease). - Do(). - Into(result) - return -} - -// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Update(lease *coordination.Lease) (result *coordination.Lease, err error) { - result = &coordination.Lease{} - err = c.client.Put(). - Namespace(c.ns). - Resource("leases"). - Name(lease.Name). - Body(lease). - Do(). - Into(result) - return -} - -// Delete takes name of the lease and deletes it. Returns an error if one occurs. -func (c *leases) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("leases"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("leases"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched lease. -func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *coordination.Lease, err error) { - result = &coordination.Lease{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("leases"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD deleted file mode 100644 index 68ca5fd57a9b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "core_client.go", - "doc.go", - "endpoints.go", - "event.go", - "event_expansion.go", - "generated_expansion.go", - "limitrange.go", - "namespace.go", - "namespace_expansion.go", - "node.go", - "node_expansion.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "pod_expansion.go", - "podtemplate.go", - "replicationcontroller.go", - "resourcequota.go", - "secret.go", - "service.go", - "service_expansion.go", - "serviceaccount.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion", - deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/api/ref:go_default_library", - "//pkg/apis/autoscaling:go_default_library", - "//pkg/apis/core:go_default_library", - "//pkg/apis/core/v1:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go deleted file mode 100644 index d3d690798fbd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ComponentStatusesGetter has a method to return a ComponentStatusInterface. -// A group's client should implement this interface. -type ComponentStatusesGetter interface { - ComponentStatuses() ComponentStatusInterface -} - -// ComponentStatusInterface has methods to work with ComponentStatus resources. -type ComponentStatusInterface interface { - Create(*core.ComponentStatus) (*core.ComponentStatus, error) - Update(*core.ComponentStatus) (*core.ComponentStatus, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.ComponentStatus, error) - List(opts v1.ListOptions) (*core.ComponentStatusList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ComponentStatus, err error) - ComponentStatusExpansion -} - -// componentStatuses implements ComponentStatusInterface -type componentStatuses struct { - client rest.Interface -} - -// newComponentStatuses returns a ComponentStatuses -func newComponentStatuses(c *CoreClient) *componentStatuses { - return &componentStatuses{ - client: c.RESTClient(), - } -} - -// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *componentStatuses) Get(name string, options v1.GetOptions) (result *core.ComponentStatus, err error) { - result = &core.ComponentStatus{} - err = c.client.Get(). - Resource("componentstatuses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts v1.ListOptions) (result *core.ComponentStatusList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ComponentStatusList{} - err = c.client.Get(). - Resource("componentstatuses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("componentstatuses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Create(componentStatus *core.ComponentStatus) (result *core.ComponentStatus, err error) { - result = &core.ComponentStatus{} - err = c.client.Post(). - Resource("componentstatuses"). - Body(componentStatus). - Do(). - Into(result) - return -} - -// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Update(componentStatus *core.ComponentStatus) (result *core.ComponentStatus, err error) { - result = &core.ComponentStatus{} - err = c.client.Put(). - Resource("componentstatuses"). - Name(componentStatus.Name). - Body(componentStatus). - Do(). - Into(result) - return -} - -// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("componentstatuses"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("componentstatuses"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ComponentStatus, err error) { - result = &core.ComponentStatus{} - err = c.client.Patch(pt). - Resource("componentstatuses"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go deleted file mode 100644 index 77eed84b525e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ConfigMapsGetter has a method to return a ConfigMapInterface. -// A group's client should implement this interface. -type ConfigMapsGetter interface { - ConfigMaps(namespace string) ConfigMapInterface -} - -// ConfigMapInterface has methods to work with ConfigMap resources. -type ConfigMapInterface interface { - Create(*core.ConfigMap) (*core.ConfigMap, error) - Update(*core.ConfigMap) (*core.ConfigMap, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.ConfigMap, error) - List(opts v1.ListOptions) (*core.ConfigMapList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ConfigMap, err error) - ConfigMapExpansion -} - -// configMaps implements ConfigMapInterface -type configMaps struct { - client rest.Interface - ns string -} - -// newConfigMaps returns a ConfigMaps -func newConfigMaps(c *CoreClient, namespace string) *configMaps { - return &configMaps{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *configMaps) Get(name string, options v1.GetOptions) (result *core.ConfigMap, err error) { - result = &core.ConfigMap{} - err = c.client.Get(). - Namespace(c.ns). - Resource("configmaps"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts v1.ListOptions) (result *core.ConfigMapList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ConfigMapList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("configmaps"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("configmaps"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Create(configMap *core.ConfigMap) (result *core.ConfigMap, err error) { - result = &core.ConfigMap{} - err = c.client.Post(). - Namespace(c.ns). - Resource("configmaps"). - Body(configMap). - Do(). - Into(result) - return -} - -// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Update(configMap *core.ConfigMap) (result *core.ConfigMap, err error) { - result = &core.ConfigMap{} - err = c.client.Put(). - Namespace(c.ns). - Resource("configmaps"). - Name(configMap.Name). - Body(configMap). - Do(). - Into(result) - return -} - -// Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("configmaps"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("configmaps"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ConfigMap, err error) { - result = &core.ConfigMap{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("configmaps"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go deleted file mode 100644 index 6ba341b91b8a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type CoreInterface interface { - RESTClient() rest.Interface - ComponentStatusesGetter - ConfigMapsGetter - EndpointsGetter - EventsGetter - LimitRangesGetter - NamespacesGetter - NodesGetter - PersistentVolumesGetter - PersistentVolumeClaimsGetter - PodsGetter - PodTemplatesGetter - ReplicationControllersGetter - ResourceQuotasGetter - SecretsGetter - ServicesGetter - ServiceAccountsGetter -} - -// CoreClient is used to interact with features provided by the group. -type CoreClient struct { - restClient rest.Interface -} - -func (c *CoreClient) ComponentStatuses() ComponentStatusInterface { - return newComponentStatuses(c) -} - -func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface { - return newConfigMaps(c, namespace) -} - -func (c *CoreClient) Endpoints(namespace string) EndpointsInterface { - return newEndpoints(c, namespace) -} - -func (c *CoreClient) Events(namespace string) EventInterface { - return newEvents(c, namespace) -} - -func (c *CoreClient) LimitRanges(namespace string) LimitRangeInterface { - return newLimitRanges(c, namespace) -} - -func (c *CoreClient) Namespaces() NamespaceInterface { - return newNamespaces(c) -} - -func (c *CoreClient) Nodes() NodeInterface { - return newNodes(c) -} - -func (c *CoreClient) PersistentVolumes() PersistentVolumeInterface { - return newPersistentVolumes(c) -} - -func (c *CoreClient) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface { - return newPersistentVolumeClaims(c, namespace) -} - -func (c *CoreClient) Pods(namespace string) PodInterface { - return newPods(c, namespace) -} - -func (c *CoreClient) PodTemplates(namespace string) PodTemplateInterface { - return newPodTemplates(c, namespace) -} - -func (c *CoreClient) ReplicationControllers(namespace string) ReplicationControllerInterface { - return newReplicationControllers(c, namespace) -} - -func (c *CoreClient) ResourceQuotas(namespace string) ResourceQuotaInterface { - return newResourceQuotas(c, namespace) -} - -func (c *CoreClient) Secrets(namespace string) SecretInterface { - return newSecrets(c, namespace) -} - -func (c *CoreClient) Services(namespace string) ServiceInterface { - return newServices(c, namespace) -} - -func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface { - return newServiceAccounts(c, namespace) -} - -// NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *rest.Config) (*CoreClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CoreClient{client}, nil -} - -// NewForConfigOrDie creates a new CoreClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoreClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CoreClient for the given RESTClient. -func New(c rest.Interface) *CoreClient { - return &CoreClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/api" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CoreClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go deleted file mode 100644 index 64c1c473120a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// EndpointsGetter has a method to return a EndpointsInterface. -// A group's client should implement this interface. -type EndpointsGetter interface { - Endpoints(namespace string) EndpointsInterface -} - -// EndpointsInterface has methods to work with Endpoints resources. -type EndpointsInterface interface { - Create(*core.Endpoints) (*core.Endpoints, error) - Update(*core.Endpoints) (*core.Endpoints, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Endpoints, error) - List(opts v1.ListOptions) (*core.EndpointsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Endpoints, err error) - EndpointsExpansion -} - -// endpoints implements EndpointsInterface -type endpoints struct { - client rest.Interface - ns string -} - -// newEndpoints returns a Endpoints -func newEndpoints(c *CoreClient, namespace string) *endpoints { - return &endpoints{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *endpoints) Get(name string, options v1.GetOptions) (result *core.Endpoints, err error) { - result = &core.Endpoints{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpoints"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts v1.ListOptions) (result *core.EndpointsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.EndpointsList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Create(endpoints *core.Endpoints) (result *core.Endpoints, err error) { - result = &core.Endpoints{} - err = c.client.Post(). - Namespace(c.ns). - Resource("endpoints"). - Body(endpoints). - Do(). - Into(result) - return -} - -// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Update(endpoints *core.Endpoints) (result *core.Endpoints, err error) { - result = &core.Endpoints{} - err = c.client.Put(). - Namespace(c.ns). - Resource("endpoints"). - Name(endpoints.Name). - Body(endpoints). - Do(). - Into(result) - return -} - -// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("endpoints"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Endpoints, err error) { - result = &core.Endpoints{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("endpoints"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go deleted file mode 100644 index ed123a58df55..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// EventsGetter has a method to return a EventInterface. -// A group's client should implement this interface. -type EventsGetter interface { - Events(namespace string) EventInterface -} - -// EventInterface has methods to work with Event resources. -type EventInterface interface { - Create(*core.Event) (*core.Event, error) - Update(*core.Event) (*core.Event, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Event, error) - List(opts v1.ListOptions) (*core.EventList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Event, err error) - EventExpansion -} - -// events implements EventInterface -type events struct { - client rest.Interface - ns string -} - -// newEvents returns a Events -func newEvents(c *CoreClient, namespace string) *events { - return &events{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *events) Get(name string, options v1.GetOptions) (result *core.Event, err error) { - result = &core.Event{} - err = c.client.Get(). - Namespace(c.ns). - Resource("events"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts v1.ListOptions) (result *core.EventList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.EventList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("events"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("events"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Create(event *core.Event) (result *core.Event, err error) { - result = &core.Event{} - err = c.client.Post(). - Namespace(c.ns). - Resource("events"). - Body(event). - Do(). - Into(result) - return -} - -// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Update(event *core.Event) (result *core.Event, err error) { - result = &core.Event{} - err = c.client.Put(). - Namespace(c.ns). - Resource("events"). - Name(event.Name). - Body(event). - Do(). - Into(result) - return -} - -// Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("events"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("events"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Event, err error) { - result = &core.Event{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("events"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go deleted file mode 100644 index 5f1ebb89cc9f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go +++ /dev/null @@ -1,199 +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 internalversion - -import ( - "fmt" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/api/ref" - api "k8s.io/kubernetes/pkg/apis/core" - k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" -) - -// The EventExpansion interface allows manually adding extra methods to the EventInterface. -type EventExpansion interface { - // CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace. - CreateWithEventNamespace(event *api.Event) (*api.Event, error) - // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace. - UpdateWithEventNamespace(event *api.Event) (*api.Event, error) - PatchWithEventNamespace(event *api.Event, data []byte) (*api.Event, error) - // Search finds events about the specified object - Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*api.EventList, error) - // Returns the appropriate field selector based on the API version being used to communicate with the server. - // The returned field selector can be used with List and Watch to filter desired events. - GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector -} - -// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns, -// or an error. The namespace to create the event within is deduced from the -// event; it must either match this event client's namespace, or this event -// client must have been created with the "" namespace. -func (e *events) CreateWithEventNamespace(event *api.Event) (*api.Event, error) { - if e.ns != "" && event.Namespace != e.ns { - return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns) - } - result := &api.Event{} - err := e.client.Post(). - NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). - Resource("events"). - Body(event). - Do(). - Into(result) - return result, err -} - -// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns, -// or an error. The namespace and key to update the event within is deduced from the event. The -// namespace must either match this event client's namespace, or this event client must have been -// created with the "" namespace. Update also requires the ResourceVersion to be set in the event -// object. -func (e *events) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) { - result := &api.Event{} - err := e.client.Put(). - NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). - Resource("events"). - Name(event.Name). - Body(event). - Do(). - Into(result) - return result, err -} - -// PatchWithEventNamespace modifies an existing event. It returns the copy of -// the event that the server returns, or an error. The namespace and name of the -// target event is deduced from the incompleteEvent. The namespace must either -// match this event client's namespace, or this event client must have been -// created with the "" namespace. -func (e *events) PatchWithEventNamespace(incompleteEvent *api.Event, data []byte) (*api.Event, error) { - if e.ns != "" && incompleteEvent.Namespace != e.ns { - return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) - } - result := &api.Event{} - err := e.client.Patch(types.StrategicMergePatchType). - NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). - Resource("events"). - Name(incompleteEvent.Name). - Body(data). - Do(). - Into(result) - return result, err -} - -// Search finds events about the specified object. The namespace of the -// object must match this event's client namespace unless the event client -// was made with the "" namespace. -func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*api.EventList, error) { - ref, err := ref.GetReference(scheme, objOrRef) - if err != nil { - return nil, err - } - if e.ns != "" && ref.Namespace != e.ns { - return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns) - } - stringRefKind := string(ref.Kind) - var refKind *string - if stringRefKind != "" { - refKind = &stringRefKind - } - stringRefUID := string(ref.UID) - var refUID *string - if stringRefUID != "" { - refUID = &stringRefUID - } - fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) -} - -// Returns the appropriate field selector based on the API version being used to communicate with the server. -// The returned field selector can be used with List and Watch to filter desired events. -func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector { - apiVersion := e.client.APIVersion().String() - field := fields.Set{} - if involvedObjectName != nil { - field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName - } - if involvedObjectNamespace != nil { - field["involvedObject.namespace"] = *involvedObjectNamespace - } - if involvedObjectKind != nil { - field["involvedObject.kind"] = *involvedObjectKind - } - if involvedObjectUID != nil { - field["involvedObject.uid"] = *involvedObjectUID - } - return field.AsSelector() -} - -// Returns the appropriate field label to use for name of the involved object as per the given API version. -func GetInvolvedObjectNameFieldLabel(version string) string { - return "involvedObject.name" -} - -// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset. -type EventSinkImpl struct { - Interface EventInterface -} - -func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) { - internalEvent := &api.Event{} - err := k8s_api_v1.Convert_v1_Event_To_core_Event(event, internalEvent, nil) - if err != nil { - return nil, err - } - _, err = e.Interface.CreateWithEventNamespace(internalEvent) - if err != nil { - return nil, err - } - return event, nil -} - -func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) { - internalEvent := &api.Event{} - err := k8s_api_v1.Convert_v1_Event_To_core_Event(event, internalEvent, nil) - if err != nil { - return nil, err - } - _, err = e.Interface.UpdateWithEventNamespace(internalEvent) - if err != nil { - return nil, err - } - return event, nil -} - -func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) { - internalEvent := &api.Event{} - err := k8s_api_v1.Convert_v1_Event_To_core_Event(event, internalEvent, nil) - if err != nil { - return nil, err - } - internalEvent, err = e.Interface.PatchWithEventNamespace(internalEvent, data) - if err != nil { - return nil, err - } - externalEvent := &v1.Event{} - err = k8s_api_v1.Convert_core_Event_To_v1_Event(internalEvent, externalEvent, nil) - if err != nil { - // Patch succeeded, no need to report the failed conversion - return event, nil - } - return externalEvent, nil -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD deleted file mode 100644 index 7119f7e839b6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD +++ /dev/null @@ -1,63 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_componentstatus.go", - "fake_configmap.go", - "fake_core_client.go", - "fake_endpoints.go", - "fake_event.go", - "fake_event_expansion.go", - "fake_limitrange.go", - "fake_namespace.go", - "fake_namespace_expansion.go", - "fake_node.go", - "fake_node_expansion.go", - "fake_persistentvolume.go", - "fake_persistentvolumeclaim.go", - "fake_pod.go", - "fake_pod_expansion.go", - "fake_podtemplate.go", - "fake_replicationcontroller.go", - "fake_resourcequota.go", - "fake_secret.go", - "fake_service.go", - "fake_service_expansion.go", - "fake_serviceaccount.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake", - deps = [ - "//pkg/apis/autoscaling:go_default_library", - "//pkg/apis/core:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go deleted file mode 100644 index 11387839a347..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeComponentStatuses implements ComponentStatusInterface -type FakeComponentStatuses struct { - Fake *FakeCore -} - -var componentstatusesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "componentstatuses"} - -var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "ComponentStatus"} - -// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *core.ComponentStatus, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(componentstatusesResource, name), &core.ComponentStatus{}) - if obj == nil { - return nil, err - } - return obj.(*core.ComponentStatus), err -} - -// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *core.ComponentStatusList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &core.ComponentStatusList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ComponentStatusList{ListMeta: obj.(*core.ComponentStatusList).ListMeta} - for _, item := range obj.(*core.ComponentStatusList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts)) -} - -// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Create(componentStatus *core.ComponentStatus) (result *core.ComponentStatus, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &core.ComponentStatus{}) - if obj == nil { - return nil, err - } - return obj.(*core.ComponentStatus), err -} - -// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Update(componentStatus *core.ComponentStatus) (result *core.ComponentStatus, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &core.ComponentStatus{}) - if obj == nil { - return nil, err - } - return obj.(*core.ComponentStatus), err -} - -// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &core.ComponentStatus{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) - - _, err := c.Fake.Invokes(action, &core.ComponentStatusList{}) - return err -} - -// Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ComponentStatus, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, pt, data, subresources...), &core.ComponentStatus{}) - if obj == nil { - return nil, err - } - return obj.(*core.ComponentStatus), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go deleted file mode 100644 index 948b8e7f720f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeConfigMaps implements ConfigMapInterface -type FakeConfigMaps struct { - Fake *FakeCore - ns string -} - -var configmapsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "configmaps"} - -var configmapsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "ConfigMap"} - -// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *core.ConfigMap, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &core.ConfigMap{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ConfigMap), err -} - -// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *core.ConfigMapList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &core.ConfigMapList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ConfigMapList{ListMeta: obj.(*core.ConfigMapList).ListMeta} - for _, item := range obj.(*core.ConfigMapList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts)) - -} - -// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Create(configMap *core.ConfigMap) (result *core.ConfigMap, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &core.ConfigMap{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ConfigMap), err -} - -// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Update(configMap *core.ConfigMap) (result *core.ConfigMap, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &core.ConfigMap{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ConfigMap), err -} - -// Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &core.ConfigMap{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.ConfigMapList{}) - return err -} - -// Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ConfigMap, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, pt, data, subresources...), &core.ConfigMap{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ConfigMap), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go deleted file mode 100644 index 657b723498bc..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" -) - -type FakeCore struct { - *testing.Fake -} - -func (c *FakeCore) ComponentStatuses() internalversion.ComponentStatusInterface { - return &FakeComponentStatuses{c} -} - -func (c *FakeCore) ConfigMaps(namespace string) internalversion.ConfigMapInterface { - return &FakeConfigMaps{c, namespace} -} - -func (c *FakeCore) Endpoints(namespace string) internalversion.EndpointsInterface { - return &FakeEndpoints{c, namespace} -} - -func (c *FakeCore) Events(namespace string) internalversion.EventInterface { - return &FakeEvents{c, namespace} -} - -func (c *FakeCore) LimitRanges(namespace string) internalversion.LimitRangeInterface { - return &FakeLimitRanges{c, namespace} -} - -func (c *FakeCore) Namespaces() internalversion.NamespaceInterface { - return &FakeNamespaces{c} -} - -func (c *FakeCore) Nodes() internalversion.NodeInterface { - return &FakeNodes{c} -} - -func (c *FakeCore) PersistentVolumes() internalversion.PersistentVolumeInterface { - return &FakePersistentVolumes{c} -} - -func (c *FakeCore) PersistentVolumeClaims(namespace string) internalversion.PersistentVolumeClaimInterface { - return &FakePersistentVolumeClaims{c, namespace} -} - -func (c *FakeCore) Pods(namespace string) internalversion.PodInterface { - return &FakePods{c, namespace} -} - -func (c *FakeCore) PodTemplates(namespace string) internalversion.PodTemplateInterface { - return &FakePodTemplates{c, namespace} -} - -func (c *FakeCore) ReplicationControllers(namespace string) internalversion.ReplicationControllerInterface { - return &FakeReplicationControllers{c, namespace} -} - -func (c *FakeCore) ResourceQuotas(namespace string) internalversion.ResourceQuotaInterface { - return &FakeResourceQuotas{c, namespace} -} - -func (c *FakeCore) Secrets(namespace string) internalversion.SecretInterface { - return &FakeSecrets{c, namespace} -} - -func (c *FakeCore) Services(namespace string) internalversion.ServiceInterface { - return &FakeServices{c, namespace} -} - -func (c *FakeCore) ServiceAccounts(namespace string) internalversion.ServiceAccountInterface { - return &FakeServiceAccounts{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCore) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go deleted file mode 100644 index ad6cf80c6f24..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeEndpoints implements EndpointsInterface -type FakeEndpoints struct { - Fake *FakeCore - ns string -} - -var endpointsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "endpoints"} - -var endpointsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Endpoints"} - -// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *core.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &core.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Endpoints), err -} - -// List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *FakeEndpoints) List(opts v1.ListOptions) (result *core.EndpointsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &core.EndpointsList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.EndpointsList{ListMeta: obj.(*core.EndpointsList).ListMeta} - for _, item := range obj.(*core.EndpointsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts)) - -} - -// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Create(endpoints *core.Endpoints) (result *core.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &core.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Endpoints), err -} - -// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Update(endpoints *core.Endpoints) (result *core.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &core.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Endpoints), err -} - -// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &core.Endpoints{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.EndpointsList{}) - return err -} - -// Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &core.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Endpoints), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go deleted file mode 100644 index ef3004307de2..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeEvents implements EventInterface -type FakeEvents struct { - Fake *FakeCore - ns string -} - -var eventsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "events"} - -var eventsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Event"} - -// Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *core.Event, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(eventsResource, c.ns, name), &core.Event{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Event), err -} - -// List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *FakeEvents) List(opts v1.ListOptions) (result *core.EventList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &core.EventList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.EventList{ListMeta: obj.(*core.EventList).ListMeta} - for _, item := range obj.(*core.EventList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) - -} - -// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(event *core.Event) (result *core.Event, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &core.Event{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Event), err -} - -// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(event *core.Event) (result *core.Event, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &core.Event{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Event), err -} - -// Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &core.Event{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.EventList{}) - return err -} - -// Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Event, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &core.Event{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Event), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go deleted file mode 100644 index ab40012a483a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2014 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 fake - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/runtime" - types "k8s.io/apimachinery/pkg/types" - core "k8s.io/client-go/testing" - api "k8s.io/kubernetes/pkg/apis/core" -) - -func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, error) { - action := core.NewRootCreateAction(eventsResource, event) - if c.ns != "" { - action = core.NewCreateAction(eventsResource, c.ns, event) - } - obj, err := c.Fake.Invokes(action, event) - if obj == nil { - return nil, err - } - - return obj.(*api.Event), err -} - -// Update replaces an existing event. Returns the copy of the event the server returns, or an error. -func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) { - action := core.NewRootUpdateAction(eventsResource, event) - if c.ns != "" { - action = core.NewUpdateAction(eventsResource, c.ns, event) - } - obj, err := c.Fake.Invokes(action, event) - if obj == nil { - return nil, err - } - - return obj.(*api.Event), err -} - -// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. -// TODO: Should take a PatchType as an argument probably. -func (c *FakeEvents) PatchWithEventNamespace(event *api.Event, data []byte) (*api.Event, error) { - // TODO: Should be configurable to support additional patch strategies. - pt := types.StrategicMergePatchType - action := core.NewRootPatchAction(eventsResource, event.Name, pt, data) - if c.ns != "" { - action = core.NewPatchAction(eventsResource, c.ns, event.Name, pt, data) - } - obj, err := c.Fake.Invokes(action, event) - if obj == nil { - return nil, err - } - - return obj.(*api.Event), err -} - -// Search returns a list of events matching the specified object. -func (c *FakeEvents) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*api.EventList, error) { - action := core.NewRootListAction(eventsResource, eventsKind, metav1.ListOptions{}) - if c.ns != "" { - action = core.NewListAction(eventsResource, eventsKind, c.ns, metav1.ListOptions{}) - } - obj, err := c.Fake.Invokes(action, &api.EventList{}) - if obj == nil { - return nil, err - } - - return obj.(*api.EventList), err -} - -func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector { - action := core.GenericActionImpl{} - action.Verb = "get-field-selector" - action.Resource = eventsResource - - c.Fake.Invokes(action, nil) - return fields.Everything() -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go deleted file mode 100644 index 78eab7d0e8dc..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeLimitRanges implements LimitRangeInterface -type FakeLimitRanges struct { - Fake *FakeCore - ns string -} - -var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "limitranges"} - -var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "LimitRange"} - -// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *core.LimitRange, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &core.LimitRange{}) - - if obj == nil { - return nil, err - } - return obj.(*core.LimitRange), err -} - -// List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *core.LimitRangeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &core.LimitRangeList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.LimitRangeList{ListMeta: obj.(*core.LimitRangeList).ListMeta} - for _, item := range obj.(*core.LimitRangeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested limitRanges. -func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts)) - -} - -// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Create(limitRange *core.LimitRange) (result *core.LimitRange, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &core.LimitRange{}) - - if obj == nil { - return nil, err - } - return obj.(*core.LimitRange), err -} - -// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Update(limitRange *core.LimitRange) (result *core.LimitRange, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &core.LimitRange{}) - - if obj == nil { - return nil, err - } - return obj.(*core.LimitRange), err -} - -// Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &core.LimitRange{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.LimitRangeList{}) - return err -} - -// Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.LimitRange, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, pt, data, subresources...), &core.LimitRange{}) - - if obj == nil { - return nil, err - } - return obj.(*core.LimitRange), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go deleted file mode 100644 index 550caf21cbeb..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeNamespaces implements NamespaceInterface -type FakeNamespaces struct { - Fake *FakeCore -} - -var namespacesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "namespaces"} - -var namespacesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Namespace"} - -// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *core.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(namespacesResource, name), &core.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*core.Namespace), err -} - -// List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *core.NamespaceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &core.NamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.NamespaceList{ListMeta: obj.(*core.NamespaceList).ListMeta} - for _, item := range obj.(*core.NamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts)) -} - -// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Create(namespace *core.Namespace) (result *core.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &core.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*core.Namespace), err -} - -// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Update(namespace *core.Namespace) (result *core.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &core.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*core.Namespace), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNamespaces) UpdateStatus(namespace *core.Namespace) (*core.Namespace, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &core.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*core.Namespace), err -} - -// Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(namespacesResource, name), &core.Namespace{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions) - - _, err := c.Fake.Invokes(action, &core.NamespaceList{}) - return err -} - -// Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &core.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*core.Namespace), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace_expansion.go deleted file mode 100644 index 77200c72fba3..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace_expansion.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2014 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 fake - -import ( - core "k8s.io/client-go/testing" - api "k8s.io/kubernetes/pkg/apis/core" -) - -func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error) { - action := core.CreateActionImpl{} - action.Verb = "create" - action.Resource = namespacesResource - action.Subresource = "finalize" - action.Object = namespace - - obj, err := c.Fake.Invokes(action, namespace) - if obj == nil { - return nil, err - } - - return obj.(*api.Namespace), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go deleted file mode 100644 index 61174d30ed4e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeNodes implements NodeInterface -type FakeNodes struct { - Fake *FakeCore -} - -var nodesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "nodes"} - -var nodesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Node"} - -// Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *core.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(nodesResource, name), &core.Node{}) - if obj == nil { - return nil, err - } - return obj.(*core.Node), err -} - -// List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *FakeNodes) List(opts v1.ListOptions) (result *core.NodeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &core.NodeList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.NodeList{ListMeta: obj.(*core.NodeList).ListMeta} - for _, item := range obj.(*core.NodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(nodesResource, opts)) -} - -// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Create(node *core.Node) (result *core.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(nodesResource, node), &core.Node{}) - if obj == nil { - return nil, err - } - return obj.(*core.Node), err -} - -// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Update(node *core.Node) (result *core.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(nodesResource, node), &core.Node{}) - if obj == nil { - return nil, err - } - return obj.(*core.Node), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNodes) UpdateStatus(node *core.Node) (*core.Node, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &core.Node{}) - if obj == nil { - return nil, err - } - return obj.(*core.Node), err -} - -// Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(nodesResource, name), &core.Node{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions) - - _, err := c.Fake.Invokes(action, &core.NodeList{}) - return err -} - -// Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &core.Node{}) - if obj == nil { - return nil, err - } - return obj.(*core.Node), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node_expansion.go deleted file mode 100644 index 4fe036a317c0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node_expansion.go +++ /dev/null @@ -1,36 +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 fake - -import ( - types "k8s.io/apimachinery/pkg/types" - core "k8s.io/client-go/testing" - api "k8s.io/kubernetes/pkg/apis/core" -) - -// TODO: Should take a PatchType as an argument probably. -func (c *FakeNodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) { - // TODO: Should be configurable to support additional patch strategies. - pt := types.StrategicMergePatchType - obj, err := c.Fake.Invokes( - core.NewRootPatchSubresourceAction(nodesResource, nodeName, pt, data, "status"), &api.Node{}) - if obj == nil { - return nil, err - } - - return obj.(*api.Node), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go deleted file mode 100644 index c358f7930c50..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakePersistentVolumes implements PersistentVolumeInterface -type FakePersistentVolumes struct { - Fake *FakeCore -} - -var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "persistentvolumes"} - -var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "PersistentVolume"} - -// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *core.PersistentVolume, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &core.PersistentVolume{}) - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolume), err -} - -// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *core.PersistentVolumeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &core.PersistentVolumeList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.PersistentVolumeList{ListMeta: obj.(*core.PersistentVolumeList).ListMeta} - for _, item := range obj.(*core.PersistentVolumeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts)) -} - -// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Create(persistentVolume *core.PersistentVolume) (result *core.PersistentVolume, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &core.PersistentVolume{}) - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolume), err -} - -// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Update(persistentVolume *core.PersistentVolume) (result *core.PersistentVolume, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &core.PersistentVolume{}) - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolume), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *core.PersistentVolume) (*core.PersistentVolume, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &core.PersistentVolume{}) - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolume), err -} - -// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &core.PersistentVolume{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) - - _, err := c.Fake.Invokes(action, &core.PersistentVolumeList{}) - return err -} - -// Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolume, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, pt, data, subresources...), &core.PersistentVolume{}) - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolume), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go deleted file mode 100644 index e65d6d180735..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakePersistentVolumeClaims implements PersistentVolumeClaimInterface -type FakePersistentVolumeClaims struct { - Fake *FakeCore - ns string -} - -var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "persistentvolumeclaims"} - -var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "PersistentVolumeClaim"} - -// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *core.PersistentVolumeClaim, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &core.PersistentVolumeClaim{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolumeClaim), err -} - -// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *core.PersistentVolumeClaimList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &core.PersistentVolumeClaimList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.PersistentVolumeClaimList{ListMeta: obj.(*core.PersistentVolumeClaimList).ListMeta} - for _, item := range obj.(*core.PersistentVolumeClaimList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) - -} - -// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *core.PersistentVolumeClaim) (result *core.PersistentVolumeClaim, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core.PersistentVolumeClaim{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolumeClaim), err -} - -// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *core.PersistentVolumeClaim) (result *core.PersistentVolumeClaim, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core.PersistentVolumeClaim{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolumeClaim), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *core.PersistentVolumeClaim) (*core.PersistentVolumeClaim, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &core.PersistentVolumeClaim{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolumeClaim), err -} - -// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &core.PersistentVolumeClaim{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.PersistentVolumeClaimList{}) - return err -} - -// Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolumeClaim, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &core.PersistentVolumeClaim{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PersistentVolumeClaim), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go deleted file mode 100644 index 73442fd69a24..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakePods implements PodInterface -type FakePods struct { - Fake *FakeCore - ns string -} - -var podsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "pods"} - -var podsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Pod"} - -// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *FakePods) Get(name string, options v1.GetOptions) (result *core.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podsResource, c.ns, name), &core.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Pod), err -} - -// List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *FakePods) List(opts v1.ListOptions) (result *core.PodList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &core.PodList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.PodList{ListMeta: obj.(*core.PodList).ListMeta} - for _, item := range obj.(*core.PodList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts)) - -} - -// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Create(pod *core.Pod) (result *core.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &core.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Pod), err -} - -// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Update(pod *core.Pod) (result *core.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &core.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Pod), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePods) UpdateStatus(pod *core.Pod) (*core.Pod, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &core.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Pod), err -} - -// Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &core.Pod{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.PodList{}) - return err -} - -// Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &core.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Pod), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go deleted file mode 100644 index 8853f9eee199..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2014 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 fake - -import ( - restclient "k8s.io/client-go/rest" - core "k8s.io/client-go/testing" - api "k8s.io/kubernetes/pkg/apis/core" -) - -func (c *FakePods) Bind(binding *api.Binding) error { - action := core.CreateActionImpl{} - action.Verb = "create" - action.Resource = podsResource - action.Subresource = "bindings" - action.Object = binding - - _, err := c.Fake.Invokes(action, binding) - return err -} - -func (c *FakePods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Request { - action := core.GenericActionImpl{} - action.Verb = "get" - action.Namespace = c.ns - action.Resource = podsResource - action.Subresource = "logs" - action.Value = opts - - _, _ = c.Fake.Invokes(action, &api.Pod{}) - return &restclient.Request{} -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go deleted file mode 100644 index 352fc8b39341..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakePodTemplates implements PodTemplateInterface -type FakePodTemplates struct { - Fake *FakeCore - ns string -} - -var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "podtemplates"} - -var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "PodTemplate"} - -// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *core.PodTemplate, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &core.PodTemplate{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PodTemplate), err -} - -// List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *FakePodTemplates) List(opts v1.ListOptions) (result *core.PodTemplateList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &core.PodTemplateList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.PodTemplateList{ListMeta: obj.(*core.PodTemplateList).ListMeta} - for _, item := range obj.(*core.PodTemplateList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podTemplates. -func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts)) - -} - -// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Create(podTemplate *core.PodTemplate) (result *core.PodTemplate, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &core.PodTemplate{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PodTemplate), err -} - -// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Update(podTemplate *core.PodTemplate) (result *core.PodTemplate, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &core.PodTemplate{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PodTemplate), err -} - -// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &core.PodTemplate{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.PodTemplateList{}) - return err -} - -// Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PodTemplate, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, pt, data, subresources...), &core.PodTemplate{}) - - if obj == nil { - return nil, err - } - return obj.(*core.PodTemplate), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go deleted file mode 100644 index 332b5e770e42..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeReplicationControllers implements ReplicationControllerInterface -type FakeReplicationControllers struct { - Fake *FakeCore - ns string -} - -var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "replicationcontrollers"} - -var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "ReplicationController"} - -// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *core.ReplicationController, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &core.ReplicationController{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ReplicationController), err -} - -// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *core.ReplicationControllerList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &core.ReplicationControllerList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ReplicationControllerList{ListMeta: obj.(*core.ReplicationControllerList).ListMeta} - for _, item := range obj.(*core.ReplicationControllerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts)) - -} - -// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Create(replicationController *core.ReplicationController) (result *core.ReplicationController, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &core.ReplicationController{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ReplicationController), err -} - -// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Update(replicationController *core.ReplicationController) (result *core.ReplicationController, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &core.ReplicationController{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ReplicationController), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicationControllers) UpdateStatus(replicationController *core.ReplicationController) (*core.ReplicationController, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &core.ReplicationController{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ReplicationController), err -} - -// Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &core.ReplicationController{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.ReplicationControllerList{}) - return err -} - -// Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ReplicationController, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, pt, data, subresources...), &core.ReplicationController{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ReplicationController), err -} - -// GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &autoscaling.Scale{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.Scale), err -} - -// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicationControllers) UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscaling.Scale{}) - - if obj == nil { - return nil, err - } - return obj.(*autoscaling.Scale), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go deleted file mode 100644 index a8cccbb8b491..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeResourceQuotas implements ResourceQuotaInterface -type FakeResourceQuotas struct { - Fake *FakeCore - ns string -} - -var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "resourcequotas"} - -var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "ResourceQuota"} - -// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *core.ResourceQuota, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &core.ResourceQuota{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ResourceQuota), err -} - -// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *core.ResourceQuotaList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &core.ResourceQuotaList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ResourceQuotaList{ListMeta: obj.(*core.ResourceQuotaList).ListMeta} - for _, item := range obj.(*core.ResourceQuotaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts)) - -} - -// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Create(resourceQuota *core.ResourceQuota) (result *core.ResourceQuota, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &core.ResourceQuota{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ResourceQuota), err -} - -// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Update(resourceQuota *core.ResourceQuota) (result *core.ResourceQuota, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &core.ResourceQuota{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ResourceQuota), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *core.ResourceQuota) (*core.ResourceQuota, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &core.ResourceQuota{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ResourceQuota), err -} - -// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &core.ResourceQuota{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.ResourceQuotaList{}) - return err -} - -// Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ResourceQuota, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, pt, data, subresources...), &core.ResourceQuota{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ResourceQuota), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go deleted file mode 100644 index b3115a57b06e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeSecrets implements SecretInterface -type FakeSecrets struct { - Fake *FakeCore - ns string -} - -var secretsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "secrets"} - -var secretsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Secret"} - -// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *core.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(secretsResource, c.ns, name), &core.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Secret), err -} - -// List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *FakeSecrets) List(opts v1.ListOptions) (result *core.SecretList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &core.SecretList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.SecretList{ListMeta: obj.(*core.SecretList).ListMeta} - for _, item := range obj.(*core.SecretList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts)) - -} - -// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Create(secret *core.Secret) (result *core.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &core.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Secret), err -} - -// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Update(secret *core.Secret) (result *core.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &core.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Secret), err -} - -// Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &core.Secret{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.SecretList{}) - return err -} - -// Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &core.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Secret), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go deleted file mode 100644 index b2ff4027dd10..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeServices implements ServiceInterface -type FakeServices struct { - Fake *FakeCore - ns string -} - -var servicesResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "services"} - -var servicesKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "Service"} - -// Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *FakeServices) Get(name string, options v1.GetOptions) (result *core.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(servicesResource, c.ns, name), &core.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Service), err -} - -// List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *FakeServices) List(opts v1.ListOptions) (result *core.ServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &core.ServiceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ServiceList{ListMeta: obj.(*core.ServiceList).ListMeta} - for _, item := range obj.(*core.ServiceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts)) - -} - -// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Create(service *core.Service) (result *core.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &core.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Service), err -} - -// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Update(service *core.Service) (result *core.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &core.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Service), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServices) UpdateStatus(service *core.Service) (*core.Service, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &core.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Service), err -} - -// Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &core.Service{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.ServiceList{}) - return err -} - -// Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &core.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*core.Service), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go deleted file mode 100644 index 92e4930d7113..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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 fake - -import ( - restclient "k8s.io/client-go/rest" - core "k8s.io/client-go/testing" -) - -func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { - return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params)) -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go deleted file mode 100644 index 18f3b5a14c95..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - core "k8s.io/kubernetes/pkg/apis/core" -) - -// FakeServiceAccounts implements ServiceAccountInterface -type FakeServiceAccounts struct { - Fake *FakeCore - ns string -} - -var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "", Resource: "serviceaccounts"} - -var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "", Kind: "ServiceAccount"} - -// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *core.ServiceAccount, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &core.ServiceAccount{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ServiceAccount), err -} - -// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *core.ServiceAccountList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &core.ServiceAccountList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &core.ServiceAccountList{ListMeta: obj.(*core.ServiceAccountList).ListMeta} - for _, item := range obj.(*core.ServiceAccountList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts)) - -} - -// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Create(serviceAccount *core.ServiceAccount) (result *core.ServiceAccount, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &core.ServiceAccount{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ServiceAccount), err -} - -// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Update(serviceAccount *core.ServiceAccount) (result *core.ServiceAccount, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &core.ServiceAccount{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ServiceAccount), err -} - -// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &core.ServiceAccount{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &core.ServiceAccountList{}) - return err -} - -// Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ServiceAccount, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &core.ServiceAccount{}) - - if obj == nil { - return nil, err - } - return obj.(*core.ServiceAccount), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/generated_expansion.go deleted file mode 100644 index 641c922606ba..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/generated_expansion.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type ComponentStatusExpansion interface{} - -type ConfigMapExpansion interface{} - -type EndpointsExpansion interface{} - -type LimitRangeExpansion interface{} - -type PersistentVolumeExpansion interface{} - -type PersistentVolumeClaimExpansion interface{} - -type PodTemplateExpansion interface{} - -type ReplicationControllerExpansion interface{} - -type ResourceQuotaExpansion interface{} - -type SecretExpansion interface{} - -type ServiceAccountExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go deleted file mode 100644 index 4f765a5b8b43..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// LimitRangesGetter has a method to return a LimitRangeInterface. -// A group's client should implement this interface. -type LimitRangesGetter interface { - LimitRanges(namespace string) LimitRangeInterface -} - -// LimitRangeInterface has methods to work with LimitRange resources. -type LimitRangeInterface interface { - Create(*core.LimitRange) (*core.LimitRange, error) - Update(*core.LimitRange) (*core.LimitRange, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.LimitRange, error) - List(opts v1.ListOptions) (*core.LimitRangeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.LimitRange, err error) - LimitRangeExpansion -} - -// limitRanges implements LimitRangeInterface -type limitRanges struct { - client rest.Interface - ns string -} - -// newLimitRanges returns a LimitRanges -func newLimitRanges(c *CoreClient, namespace string) *limitRanges { - return &limitRanges{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *limitRanges) Get(name string, options v1.GetOptions) (result *core.LimitRange, err error) { - result = &core.LimitRange{} - err = c.client.Get(). - Namespace(c.ns). - Resource("limitranges"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts v1.ListOptions) (result *core.LimitRangeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.LimitRangeList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("limitranges"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("limitranges"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Create(limitRange *core.LimitRange) (result *core.LimitRange, err error) { - result = &core.LimitRange{} - err = c.client.Post(). - Namespace(c.ns). - Resource("limitranges"). - Body(limitRange). - Do(). - Into(result) - return -} - -// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Update(limitRange *core.LimitRange) (result *core.LimitRange, err error) { - result = &core.LimitRange{} - err = c.client.Put(). - Namespace(c.ns). - Resource("limitranges"). - Name(limitRange.Name). - Body(limitRange). - Do(). - Into(result) - return -} - -// Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("limitranges"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("limitranges"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.LimitRange, err error) { - result = &core.LimitRange{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("limitranges"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go deleted file mode 100644 index 33e2c106988c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// NamespacesGetter has a method to return a NamespaceInterface. -// A group's client should implement this interface. -type NamespacesGetter interface { - Namespaces() NamespaceInterface -} - -// NamespaceInterface has methods to work with Namespace resources. -type NamespaceInterface interface { - Create(*core.Namespace) (*core.Namespace, error) - Update(*core.Namespace) (*core.Namespace, error) - UpdateStatus(*core.Namespace) (*core.Namespace, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Namespace, error) - List(opts v1.ListOptions) (*core.NamespaceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Namespace, err error) - NamespaceExpansion -} - -// namespaces implements NamespaceInterface -type namespaces struct { - client rest.Interface -} - -// newNamespaces returns a Namespaces -func newNamespaces(c *CoreClient) *namespaces { - return &namespaces{ - client: c.RESTClient(), - } -} - -// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *namespaces) Get(name string, options v1.GetOptions) (result *core.Namespace, err error) { - result = &core.Namespace{} - err = c.client.Get(). - Resource("namespaces"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts v1.ListOptions) (result *core.NamespaceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.NamespaceList{} - err = c.client.Get(). - Resource("namespaces"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("namespaces"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Create(namespace *core.Namespace) (result *core.Namespace, err error) { - result = &core.Namespace{} - err = c.client.Post(). - Resource("namespaces"). - Body(namespace). - Do(). - Into(result) - return -} - -// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Update(namespace *core.Namespace) (result *core.Namespace, err error) { - result = &core.Namespace{} - err = c.client.Put(). - Resource("namespaces"). - Name(namespace.Name). - Body(namespace). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *namespaces) UpdateStatus(namespace *core.Namespace) (result *core.Namespace, err error) { - result = &core.Namespace{} - err = c.client.Put(). - Resource("namespaces"). - Name(namespace.Name). - SubResource("status"). - Body(namespace). - Do(). - Into(result) - return -} - -// Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("namespaces"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("namespaces"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Namespace, err error) { - result = &core.Namespace{} - err = c.client.Patch(pt). - Resource("namespaces"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace_expansion.go deleted file mode 100644 index 29c7bcf2e24b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace_expansion.go +++ /dev/null @@ -1,33 +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 internalversion - -import ( - api "k8s.io/kubernetes/pkg/apis/core" -) - -// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface. -type NamespaceExpansion interface { - Finalize(item *api.Namespace) (*api.Namespace, error) -} - -// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs. -func (c *namespaces) Finalize(namespace *api.Namespace) (result *api.Namespace, err error) { - result = &api.Namespace{} - err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go deleted file mode 100644 index c49058ab1f8a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// NodesGetter has a method to return a NodeInterface. -// A group's client should implement this interface. -type NodesGetter interface { - Nodes() NodeInterface -} - -// NodeInterface has methods to work with Node resources. -type NodeInterface interface { - Create(*core.Node) (*core.Node, error) - Update(*core.Node) (*core.Node, error) - UpdateStatus(*core.Node) (*core.Node, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Node, error) - List(opts v1.ListOptions) (*core.NodeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Node, err error) - NodeExpansion -} - -// nodes implements NodeInterface -type nodes struct { - client rest.Interface -} - -// newNodes returns a Nodes -func newNodes(c *CoreClient) *nodes { - return &nodes{ - client: c.RESTClient(), - } -} - -// Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *nodes) Get(name string, options v1.GetOptions) (result *core.Node, err error) { - result = &core.Node{} - err = c.client.Get(). - Resource("nodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts v1.ListOptions) (result *core.NodeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.NodeList{} - err = c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *nodes) Create(node *core.Node) (result *core.Node, err error) { - result = &core.Node{} - err = c.client.Post(). - Resource("nodes"). - Body(node). - Do(). - Into(result) - return -} - -// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *nodes) Update(node *core.Node) (result *core.Node, err error) { - result = &core.Node{} - err = c.client.Put(). - Resource("nodes"). - Name(node.Name). - Body(node). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *nodes) UpdateStatus(node *core.Node) (result *core.Node, err error) { - result = &core.Node{} - err = c.client.Put(). - Resource("nodes"). - Name(node.Name). - SubResource("status"). - Body(node). - Do(). - Into(result) - return -} - -// Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("nodes"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("nodes"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Node, err error) { - result = &core.Node{} - err = c.client.Patch(pt). - Resource("nodes"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go deleted file mode 100644 index 8e29d5f1ef0b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go +++ /dev/null @@ -1,43 +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 internalversion - -import ( - "k8s.io/apimachinery/pkg/types" - api "k8s.io/kubernetes/pkg/apis/core" -) - -// The NodeExpansion interface allows manually adding extra methods to the NodeInterface. -type NodeExpansion interface { - // PatchStatus modifies the status of an existing node. It returns the copy - // of the node that the server returns, or an error. - PatchStatus(nodeName string, data []byte) (*api.Node, error) -} - -// PatchStatus modifies the status of an existing node. It returns the copy of -// the node that the server returns, or an error. -func (c *nodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) { - result := &api.Node{} - err := c.client.Patch(types.StrategicMergePatchType). - Resource("nodes"). - Name(nodeName). - SubResource("status"). - Body(data). - Do(). - Into(result) - return result, err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go deleted file mode 100644 index 017ad6eee111..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PersistentVolumesGetter has a method to return a PersistentVolumeInterface. -// A group's client should implement this interface. -type PersistentVolumesGetter interface { - PersistentVolumes() PersistentVolumeInterface -} - -// PersistentVolumeInterface has methods to work with PersistentVolume resources. -type PersistentVolumeInterface interface { - Create(*core.PersistentVolume) (*core.PersistentVolume, error) - Update(*core.PersistentVolume) (*core.PersistentVolume, error) - UpdateStatus(*core.PersistentVolume) (*core.PersistentVolume, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.PersistentVolume, error) - List(opts v1.ListOptions) (*core.PersistentVolumeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolume, err error) - PersistentVolumeExpansion -} - -// persistentVolumes implements PersistentVolumeInterface -type persistentVolumes struct { - client rest.Interface -} - -// newPersistentVolumes returns a PersistentVolumes -func newPersistentVolumes(c *CoreClient) *persistentVolumes { - return &persistentVolumes{ - client: c.RESTClient(), - } -} - -// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *persistentVolumes) Get(name string, options v1.GetOptions) (result *core.PersistentVolume, err error) { - result = &core.PersistentVolume{} - err = c.client.Get(). - Resource("persistentvolumes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts v1.ListOptions) (result *core.PersistentVolumeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.PersistentVolumeList{} - err = c.client.Get(). - Resource("persistentvolumes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("persistentvolumes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Create(persistentVolume *core.PersistentVolume) (result *core.PersistentVolume, err error) { - result = &core.PersistentVolume{} - err = c.client.Post(). - Resource("persistentvolumes"). - Body(persistentVolume). - Do(). - Into(result) - return -} - -// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Update(persistentVolume *core.PersistentVolume) (result *core.PersistentVolume, err error) { - result = &core.PersistentVolume{} - err = c.client.Put(). - Resource("persistentvolumes"). - Name(persistentVolume.Name). - Body(persistentVolume). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumes) UpdateStatus(persistentVolume *core.PersistentVolume) (result *core.PersistentVolume, err error) { - result = &core.PersistentVolume{} - err = c.client.Put(). - Resource("persistentvolumes"). - Name(persistentVolume.Name). - SubResource("status"). - Body(persistentVolume). - Do(). - Into(result) - return -} - -// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("persistentvolumes"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("persistentvolumes"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolume, err error) { - result = &core.PersistentVolume{} - err = c.client.Patch(pt). - Resource("persistentvolumes"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go deleted file mode 100644 index ed260b9f4cd0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. -// A group's client should implement this interface. -type PersistentVolumeClaimsGetter interface { - PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface -} - -// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources. -type PersistentVolumeClaimInterface interface { - Create(*core.PersistentVolumeClaim) (*core.PersistentVolumeClaim, error) - Update(*core.PersistentVolumeClaim) (*core.PersistentVolumeClaim, error) - UpdateStatus(*core.PersistentVolumeClaim) (*core.PersistentVolumeClaim, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.PersistentVolumeClaim, error) - List(opts v1.ListOptions) (*core.PersistentVolumeClaimList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolumeClaim, err error) - PersistentVolumeClaimExpansion -} - -// persistentVolumeClaims implements PersistentVolumeClaimInterface -type persistentVolumeClaims struct { - client rest.Interface - ns string -} - -// newPersistentVolumeClaims returns a PersistentVolumeClaims -func newPersistentVolumeClaims(c *CoreClient, namespace string) *persistentVolumeClaims { - return &persistentVolumeClaims{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *persistentVolumeClaims) Get(name string, options v1.GetOptions) (result *core.PersistentVolumeClaim, err error) { - result = &core.PersistentVolumeClaim{} - err = c.client.Get(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *core.PersistentVolumeClaimList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.PersistentVolumeClaimList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Create(persistentVolumeClaim *core.PersistentVolumeClaim) (result *core.PersistentVolumeClaim, err error) { - result = &core.PersistentVolumeClaim{} - err = c.client.Post(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - Body(persistentVolumeClaim). - Do(). - Into(result) - return -} - -// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Update(persistentVolumeClaim *core.PersistentVolumeClaim) (result *core.PersistentVolumeClaim, err error) { - result = &core.PersistentVolumeClaim{} - err = c.client.Put(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - Name(persistentVolumeClaim.Name). - Body(persistentVolumeClaim). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *core.PersistentVolumeClaim) (result *core.PersistentVolumeClaim, err error) { - result = &core.PersistentVolumeClaim{} - err = c.client.Put(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - Name(persistentVolumeClaim.Name). - SubResource("status"). - Body(persistentVolumeClaim). - Do(). - Into(result) - return -} - -// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PersistentVolumeClaim, err error) { - result = &core.PersistentVolumeClaim{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("persistentvolumeclaims"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go deleted file mode 100644 index faa40c200a6b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PodsGetter has a method to return a PodInterface. -// A group's client should implement this interface. -type PodsGetter interface { - Pods(namespace string) PodInterface -} - -// PodInterface has methods to work with Pod resources. -type PodInterface interface { - Create(*core.Pod) (*core.Pod, error) - Update(*core.Pod) (*core.Pod, error) - UpdateStatus(*core.Pod) (*core.Pod, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Pod, error) - List(opts v1.ListOptions) (*core.PodList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Pod, err error) - PodExpansion -} - -// pods implements PodInterface -type pods struct { - client rest.Interface - ns string -} - -// newPods returns a Pods -func newPods(c *CoreClient, namespace string) *pods { - return &pods{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *pods) Get(name string, options v1.GetOptions) (result *core.Pod, err error) { - result = &core.Pod{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts v1.ListOptions) (result *core.PodList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.PodList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Create(pod *core.Pod) (result *core.Pod, err error) { - result = &core.Pod{} - err = c.client.Post(). - Namespace(c.ns). - Resource("pods"). - Body(pod). - Do(). - Into(result) - return -} - -// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Update(pod *core.Pod) (result *core.Pod, err error) { - result = &core.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(pod.Name). - Body(pod). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *pods) UpdateStatus(pod *core.Pod) (result *core.Pod, err error) { - result = &core.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(pod.Name). - SubResource("status"). - Body(pod). - Do(). - Into(result) - return -} - -// Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("pods"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Pod, err error) { - result = &core.Pod{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("pods"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go deleted file mode 100644 index 86fead7cced7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go +++ /dev/null @@ -1,39 +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 internalversion - -import ( - restclient "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/api/legacyscheme" - api "k8s.io/kubernetes/pkg/apis/core" -) - -// The PodExpansion interface allows manually adding extra methods to the PodInterface. -type PodExpansion interface { - Bind(binding *api.Binding) error - GetLogs(name string, opts *api.PodLogOptions) *restclient.Request -} - -// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). -func (c *pods) Bind(binding *api.Binding) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error() -} - -// Get constructs a request for getting the logs for a pod -func (c *pods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Request { - return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, legacyscheme.ParameterCodec) -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go deleted file mode 100644 index 6ef974d2b3b7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PodTemplatesGetter has a method to return a PodTemplateInterface. -// A group's client should implement this interface. -type PodTemplatesGetter interface { - PodTemplates(namespace string) PodTemplateInterface -} - -// PodTemplateInterface has methods to work with PodTemplate resources. -type PodTemplateInterface interface { - Create(*core.PodTemplate) (*core.PodTemplate, error) - Update(*core.PodTemplate) (*core.PodTemplate, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.PodTemplate, error) - List(opts v1.ListOptions) (*core.PodTemplateList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PodTemplate, err error) - PodTemplateExpansion -} - -// podTemplates implements PodTemplateInterface -type podTemplates struct { - client rest.Interface - ns string -} - -// newPodTemplates returns a PodTemplates -func newPodTemplates(c *CoreClient, namespace string) *podTemplates { - return &podTemplates{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *podTemplates) Get(name string, options v1.GetOptions) (result *core.PodTemplate, err error) { - result = &core.PodTemplate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("podtemplates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts v1.ListOptions) (result *core.PodTemplateList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.PodTemplateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("podtemplates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("podtemplates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Create(podTemplate *core.PodTemplate) (result *core.PodTemplate, err error) { - result = &core.PodTemplate{} - err = c.client.Post(). - Namespace(c.ns). - Resource("podtemplates"). - Body(podTemplate). - Do(). - Into(result) - return -} - -// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Update(podTemplate *core.PodTemplate) (result *core.PodTemplate, err error) { - result = &core.PodTemplate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("podtemplates"). - Name(podTemplate.Name). - Body(podTemplate). - Do(). - Into(result) - return -} - -// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("podtemplates"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("podtemplates"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.PodTemplate, err error) { - result = &core.PodTemplate{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("podtemplates"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go deleted file mode 100644 index cda95f2527e5..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ReplicationControllersGetter has a method to return a ReplicationControllerInterface. -// A group's client should implement this interface. -type ReplicationControllersGetter interface { - ReplicationControllers(namespace string) ReplicationControllerInterface -} - -// ReplicationControllerInterface has methods to work with ReplicationController resources. -type ReplicationControllerInterface interface { - Create(*core.ReplicationController) (*core.ReplicationController, error) - Update(*core.ReplicationController) (*core.ReplicationController, error) - UpdateStatus(*core.ReplicationController) (*core.ReplicationController, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.ReplicationController, error) - List(opts v1.ListOptions) (*core.ReplicationControllerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ReplicationController, err error) - GetScale(replicationControllerName string, options v1.GetOptions) (*autoscaling.Scale, error) - UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) - - ReplicationControllerExpansion -} - -// replicationControllers implements ReplicationControllerInterface -type replicationControllers struct { - client rest.Interface - ns string -} - -// newReplicationControllers returns a ReplicationControllers -func newReplicationControllers(c *CoreClient, namespace string) *replicationControllers { - return &replicationControllers{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *replicationControllers) Get(name string, options v1.GetOptions) (result *core.ReplicationController, err error) { - result = &core.ReplicationController{} - err = c.client.Get(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts v1.ListOptions) (result *core.ReplicationControllerList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ReplicationControllerList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("replicationcontrollers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("replicationcontrollers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Create(replicationController *core.ReplicationController) (result *core.ReplicationController, err error) { - result = &core.ReplicationController{} - err = c.client.Post(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Body(replicationController). - Do(). - Into(result) - return -} - -// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Update(replicationController *core.ReplicationController) (result *core.ReplicationController, err error) { - result = &core.ReplicationController{} - err = c.client.Put(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(replicationController.Name). - Body(replicationController). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicationControllers) UpdateStatus(replicationController *core.ReplicationController) (result *core.ReplicationController, err error) { - result = &core.ReplicationController{} - err = c.client.Put(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(replicationController.Name). - SubResource("status"). - Body(replicationController). - Do(). - Into(result) - return -} - -// Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("replicationcontrollers"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ReplicationController, err error) { - result = &core.ReplicationController{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("replicationcontrollers"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} - -// GetScale takes name of the replicationController, and returns the corresponding autoscaling.Scale object, and an error if there is any. -func (c *replicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { - result = &autoscaling.Scale{} - err = c.client.Get(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(replicationControllerName). - SubResource("scale"). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicationControllers) UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { - result = &autoscaling.Scale{} - err = c.client.Put(). - Namespace(c.ns). - Resource("replicationcontrollers"). - Name(replicationControllerName). - SubResource("scale"). - Body(scale). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go deleted file mode 100644 index 5ad2d4b8ca12..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ResourceQuotasGetter has a method to return a ResourceQuotaInterface. -// A group's client should implement this interface. -type ResourceQuotasGetter interface { - ResourceQuotas(namespace string) ResourceQuotaInterface -} - -// ResourceQuotaInterface has methods to work with ResourceQuota resources. -type ResourceQuotaInterface interface { - Create(*core.ResourceQuota) (*core.ResourceQuota, error) - Update(*core.ResourceQuota) (*core.ResourceQuota, error) - UpdateStatus(*core.ResourceQuota) (*core.ResourceQuota, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.ResourceQuota, error) - List(opts v1.ListOptions) (*core.ResourceQuotaList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ResourceQuota, err error) - ResourceQuotaExpansion -} - -// resourceQuotas implements ResourceQuotaInterface -type resourceQuotas struct { - client rest.Interface - ns string -} - -// newResourceQuotas returns a ResourceQuotas -func newResourceQuotas(c *CoreClient, namespace string) *resourceQuotas { - return &resourceQuotas{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *resourceQuotas) Get(name string, options v1.GetOptions) (result *core.ResourceQuota, err error) { - result = &core.ResourceQuota{} - err = c.client.Get(). - Namespace(c.ns). - Resource("resourcequotas"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts v1.ListOptions) (result *core.ResourceQuotaList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ResourceQuotaList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("resourcequotas"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("resourcequotas"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Create(resourceQuota *core.ResourceQuota) (result *core.ResourceQuota, err error) { - result = &core.ResourceQuota{} - err = c.client.Post(). - Namespace(c.ns). - Resource("resourcequotas"). - Body(resourceQuota). - Do(). - Into(result) - return -} - -// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Update(resourceQuota *core.ResourceQuota) (result *core.ResourceQuota, err error) { - result = &core.ResourceQuota{} - err = c.client.Put(). - Namespace(c.ns). - Resource("resourcequotas"). - Name(resourceQuota.Name). - Body(resourceQuota). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *resourceQuotas) UpdateStatus(resourceQuota *core.ResourceQuota) (result *core.ResourceQuota, err error) { - result = &core.ResourceQuota{} - err = c.client.Put(). - Namespace(c.ns). - Resource("resourcequotas"). - Name(resourceQuota.Name). - SubResource("status"). - Body(resourceQuota). - Do(). - Into(result) - return -} - -// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("resourcequotas"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("resourcequotas"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ResourceQuota, err error) { - result = &core.ResourceQuota{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("resourcequotas"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go deleted file mode 100644 index aea79ff03671..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// SecretsGetter has a method to return a SecretInterface. -// A group's client should implement this interface. -type SecretsGetter interface { - Secrets(namespace string) SecretInterface -} - -// SecretInterface has methods to work with Secret resources. -type SecretInterface interface { - Create(*core.Secret) (*core.Secret, error) - Update(*core.Secret) (*core.Secret, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Secret, error) - List(opts v1.ListOptions) (*core.SecretList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Secret, err error) - SecretExpansion -} - -// secrets implements SecretInterface -type secrets struct { - client rest.Interface - ns string -} - -// newSecrets returns a Secrets -func newSecrets(c *CoreClient, namespace string) *secrets { - return &secrets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *secrets) Get(name string, options v1.GetOptions) (result *core.Secret, err error) { - result = &core.Secret{} - err = c.client.Get(). - Namespace(c.ns). - Resource("secrets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts v1.ListOptions) (result *core.SecretList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.SecretList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Create(secret *core.Secret) (result *core.Secret, err error) { - result = &core.Secret{} - err = c.client.Post(). - Namespace(c.ns). - Resource("secrets"). - Body(secret). - Do(). - Into(result) - return -} - -// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Update(secret *core.Secret) (result *core.Secret, err error) { - result = &core.Secret{} - err = c.client.Put(). - Namespace(c.ns). - Resource("secrets"). - Name(secret.Name). - Body(secret). - Do(). - Into(result) - return -} - -// Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("secrets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Secret, err error) { - result = &core.Secret{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("secrets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go deleted file mode 100644 index df8830871c7a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ServicesGetter has a method to return a ServiceInterface. -// A group's client should implement this interface. -type ServicesGetter interface { - Services(namespace string) ServiceInterface -} - -// ServiceInterface has methods to work with Service resources. -type ServiceInterface interface { - Create(*core.Service) (*core.Service, error) - Update(*core.Service) (*core.Service, error) - UpdateStatus(*core.Service) (*core.Service, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.Service, error) - List(opts v1.ListOptions) (*core.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Service, err error) - ServiceExpansion -} - -// services implements ServiceInterface -type services struct { - client rest.Interface - ns string -} - -// newServices returns a Services -func newServices(c *CoreClient, namespace string) *services { - return &services{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options v1.GetOptions) (result *core.Service, err error) { - result = &core.Service{} - err = c.client.Get(). - Namespace(c.ns). - Resource("services"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *core.ServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ServiceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(service *core.Service) (result *core.Service, err error) { - result = &core.Service{} - err = c.client.Post(). - Namespace(c.ns). - Resource("services"). - Body(service). - Do(). - Into(result) - return -} - -// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(service *core.Service) (result *core.Service, err error) { - result = &core.Service{} - err = c.client.Put(). - Namespace(c.ns). - Resource("services"). - Name(service.Name). - Body(service). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(service *core.Service) (result *core.Service, err error) { - result = &core.Service{} - err = c.client.Put(). - Namespace(c.ns). - Resource("services"). - Name(service.Name). - SubResource("status"). - Body(service). - Do(). - Into(result) - return -} - -// Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("services"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.Service, err error) { - result = &core.Service{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("services"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go deleted file mode 100644 index 247d0682bdfc..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go +++ /dev/null @@ -1,41 +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 internalversion - -import ( - "k8s.io/apimachinery/pkg/util/net" - restclient "k8s.io/client-go/rest" -) - -// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. -type ServiceExpansion interface { - ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper -} - -// ProxyGet returns a response of the service by calling it through the proxy. -func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { - request := c.client.Get(). - Namespace(c.ns). - Resource("services"). - SubResource("proxy"). - Name(net.JoinSchemeNamePort(scheme, name, port)). - Suffix(path) - for k, v := range params { - request = request.Param(k, v) - } - return request -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go deleted file mode 100644 index 99578c1ee7dc..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - core "k8s.io/kubernetes/pkg/apis/core" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ServiceAccountsGetter has a method to return a ServiceAccountInterface. -// A group's client should implement this interface. -type ServiceAccountsGetter interface { - ServiceAccounts(namespace string) ServiceAccountInterface -} - -// ServiceAccountInterface has methods to work with ServiceAccount resources. -type ServiceAccountInterface interface { - Create(*core.ServiceAccount) (*core.ServiceAccount, error) - Update(*core.ServiceAccount) (*core.ServiceAccount, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*core.ServiceAccount, error) - List(opts v1.ListOptions) (*core.ServiceAccountList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ServiceAccount, err error) - ServiceAccountExpansion -} - -// serviceAccounts implements ServiceAccountInterface -type serviceAccounts struct { - client rest.Interface - ns string -} - -// newServiceAccounts returns a ServiceAccounts -func newServiceAccounts(c *CoreClient, namespace string) *serviceAccounts { - return &serviceAccounts{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *serviceAccounts) Get(name string, options v1.GetOptions) (result *core.ServiceAccount, err error) { - result = &core.ServiceAccount{} - err = c.client.Get(). - Namespace(c.ns). - Resource("serviceaccounts"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts v1.ListOptions) (result *core.ServiceAccountList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &core.ServiceAccountList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("serviceaccounts"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("serviceaccounts"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Create(serviceAccount *core.ServiceAccount) (result *core.ServiceAccount, err error) { - result = &core.ServiceAccount{} - err = c.client.Post(). - Namespace(c.ns). - Resource("serviceaccounts"). - Body(serviceAccount). - Do(). - Into(result) - return -} - -// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Update(serviceAccount *core.ServiceAccount) (result *core.ServiceAccount, err error) { - result = &core.ServiceAccount{} - err = c.client.Put(). - Namespace(c.ns). - Resource("serviceaccounts"). - Name(serviceAccount.Name). - Body(serviceAccount). - Do(). - Into(result) - return -} - -// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("serviceaccounts"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("serviceaccounts"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ServiceAccount, err error) { - result = &core.ServiceAccount{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("serviceaccounts"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/BUILD deleted file mode 100644 index c0cec91f54c9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "events_client.go", - "generated_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion", - visibility = ["//visibility:public"], - deps = [ - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/events_client.go b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/events_client.go deleted file mode 100644 index 9eb8b7c523fa..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/events_client.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type EventsInterface interface { - RESTClient() rest.Interface -} - -// EventsClient is used to interact with features provided by the events.k8s.io group. -type EventsClient struct { - restClient rest.Interface -} - -// NewForConfig creates a new EventsClient for the given config. -func NewForConfig(c *rest.Config) (*EventsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &EventsClient{client}, nil -} - -// NewForConfigOrDie creates a new EventsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *EventsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new EventsClient for the given RESTClient. -func New(c rest.Interface) *EventsClient { - return &EventsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("events.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("events.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *EventsClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/BUILD deleted file mode 100644 index 75dede3f4da0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_events_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/fake_events_client.go b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/fake_events_client.go deleted file mode 100644 index b538a24ff0e0..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/fake/fake_events_client.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeEvents struct { - *testing.Fake -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeEvents) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/events/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD deleted file mode 100644 index b8183a36d953..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "extensions_client.go", - "generated_expansion.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion", - deps = [ - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go deleted file mode 100644 index 44e27ced7ae6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type ExtensionsInterface interface { - RESTClient() rest.Interface -} - -// ExtensionsClient is used to interact with features provided by the extensions group. -type ExtensionsClient struct { - restClient rest.Interface -} - -// NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ExtensionsClient{client}, nil -} - -// NewForConfigOrDie creates a new ExtensionsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ExtensionsClient for the given RESTClient. -func New(c rest.Interface) *ExtensionsClient { - return &ExtensionsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("extensions")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("extensions")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ExtensionsClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD deleted file mode 100644 index 8cbc1291eae7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_extensions_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake", - deps = [ - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go deleted file mode 100644 index 925f4dd8d90c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeExtensions struct { - *testing.Fake -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeExtensions) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/BUILD deleted file mode 100644 index 3c861d7b8cc1..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "ingress.go", - "networking_client.go", - "networkpolicy.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion", - deps = [ - "//pkg/apis/networking:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/BUILD deleted file mode 100644 index 634e59569b0b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_ingress.go", - "fake_networking_client.go", - "fake_networkpolicy.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake", - deps = [ - "//pkg/apis/networking:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/networking/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_ingress.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_ingress.go deleted file mode 100644 index 424b762357ef..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_ingress.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - networking "k8s.io/kubernetes/pkg/apis/networking" -) - -// FakeIngresses implements IngressInterface -type FakeIngresses struct { - Fake *FakeNetworking - ns string -} - -var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "", Resource: "ingresses"} - -var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "", Kind: "Ingress"} - -// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *networking.Ingress, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &networking.Ingress{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.Ingress), err -} - -// List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *FakeIngresses) List(opts v1.ListOptions) (result *networking.IngressList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &networking.IngressList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &networking.IngressList{ListMeta: obj.(*networking.IngressList).ListMeta} - for _, item := range obj.(*networking.IngressList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) - -} - -// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Create(ingress *networking.Ingress) (result *networking.Ingress, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &networking.Ingress{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.Ingress), err -} - -// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Update(ingress *networking.Ingress) (result *networking.Ingress, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &networking.Ingress{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.Ingress), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngresses) UpdateStatus(ingress *networking.Ingress) (*networking.Ingress, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &networking.Ingress{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.Ingress), err -} - -// Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &networking.Ingress{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &networking.IngressList{}) - return err -} - -// Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.Ingress, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &networking.Ingress{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.Ingress), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networking_client.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networking_client.go deleted file mode 100644 index c30fb6defb43..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networking_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion" -) - -type FakeNetworking struct { - *testing.Fake -} - -func (c *FakeNetworking) Ingresses(namespace string) internalversion.IngressInterface { - return &FakeIngresses{c, namespace} -} - -func (c *FakeNetworking) NetworkPolicies(namespace string) internalversion.NetworkPolicyInterface { - return &FakeNetworkPolicies{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeNetworking) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networkpolicy.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networkpolicy.go deleted file mode 100644 index 55581f760108..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/fake/fake_networkpolicy.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - networking "k8s.io/kubernetes/pkg/apis/networking" -) - -// FakeNetworkPolicies implements NetworkPolicyInterface -type FakeNetworkPolicies struct { - Fake *FakeNetworking - ns string -} - -var networkpoliciesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "", Resource: "networkpolicies"} - -var networkpoliciesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "", Kind: "NetworkPolicy"} - -// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networking.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networking.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.NetworkPolicy), err -} - -// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networking.NetworkPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networking.NetworkPolicyList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &networking.NetworkPolicyList{ListMeta: obj.(*networking.NetworkPolicyList).ListMeta} - for _, item := range obj.(*networking.NetworkPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) - -} - -// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(networkPolicy *networking.NetworkPolicy) (result *networking.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networking.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.NetworkPolicy), err -} - -// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(networkPolicy *networking.NetworkPolicy) (result *networking.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networking.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.NetworkPolicy), err -} - -// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networking.NetworkPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &networking.NetworkPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &networking.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networking.NetworkPolicy), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/generated_expansion.go deleted file mode 100644 index d7e2a55283a6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type IngressExpansion interface{} - -type NetworkPolicyExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/ingress.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/ingress.go deleted file mode 100644 index 89fbe0538b94..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/ingress.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - networking "k8s.io/kubernetes/pkg/apis/networking" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// IngressesGetter has a method to return a IngressInterface. -// A group's client should implement this interface. -type IngressesGetter interface { - Ingresses(namespace string) IngressInterface -} - -// IngressInterface has methods to work with Ingress resources. -type IngressInterface interface { - Create(*networking.Ingress) (*networking.Ingress, error) - Update(*networking.Ingress) (*networking.Ingress, error) - UpdateStatus(*networking.Ingress) (*networking.Ingress, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*networking.Ingress, error) - List(opts v1.ListOptions) (*networking.IngressList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.Ingress, err error) - IngressExpansion -} - -// ingresses implements IngressInterface -type ingresses struct { - client rest.Interface - ns string -} - -// newIngresses returns a Ingresses -func newIngresses(c *NetworkingClient, namespace string) *ingresses { - return &ingresses{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string, options v1.GetOptions) (result *networking.Ingress, err error) { - result = &networking.Ingress{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts v1.ListOptions) (result *networking.IngressList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &networking.IngressList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ingress *networking.Ingress) (result *networking.Ingress, err error) { - result = &networking.Ingress{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ingresses"). - Body(ingress). - Do(). - Into(result) - return -} - -// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ingress *networking.Ingress) (result *networking.Ingress, err error) { - result = &networking.Ingress{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ingresses"). - Name(ingress.Name). - Body(ingress). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *ingresses) UpdateStatus(ingress *networking.Ingress) (result *networking.Ingress, err error) { - result = &networking.Ingress{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ingresses"). - Name(ingress.Name). - SubResource("status"). - Body(ingress). - Do(). - Into(result) - return -} - -// Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ingresses"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ingresses"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.Ingress, err error) { - result = &networking.Ingress{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ingresses"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networking_client.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networking_client.go deleted file mode 100644 index 0a875a16e1bd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networking_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type NetworkingInterface interface { - RESTClient() rest.Interface - IngressesGetter - NetworkPoliciesGetter -} - -// NetworkingClient is used to interact with features provided by the networking.k8s.io group. -type NetworkingClient struct { - restClient rest.Interface -} - -func (c *NetworkingClient) Ingresses(namespace string) IngressInterface { - return newIngresses(c, namespace) -} - -func (c *NetworkingClient) NetworkPolicies(namespace string) NetworkPolicyInterface { - return newNetworkPolicies(c, namespace) -} - -// NewForConfig creates a new NetworkingClient for the given config. -func NewForConfig(c *rest.Config) (*NetworkingClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &NetworkingClient{client}, nil -} - -// NewForConfigOrDie creates a new NetworkingClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *NetworkingClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new NetworkingClient for the given RESTClient. -func New(c rest.Interface) *NetworkingClient { - return &NetworkingClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("networking.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("networking.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *NetworkingClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networkpolicy.go b/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networkpolicy.go deleted file mode 100644 index d0e8533bf77b..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/networking/internalversion/networkpolicy.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - networking "k8s.io/kubernetes/pkg/apis/networking" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. -// A group's client should implement this interface. -type NetworkPoliciesGetter interface { - NetworkPolicies(namespace string) NetworkPolicyInterface -} - -// NetworkPolicyInterface has methods to work with NetworkPolicy resources. -type NetworkPolicyInterface interface { - Create(*networking.NetworkPolicy) (*networking.NetworkPolicy, error) - Update(*networking.NetworkPolicy) (*networking.NetworkPolicy, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*networking.NetworkPolicy, error) - List(opts v1.ListOptions) (*networking.NetworkPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.NetworkPolicy, err error) - NetworkPolicyExpansion -} - -// networkPolicies implements NetworkPolicyInterface -type networkPolicies struct { - client rest.Interface - ns string -} - -// newNetworkPolicies returns a NetworkPolicies -func newNetworkPolicies(c *NetworkingClient, namespace string) *networkPolicies { - return &networkPolicies{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *networkPolicies) Get(name string, options v1.GetOptions) (result *networking.NetworkPolicy, err error) { - result = &networking.NetworkPolicy{} - err = c.client.Get(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(opts v1.ListOptions) (result *networking.NetworkPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &networking.NetworkPolicyList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Create(networkPolicy *networking.NetworkPolicy) (result *networking.NetworkPolicy, err error) { - result = &networking.NetworkPolicy{} - err = c.client.Post(). - Namespace(c.ns). - Resource("networkpolicies"). - Body(networkPolicy). - Do(). - Into(result) - return -} - -// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Update(networkPolicy *networking.NetworkPolicy) (result *networking.NetworkPolicy, err error) { - result = &networking.NetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(networkPolicy.Name). - Body(networkPolicy). - Do(). - Into(result) - return -} - -// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking.NetworkPolicy, err error) { - result = &networking.NetworkPolicy{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("networkpolicies"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/BUILD deleted file mode 100644 index 9412b076abe6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "node_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/node/internalversion", - visibility = ["//visibility:public"], - deps = [ - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/BUILD deleted file mode 100644 index cafe1c046f65..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_node_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/fake_node_client.go b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/fake_node_client.go deleted file mode 100644 index cec4ba4e1dc1..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/fake/fake_node_client.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeNode struct { - *testing.Fake -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeNode) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/generated_expansion.go deleted file mode 100644 index 1b59c8431cea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/node_client.go b/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/node_client.go deleted file mode 100644 index 103f942b1b58..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/node/internalversion/node_client.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type NodeInterface interface { - RESTClient() rest.Interface -} - -// NodeClient is used to interact with features provided by the node.k8s.io group. -type NodeClient struct { - restClient rest.Interface -} - -// NewForConfig creates a new NodeClient for the given config. -func NewForConfig(c *rest.Config) (*NodeClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &NodeClient{client}, nil -} - -// NewForConfigOrDie creates a new NodeClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *NodeClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new NodeClient for the given RESTClient. -func New(c rest.Interface) *NodeClient { - return &NodeClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("node.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("node.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *NodeClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD deleted file mode 100644 index d362133a4cf4..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "eviction.go", - "eviction_expansion.go", - "generated_expansion.go", - "poddisruptionbudget.go", - "podsecuritypolicy.go", - "policy_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion", - deps = [ - "//pkg/apis/policy:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go deleted file mode 100644 index 37297cbb877f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// EvictionsGetter has a method to return a EvictionInterface. -// A group's client should implement this interface. -type EvictionsGetter interface { - Evictions(namespace string) EvictionInterface -} - -// EvictionInterface has methods to work with Eviction resources. -type EvictionInterface interface { - EvictionExpansion -} - -// evictions implements EvictionInterface -type evictions struct { - client rest.Interface - ns string -} - -// newEvictions returns a Evictions -func newEvictions(c *PolicyClient, namespace string) *evictions { - return &evictions{ - client: c.RESTClient(), - ns: namespace, - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction_expansion.go deleted file mode 100644 index 8e2030101bf8..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction_expansion.go +++ /dev/null @@ -1,38 +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 internalversion - -import ( - policy "k8s.io/kubernetes/pkg/apis/policy" -) - -// The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface. -type EvictionExpansion interface { - Evict(eviction *policy.Eviction) error -} - -func (c *evictions) Evict(eviction *policy.Eviction) error { - return c.client.Post(). - AbsPath("/api/v1"). - Namespace(eviction.Namespace). - Resource("pods"). - Name(eviction.Name). - SubResource("eviction"). - Body(eviction). - Do(). - Error() -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD deleted file mode 100644 index ce06d82bb419..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_eviction.go", - "fake_eviction_expansion.go", - "fake_poddisruptionbudget.go", - "fake_podsecuritypolicy.go", - "fake_policy_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake", - deps = [ - "//pkg/apis/policy:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction.go deleted file mode 100644 index ef12b0d80b98..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -// FakeEvictions implements EvictionInterface -type FakeEvictions struct { - Fake *FakePolicy - ns string -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction_expansion.go deleted file mode 100644 index a4d721876d40..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_eviction_expansion.go +++ /dev/null @@ -1,35 +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 fake - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - core "k8s.io/client-go/testing" - policy "k8s.io/kubernetes/pkg/apis/policy" -) - -func (c *FakeEvictions) Evict(eviction *policy.Eviction) error { - action := core.CreateActionImpl{} - action.Verb = "create" - action.Namespace = c.ns - action.Resource = schema.GroupVersionResource{Group: "", Version: "", Resource: "pods"} - action.Subresource = "eviction" - action.Object = eviction - - _, err := c.Fake.Invokes(action, eviction) - return err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go deleted file mode 100644 index 00d8ba8b7b91..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - policy "k8s.io/kubernetes/pkg/apis/policy" -) - -// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface -type FakePodDisruptionBudgets struct { - Fake *FakePolicy - ns string -} - -var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "", Resource: "poddisruptionbudgets"} - -var poddisruptionbudgetsKind = schema.GroupVersionKind{Group: "policy", Version: "", Kind: "PodDisruptionBudget"} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *FakePodDisruptionBudgets) Get(name string, options v1.GetOptions) (result *policy.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &policy.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*policy.PodDisruptionBudget), err -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(poddisruptionbudgetsResource, poddisruptionbudgetsKind, c.ns, opts), &policy.PodDisruptionBudgetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &policy.PodDisruptionBudgetList{ListMeta: obj.(*policy.PodDisruptionBudgetList).ListMeta} - for _, item := range obj.(*policy.PodDisruptionBudgetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) - -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &policy.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*policy.PodDisruptionBudget), err -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &policy.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*policy.PodDisruptionBudget), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &policy.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*policy.PodDisruptionBudget), err -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &policy.PodDisruptionBudget{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &policy.PodDisruptionBudgetList{}) - return err -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, pt, data, subresources...), &policy.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*policy.PodDisruptionBudget), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_podsecuritypolicy.go deleted file mode 100644 index 40f21965b2e9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_podsecuritypolicy.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - policy "k8s.io/kubernetes/pkg/apis/policy" -) - -// FakePodSecurityPolicies implements PodSecurityPolicyInterface -type FakePodSecurityPolicies struct { - Fake *FakePolicy -} - -var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "policy", Version: "", Resource: "podsecuritypolicies"} - -var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "policy", Version: "", Kind: "PodSecurityPolicy"} - -// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (result *policy.PodSecurityPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &policy.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policy.PodSecurityPolicy), err -} - -// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *policy.PodSecurityPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &policy.PodSecurityPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &policy.PodSecurityPolicyList{ListMeta: obj.(*policy.PodSecurityPolicyList).ListMeta} - for _, item := range obj.(*policy.PodSecurityPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) -} - -// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *policy.PodSecurityPolicy) (result *policy.PodSecurityPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &policy.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policy.PodSecurityPolicy), err -} - -// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *policy.PodSecurityPolicy) (result *policy.PodSecurityPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &policy.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policy.PodSecurityPolicy), err -} - -// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(podsecuritypoliciesResource, name), &policy.PodSecurityPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) - - _, err := c.Fake.Invokes(action, &policy.PodSecurityPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodSecurityPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &policy.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policy.PodSecurityPolicy), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go deleted file mode 100644 index 91a0f7ca34d4..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" -) - -type FakePolicy struct { - *testing.Fake -} - -func (c *FakePolicy) Evictions(namespace string) internalversion.EvictionInterface { - return &FakeEvictions{c, namespace} -} - -func (c *FakePolicy) PodDisruptionBudgets(namespace string) internalversion.PodDisruptionBudgetInterface { - return &FakePodDisruptionBudgets{c, namespace} -} - -func (c *FakePolicy) PodSecurityPolicies() internalversion.PodSecurityPolicyInterface { - return &FakePodSecurityPolicies{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakePolicy) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/generated_expansion.go deleted file mode 100644 index a3ff5ba028ab..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type PodDisruptionBudgetExpansion interface{} - -type PodSecurityPolicyExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go deleted file mode 100644 index 5985a5be0ab9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - policy "k8s.io/kubernetes/pkg/apis/policy" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. -// A group's client should implement this interface. -type PodDisruptionBudgetsGetter interface { - PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface -} - -// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. -type PodDisruptionBudgetInterface interface { - Create(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) - Update(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) - UpdateStatus(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*policy.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*policy.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) - PodDisruptionBudgetExpansion -} - -// podDisruptionBudgets implements PodDisruptionBudgetInterface -type podDisruptionBudgets struct { - client rest.Interface - ns string -} - -// newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyClient, namespace string) *podDisruptionBudgets { - return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *policy.PodDisruptionBudget, err error) { - result = &policy.PodDisruptionBudget{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &policy.PodDisruptionBudgetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) { - result = &policy.PodDisruptionBudget{} - err = c.client.Post(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) { - result = &policy.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *policy.PodDisruptionBudget) (result *policy.PodDisruptionBudget, err error) { - result = &policy.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - SubResource("status"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { - result = &policy.PodDisruptionBudget{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/podsecuritypolicy.go deleted file mode 100644 index 9ee7b09530c1..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/podsecuritypolicy.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - policy "k8s.io/kubernetes/pkg/apis/policy" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. -// A group's client should implement this interface. -type PodSecurityPoliciesGetter interface { - PodSecurityPolicies() PodSecurityPolicyInterface -} - -// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. -type PodSecurityPolicyInterface interface { - Create(*policy.PodSecurityPolicy) (*policy.PodSecurityPolicy, error) - Update(*policy.PodSecurityPolicy) (*policy.PodSecurityPolicy, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*policy.PodSecurityPolicy, error) - List(opts v1.ListOptions) (*policy.PodSecurityPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodSecurityPolicy, err error) - PodSecurityPolicyExpansion -} - -// podSecurityPolicies implements PodSecurityPolicyInterface -type podSecurityPolicies struct { - client rest.Interface -} - -// newPodSecurityPolicies returns a PodSecurityPolicies -func newPodSecurityPolicies(c *PolicyClient) *podSecurityPolicies { - return &podSecurityPolicies{ - client: c.RESTClient(), - } -} - -// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *policy.PodSecurityPolicy, err error) { - result = &policy.PodSecurityPolicy{} - err = c.client.Get(). - Resource("podsecuritypolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *policy.PodSecurityPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &policy.PodSecurityPolicyList{} - err = c.client.Get(). - Resource("podsecuritypolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("podsecuritypolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Create(podSecurityPolicy *policy.PodSecurityPolicy) (result *policy.PodSecurityPolicy, err error) { - result = &policy.PodSecurityPolicy{} - err = c.client.Post(). - Resource("podsecuritypolicies"). - Body(podSecurityPolicy). - Do(). - Into(result) - return -} - -// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Update(podSecurityPolicy *policy.PodSecurityPolicy) (result *policy.PodSecurityPolicy, err error) { - result = &policy.PodSecurityPolicy{} - err = c.client.Put(). - Resource("podsecuritypolicies"). - Name(podSecurityPolicy.Name). - Body(podSecurityPolicy). - Do(). - Into(result) - return -} - -// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("podsecuritypolicies"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("podsecuritypolicies"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodSecurityPolicy, err error) { - result = &policy.PodSecurityPolicy{} - err = c.client.Patch(pt). - Resource("podsecuritypolicies"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go b/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go deleted file mode 100644 index 8040244dd5bd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type PolicyInterface interface { - RESTClient() rest.Interface - EvictionsGetter - PodDisruptionBudgetsGetter - PodSecurityPoliciesGetter -} - -// PolicyClient is used to interact with features provided by the policy group. -type PolicyClient struct { - restClient rest.Interface -} - -func (c *PolicyClient) Evictions(namespace string) EvictionInterface { - return newEvictions(c, namespace) -} - -func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) -} - -func (c *PolicyClient) PodSecurityPolicies() PodSecurityPolicyInterface { - return newPodSecurityPolicies(c) -} - -// NewForConfig creates a new PolicyClient for the given config. -func NewForConfig(c *rest.Config) (*PolicyClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PolicyClient{client}, nil -} - -// NewForConfigOrDie creates a new PolicyClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicyClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PolicyClient for the given RESTClient. -func New(c rest.Interface) *PolicyClient { - return &PolicyClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("policy")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("policy")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PolicyClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD deleted file mode 100644 index dc26ce1b3a3e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "doc.go", - "generated_expansion.go", - "rbac_client.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion", - deps = [ - "//pkg/apis/rbac:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go deleted file mode 100644 index 7e9394d4a937..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - rbac "k8s.io/kubernetes/pkg/apis/rbac" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ClusterRolesGetter has a method to return a ClusterRoleInterface. -// A group's client should implement this interface. -type ClusterRolesGetter interface { - ClusterRoles() ClusterRoleInterface -} - -// ClusterRoleInterface has methods to work with ClusterRole resources. -type ClusterRoleInterface interface { - Create(*rbac.ClusterRole) (*rbac.ClusterRole, error) - Update(*rbac.ClusterRole) (*rbac.ClusterRole, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*rbac.ClusterRole, error) - List(opts v1.ListOptions) (*rbac.ClusterRoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) - ClusterRoleExpansion -} - -// clusterRoles implements ClusterRoleInterface -type clusterRoles struct { - client rest.Interface -} - -// newClusterRoles returns a ClusterRoles -func newClusterRoles(c *RbacClient) *clusterRoles { - return &clusterRoles{ - client: c.RESTClient(), - } -} - -// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *rbac.ClusterRole, err error) { - result = &rbac.ClusterRole{} - err = c.client.Get(). - Resource("clusterroles"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &rbac.ClusterRoleList{} - err = c.client.Get(). - Resource("clusterroles"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("clusterroles"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) { - result = &rbac.ClusterRole{} - err = c.client.Post(). - Resource("clusterroles"). - Body(clusterRole). - Do(). - Into(result) - return -} - -// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) { - result = &rbac.ClusterRole{} - err = c.client.Put(). - Resource("clusterroles"). - Name(clusterRole.Name). - Body(clusterRole). - Do(). - Into(result) - return -} - -// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("clusterroles"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("clusterroles"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { - result = &rbac.ClusterRole{} - err = c.client.Patch(pt). - Resource("clusterroles"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go deleted file mode 100644 index f6a06750a66a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - rbac "k8s.io/kubernetes/pkg/apis/rbac" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. -// A group's client should implement this interface. -type ClusterRoleBindingsGetter interface { - ClusterRoleBindings() ClusterRoleBindingInterface -} - -// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. -type ClusterRoleBindingInterface interface { - Create(*rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) - Update(*rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*rbac.ClusterRoleBinding, error) - List(opts v1.ListOptions) (*rbac.ClusterRoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) - ClusterRoleBindingExpansion -} - -// clusterRoleBindings implements ClusterRoleBindingInterface -type clusterRoleBindings struct { - client rest.Interface -} - -// newClusterRoleBindings returns a ClusterRoleBindings -func newClusterRoleBindings(c *RbacClient) *clusterRoleBindings { - return &clusterRoleBindings{ - client: c.RESTClient(), - } -} - -// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbac.ClusterRoleBinding, err error) { - result = &rbac.ClusterRoleBinding{} - err = c.client.Get(). - Resource("clusterrolebindings"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &rbac.ClusterRoleBindingList{} - err = c.client.Get(). - Resource("clusterrolebindings"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("clusterrolebindings"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) { - result = &rbac.ClusterRoleBinding{} - err = c.client.Post(). - Resource("clusterrolebindings"). - Body(clusterRoleBinding). - Do(). - Into(result) - return -} - -// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) { - result = &rbac.ClusterRoleBinding{} - err = c.client.Put(). - Resource("clusterrolebindings"). - Name(clusterRoleBinding.Name). - Body(clusterRoleBinding). - Do(). - Into(result) - return -} - -// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("clusterrolebindings"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("clusterrolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { - result = &rbac.ClusterRoleBinding{} - err = c.client.Patch(pt). - Resource("clusterrolebindings"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD deleted file mode 100644 index 0bc6f89e5002..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_clusterrole.go", - "fake_clusterrolebinding.go", - "fake_rbac_client.go", - "fake_role.go", - "fake_rolebinding.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake", - deps = [ - "//pkg/apis/rbac:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go deleted file mode 100644 index adff093a8380..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - rbac "k8s.io/kubernetes/pkg/apis/rbac" -) - -// FakeClusterRoles implements ClusterRoleInterface -type FakeClusterRoles struct { - Fake *FakeRbac -} - -var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "", Resource: "clusterroles"} - -var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "", Kind: "ClusterRole"} - -// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbac.ClusterRole, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbac.ClusterRole{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRole), err -} - -// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbac.ClusterRoleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &rbac.ClusterRoleList{ListMeta: obj.(*rbac.ClusterRoleList).ListMeta} - for _, item := range obj.(*rbac.ClusterRoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) -} - -// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Create(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbac.ClusterRole{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRole), err -} - -// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbac.ClusterRole{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRole), err -} - -// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbac.ClusterRole{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) - - _, err := c.Fake.Invokes(action, &rbac.ClusterRoleList{}) - return err -} - -// Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &rbac.ClusterRole{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRole), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go deleted file mode 100644 index 25dd7c16f4e3..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - rbac "k8s.io/kubernetes/pkg/apis/rbac" -) - -// FakeClusterRoleBindings implements ClusterRoleBindingInterface -type FakeClusterRoleBindings struct { - Fake *FakeRbac -} - -var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "", Resource: "clusterrolebindings"} - -var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "", Kind: "ClusterRoleBinding"} - -// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbac.ClusterRoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbac.ClusterRoleBinding{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRoleBinding), err -} - -// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbac.ClusterRoleBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &rbac.ClusterRoleBindingList{ListMeta: obj.(*rbac.ClusterRoleBindingList).ListMeta} - for _, item := range obj.(*rbac.ClusterRoleBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) -} - -// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac.ClusterRoleBinding{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRoleBinding), err -} - -// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbac.ClusterRoleBinding) (result *rbac.ClusterRoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac.ClusterRoleBinding{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRoleBinding), err -} - -// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbac.ClusterRoleBinding{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) - - _, err := c.Fake.Invokes(action, &rbac.ClusterRoleBindingList{}) - return err -} - -// Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &rbac.ClusterRoleBinding{}) - if obj == nil { - return nil, err - } - return obj.(*rbac.ClusterRoleBinding), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go deleted file mode 100644 index 2827f14dc10e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" -) - -type FakeRbac struct { - *testing.Fake -} - -func (c *FakeRbac) ClusterRoles() internalversion.ClusterRoleInterface { - return &FakeClusterRoles{c} -} - -func (c *FakeRbac) ClusterRoleBindings() internalversion.ClusterRoleBindingInterface { - return &FakeClusterRoleBindings{c} -} - -func (c *FakeRbac) Roles(namespace string) internalversion.RoleInterface { - return &FakeRoles{c, namespace} -} - -func (c *FakeRbac) RoleBindings(namespace string) internalversion.RoleBindingInterface { - return &FakeRoleBindings{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeRbac) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go deleted file mode 100644 index e072a018be0e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - rbac "k8s.io/kubernetes/pkg/apis/rbac" -) - -// FakeRoles implements RoleInterface -type FakeRoles struct { - Fake *FakeRbac - ns string -} - -var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "", Resource: "roles"} - -var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "", Kind: "Role"} - -// Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbac.Role, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbac.Role{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.Role), err -} - -// List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbac.RoleList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &rbac.RoleList{ListMeta: obj.(*rbac.RoleList).ListMeta} - for _, item := range obj.(*rbac.RoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) - -} - -// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Create(role *rbac.Role) (result *rbac.Role, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbac.Role{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.Role), err -} - -// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Update(role *rbac.Role) (result *rbac.Role, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbac.Role{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.Role), err -} - -// Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbac.Role{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &rbac.RoleList{}) - return err -} - -// Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &rbac.Role{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.Role), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go deleted file mode 100644 index 238fd75a7833..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - rbac "k8s.io/kubernetes/pkg/apis/rbac" -) - -// FakeRoleBindings implements RoleBindingInterface -type FakeRoleBindings struct { - Fake *FakeRbac - ns string -} - -var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "", Resource: "rolebindings"} - -var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "", Kind: "RoleBinding"} - -// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbac.RoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbac.RoleBinding{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.RoleBinding), err -} - -// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbac.RoleBindingList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &rbac.RoleBindingList{ListMeta: obj.(*rbac.RoleBindingList).ListMeta} - for _, item := range obj.(*rbac.RoleBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) - -} - -// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Create(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbac.RoleBinding{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.RoleBinding), err -} - -// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Update(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbac.RoleBinding{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.RoleBinding), err -} - -// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbac.RoleBinding{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &rbac.RoleBindingList{}) - return err -} - -// Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &rbac.RoleBinding{}) - - if obj == nil { - return nil, err - } - return obj.(*rbac.RoleBinding), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/generated_expansion.go deleted file mode 100644 index bd6d9237d921..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/generated_expansion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type ClusterRoleExpansion interface{} - -type ClusterRoleBindingExpansion interface{} - -type RoleExpansion interface{} - -type RoleBindingExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go deleted file mode 100644 index 269fe8791fea..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type RbacInterface interface { - RESTClient() rest.Interface - ClusterRolesGetter - ClusterRoleBindingsGetter - RolesGetter - RoleBindingsGetter -} - -// RbacClient is used to interact with features provided by the rbac.authorization.k8s.io group. -type RbacClient struct { - restClient rest.Interface -} - -func (c *RbacClient) ClusterRoles() ClusterRoleInterface { - return newClusterRoles(c) -} - -func (c *RbacClient) ClusterRoleBindings() ClusterRoleBindingInterface { - return newClusterRoleBindings(c) -} - -func (c *RbacClient) Roles(namespace string) RoleInterface { - return newRoles(c, namespace) -} - -func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface { - return newRoleBindings(c, namespace) -} - -// NewForConfig creates a new RbacClient for the given config. -func NewForConfig(c *rest.Config) (*RbacClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &RbacClient{client}, nil -} - -// NewForConfigOrDie creates a new RbacClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *RbacClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new RbacClient for the given RESTClient. -func New(c rest.Interface) *RbacClient { - return &RbacClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("rbac.authorization.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("rbac.authorization.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *RbacClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go deleted file mode 100644 index 903388150efb..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - rbac "k8s.io/kubernetes/pkg/apis/rbac" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// RolesGetter has a method to return a RoleInterface. -// A group's client should implement this interface. -type RolesGetter interface { - Roles(namespace string) RoleInterface -} - -// RoleInterface has methods to work with Role resources. -type RoleInterface interface { - Create(*rbac.Role) (*rbac.Role, error) - Update(*rbac.Role) (*rbac.Role, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*rbac.Role, error) - List(opts v1.ListOptions) (*rbac.RoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) - RoleExpansion -} - -// roles implements RoleInterface -type roles struct { - client rest.Interface - ns string -} - -// newRoles returns a Roles -func newRoles(c *RbacClient, namespace string) *roles { - return &roles{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options v1.GetOptions) (result *rbac.Role, err error) { - result = &rbac.Role{} - err = c.client.Get(). - Namespace(c.ns). - Resource("roles"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &rbac.RoleList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("roles"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("roles"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(role *rbac.Role) (result *rbac.Role, err error) { - result = &rbac.Role{} - err = c.client.Post(). - Namespace(c.ns). - Resource("roles"). - Body(role). - Do(). - Into(result) - return -} - -// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(role *rbac.Role) (result *rbac.Role, err error) { - result = &rbac.Role{} - err = c.client.Put(). - Namespace(c.ns). - Resource("roles"). - Name(role.Name). - Body(role). - Do(). - Into(result) - return -} - -// Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("roles"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("roles"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { - result = &rbac.Role{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("roles"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go deleted file mode 100644 index 0315e69bb398..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - rbac "k8s.io/kubernetes/pkg/apis/rbac" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// RoleBindingsGetter has a method to return a RoleBindingInterface. -// A group's client should implement this interface. -type RoleBindingsGetter interface { - RoleBindings(namespace string) RoleBindingInterface -} - -// RoleBindingInterface has methods to work with RoleBinding resources. -type RoleBindingInterface interface { - Create(*rbac.RoleBinding) (*rbac.RoleBinding, error) - Update(*rbac.RoleBinding) (*rbac.RoleBinding, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*rbac.RoleBinding, error) - List(opts v1.ListOptions) (*rbac.RoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) - RoleBindingExpansion -} - -// roleBindings implements RoleBindingInterface -type roleBindings struct { - client rest.Interface - ns string -} - -// newRoleBindings returns a RoleBindings -func newRoleBindings(c *RbacClient, namespace string) *roleBindings { - return &roleBindings{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options v1.GetOptions) (result *rbac.RoleBinding, err error) { - result = &rbac.RoleBinding{} - err = c.client.Get(). - Namespace(c.ns). - Resource("rolebindings"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &rbac.RoleBindingList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("rolebindings"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("rolebindings"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) { - result = &rbac.RoleBinding{} - err = c.client.Post(). - Namespace(c.ns). - Resource("rolebindings"). - Body(roleBinding). - Do(). - Into(result) - return -} - -// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(roleBinding *rbac.RoleBinding) (result *rbac.RoleBinding, err error) { - result = &rbac.RoleBinding{} - err = c.client.Put(). - Namespace(c.ns). - Resource("rolebindings"). - Name(roleBinding.Name). - Body(roleBinding). - Do(). - Into(result) - return -} - -// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("rolebindings"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("rolebindings"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { - result = &rbac.RoleBinding{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("rolebindings"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/BUILD deleted file mode 100644 index 2daca996481a..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "priorityclass.go", - "scheduling_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion", - deps = [ - "//pkg/apis/scheduling:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/BUILD deleted file mode 100644 index 54bc63affc61..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_priorityclass.go", - "fake_scheduling_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake", - deps = [ - "//pkg/apis/scheduling:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_priorityclass.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_priorityclass.go deleted file mode 100644 index cfdce84149ed..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_priorityclass.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - scheduling "k8s.io/kubernetes/pkg/apis/scheduling" -) - -// FakePriorityClasses implements PriorityClassInterface -type FakePriorityClasses struct { - Fake *FakeScheduling -} - -var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s.io", Version: "", Resource: "priorityclasses"} - -var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "", Kind: "PriorityClass"} - -// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *scheduling.PriorityClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(priorityclassesResource, name), &scheduling.PriorityClass{}) - if obj == nil { - return nil, err - } - return obj.(*scheduling.PriorityClass), err -} - -// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *scheduling.PriorityClassList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &scheduling.PriorityClassList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &scheduling.PriorityClassList{ListMeta: obj.(*scheduling.PriorityClassList).ListMeta} - for _, item := range obj.(*scheduling.PriorityClassList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *FakePriorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) -} - -// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(priorityClass *scheduling.PriorityClass) (result *scheduling.PriorityClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &scheduling.PriorityClass{}) - if obj == nil { - return nil, err - } - return obj.(*scheduling.PriorityClass), err -} - -// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(priorityClass *scheduling.PriorityClass) (result *scheduling.PriorityClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &scheduling.PriorityClass{}) - if obj == nil { - return nil, err - } - return obj.(*scheduling.PriorityClass), err -} - -// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *FakePriorityClasses) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(priorityclassesResource, name), &scheduling.PriorityClass{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePriorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOptions) - - _, err := c.Fake.Invokes(action, &scheduling.PriorityClassList{}) - return err -} - -// Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *scheduling.PriorityClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &scheduling.PriorityClass{}) - if obj == nil { - return nil, err - } - return obj.(*scheduling.PriorityClass), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_scheduling_client.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_scheduling_client.go deleted file mode 100644 index 0bbb4abfd71c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/fake/fake_scheduling_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion" -) - -type FakeScheduling struct { - *testing.Fake -} - -func (c *FakeScheduling) PriorityClasses() internalversion.PriorityClassInterface { - return &FakePriorityClasses{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeScheduling) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/generated_expansion.go deleted file mode 100644 index df00c75e80c4..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type PriorityClassExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/priorityclass.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/priorityclass.go deleted file mode 100644 index 18a4329946c7..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/priorityclass.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - scheduling "k8s.io/kubernetes/pkg/apis/scheduling" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PriorityClassesGetter has a method to return a PriorityClassInterface. -// A group's client should implement this interface. -type PriorityClassesGetter interface { - PriorityClasses() PriorityClassInterface -} - -// PriorityClassInterface has methods to work with PriorityClass resources. -type PriorityClassInterface interface { - Create(*scheduling.PriorityClass) (*scheduling.PriorityClass, error) - Update(*scheduling.PriorityClass) (*scheduling.PriorityClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*scheduling.PriorityClass, error) - List(opts v1.ListOptions) (*scheduling.PriorityClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *scheduling.PriorityClass, err error) - PriorityClassExpansion -} - -// priorityClasses implements PriorityClassInterface -type priorityClasses struct { - client rest.Interface -} - -// newPriorityClasses returns a PriorityClasses -func newPriorityClasses(c *SchedulingClient) *priorityClasses { - return &priorityClasses{ - client: c.RESTClient(), - } -} - -// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. -func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *scheduling.PriorityClass, err error) { - result = &scheduling.PriorityClass{} - err = c.client.Get(). - Resource("priorityclasses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. -func (c *priorityClasses) List(opts v1.ListOptions) (result *scheduling.PriorityClassList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &scheduling.PriorityClassList{} - err = c.client.Get(). - Resource("priorityclasses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested priorityClasses. -func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("priorityclasses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(priorityClass *scheduling.PriorityClass) (result *scheduling.PriorityClass, err error) { - result = &scheduling.PriorityClass{} - err = c.client.Post(). - Resource("priorityclasses"). - Body(priorityClass). - Do(). - Into(result) - return -} - -// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(priorityClass *scheduling.PriorityClass) (result *scheduling.PriorityClass, err error) { - result = &scheduling.PriorityClass{} - err = c.client.Put(). - Resource("priorityclasses"). - Name(priorityClass.Name). - Body(priorityClass). - Do(). - Into(result) - return -} - -// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. -func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("priorityclasses"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("priorityclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *scheduling.PriorityClass, err error) { - result = &scheduling.PriorityClass{} - err = c.client.Patch(pt). - Resource("priorityclasses"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/scheduling_client.go b/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/scheduling_client.go deleted file mode 100644 index c30bb6f4d677..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion/scheduling_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type SchedulingInterface interface { - RESTClient() rest.Interface - PriorityClassesGetter -} - -// SchedulingClient is used to interact with features provided by the scheduling.k8s.io group. -type SchedulingClient struct { - restClient rest.Interface -} - -func (c *SchedulingClient) PriorityClasses() PriorityClassInterface { - return newPriorityClasses(c) -} - -// NewForConfig creates a new SchedulingClient for the given config. -func NewForConfig(c *rest.Config) (*SchedulingClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &SchedulingClient{client}, nil -} - -// NewForConfigOrDie creates a new SchedulingClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *SchedulingClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new SchedulingClient for the given RESTClient. -func New(c rest.Interface) *SchedulingClient { - return &SchedulingClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("scheduling.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("scheduling.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *SchedulingClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD deleted file mode 100644 index 7d6e7b82c376..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "podpreset.go", - "settings_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion", - deps = [ - "//pkg/apis/settings:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD deleted file mode 100644 index 261105866c6c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_podpreset.go", - "fake_settings_client.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake", - deps = [ - "//pkg/apis/settings:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/settings/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go deleted file mode 100644 index cc9f4085a7f9..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_podpreset.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - settings "k8s.io/kubernetes/pkg/apis/settings" -) - -// FakePodPresets implements PodPresetInterface -type FakePodPresets struct { - Fake *FakeSettings - ns string -} - -var podpresetsResource = schema.GroupVersionResource{Group: "settings.k8s.io", Version: "", Resource: "podpresets"} - -var podpresetsKind = schema.GroupVersionKind{Group: "settings.k8s.io", Version: "", Kind: "PodPreset"} - -// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any. -func (c *FakePodPresets) Get(name string, options v1.GetOptions) (result *settings.PodPreset, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podpresetsResource, c.ns, name), &settings.PodPreset{}) - - if obj == nil { - return nil, err - } - return obj.(*settings.PodPreset), err -} - -// List takes label and field selectors, and returns the list of PodPresets that match those selectors. -func (c *FakePodPresets) List(opts v1.ListOptions) (result *settings.PodPresetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podpresetsResource, podpresetsKind, c.ns, opts), &settings.PodPresetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &settings.PodPresetList{ListMeta: obj.(*settings.PodPresetList).ListMeta} - for _, item := range obj.(*settings.PodPresetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podPresets. -func (c *FakePodPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podpresetsResource, c.ns, opts)) - -} - -// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Create(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &settings.PodPreset{}) - - if obj == nil { - return nil, err - } - return obj.(*settings.PodPreset), err -} - -// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Update(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &settings.PodPreset{}) - - if obj == nil { - return nil, err - } - return obj.(*settings.PodPreset), err -} - -// Delete takes name of the podPreset and deletes it. Returns an error if one occurs. -func (c *FakePodPresets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(podpresetsResource, c.ns, name), &settings.PodPreset{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podpresetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &settings.PodPresetList{}) - return err -} - -// Patch applies the patch and returns the patched podPreset. -func (c *FakePodPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, pt, data, subresources...), &settings.PodPreset{}) - - if obj == nil { - return nil, err - } - return obj.(*settings.PodPreset), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go deleted file mode 100644 index a79d665e1861..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/fake/fake_settings_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion" -) - -type FakeSettings struct { - *testing.Fake -} - -func (c *FakeSettings) PodPresets(namespace string) internalversion.PodPresetInterface { - return &FakePodPresets{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeSettings) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go deleted file mode 100644 index e673a5ca8b65..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type PodPresetExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go deleted file mode 100644 index bf99269060da..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/podpreset.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - settings "k8s.io/kubernetes/pkg/apis/settings" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// PodPresetsGetter has a method to return a PodPresetInterface. -// A group's client should implement this interface. -type PodPresetsGetter interface { - PodPresets(namespace string) PodPresetInterface -} - -// PodPresetInterface has methods to work with PodPreset resources. -type PodPresetInterface interface { - Create(*settings.PodPreset) (*settings.PodPreset, error) - Update(*settings.PodPreset) (*settings.PodPreset, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*settings.PodPreset, error) - List(opts v1.ListOptions) (*settings.PodPresetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error) - PodPresetExpansion -} - -// podPresets implements PodPresetInterface -type podPresets struct { - client rest.Interface - ns string -} - -// newPodPresets returns a PodPresets -func newPodPresets(c *SettingsClient, namespace string) *podPresets { - return &podPresets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any. -func (c *podPresets) Get(name string, options v1.GetOptions) (result *settings.PodPreset, err error) { - result = &settings.PodPreset{} - err = c.client.Get(). - Namespace(c.ns). - Resource("podpresets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodPresets that match those selectors. -func (c *podPresets) List(opts v1.ListOptions) (result *settings.PodPresetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &settings.PodPresetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("podpresets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podPresets. -func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("podpresets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Create(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) { - result = &settings.PodPreset{} - err = c.client.Post(). - Namespace(c.ns). - Resource("podpresets"). - Body(podPreset). - Do(). - Into(result) - return -} - -// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Update(podPreset *settings.PodPreset) (result *settings.PodPreset, err error) { - result = &settings.PodPreset{} - err = c.client.Put(). - Namespace(c.ns). - Resource("podpresets"). - Name(podPreset.Name). - Body(podPreset). - Do(). - Into(result) - return -} - -// Delete takes name of the podPreset and deletes it. Returns an error if one occurs. -func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("podpresets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("podpresets"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched podPreset. -func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *settings.PodPreset, err error) { - result = &settings.PodPreset{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("podpresets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go b/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go deleted file mode 100644 index 8c365dc6f9e6..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/settings/internalversion/settings_client.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type SettingsInterface interface { - RESTClient() rest.Interface - PodPresetsGetter -} - -// SettingsClient is used to interact with features provided by the settings.k8s.io group. -type SettingsClient struct { - restClient rest.Interface -} - -func (c *SettingsClient) PodPresets(namespace string) PodPresetInterface { - return newPodPresets(c, namespace) -} - -// NewForConfig creates a new SettingsClient for the given config. -func NewForConfig(c *rest.Config) (*SettingsClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &SettingsClient{client}, nil -} - -// NewForConfigOrDie creates a new SettingsClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *SettingsClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new SettingsClient for the given RESTClient. -func New(c rest.Interface) *SettingsClient { - return &SettingsClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("settings.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("settings.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *SettingsClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD deleted file mode 100644 index 56402f0e3dc8..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "csidriver.go", - "csinode.go", - "doc.go", - "generated_expansion.go", - "storage_client.go", - "storageclass.go", - "volumeattachment.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion", - deps = [ - "//pkg/apis/storage:go_default_library", - "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csidriver.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csidriver.go deleted file mode 100644 index 438969207f96..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csidriver.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - storage "k8s.io/kubernetes/pkg/apis/storage" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// CSIDriversGetter has a method to return a CSIDriverInterface. -// A group's client should implement this interface. -type CSIDriversGetter interface { - CSIDrivers() CSIDriverInterface -} - -// CSIDriverInterface has methods to work with CSIDriver resources. -type CSIDriverInterface interface { - Create(*storage.CSIDriver) (*storage.CSIDriver, error) - Update(*storage.CSIDriver) (*storage.CSIDriver, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*storage.CSIDriver, error) - List(opts v1.ListOptions) (*storage.CSIDriverList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error) - CSIDriverExpansion -} - -// cSIDrivers implements CSIDriverInterface -type cSIDrivers struct { - client rest.Interface -} - -// newCSIDrivers returns a CSIDrivers -func newCSIDrivers(c *StorageClient) *cSIDrivers { - return &cSIDrivers{ - client: c.RESTClient(), - } -} - -// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. -func (c *cSIDrivers) Get(name string, options v1.GetOptions) (result *storage.CSIDriver, err error) { - result = &storage.CSIDriver{} - err = c.client.Get(). - Resource("csidrivers"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. -func (c *cSIDrivers) List(opts v1.ListOptions) (result *storage.CSIDriverList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &storage.CSIDriverList{} - err = c.client.Get(). - Resource("csidrivers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested cSIDrivers. -func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("csidrivers"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Create(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) { - result = &storage.CSIDriver{} - err = c.client.Post(). - Resource("csidrivers"). - Body(cSIDriver). - Do(). - Into(result) - return -} - -// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Update(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) { - result = &storage.CSIDriver{} - err = c.client.Put(). - Resource("csidrivers"). - Name(cSIDriver.Name). - Body(cSIDriver). - Do(). - Into(result) - return -} - -// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *cSIDrivers) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("csidrivers"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *cSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("csidrivers"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched cSIDriver. -func (c *cSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error) { - result = &storage.CSIDriver{} - err = c.client.Patch(pt). - Resource("csidrivers"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csinode.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csinode.go deleted file mode 100644 index b1d926fcdf9c..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/csinode.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - storage "k8s.io/kubernetes/pkg/apis/storage" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// CSINodesGetter has a method to return a CSINodeInterface. -// A group's client should implement this interface. -type CSINodesGetter interface { - CSINodes() CSINodeInterface -} - -// CSINodeInterface has methods to work with CSINode resources. -type CSINodeInterface interface { - Create(*storage.CSINode) (*storage.CSINode, error) - Update(*storage.CSINode) (*storage.CSINode, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*storage.CSINode, error) - List(opts v1.ListOptions) (*storage.CSINodeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error) - CSINodeExpansion -} - -// cSINodes implements CSINodeInterface -type cSINodes struct { - client rest.Interface -} - -// newCSINodes returns a CSINodes -func newCSINodes(c *StorageClient) *cSINodes { - return &cSINodes{ - client: c.RESTClient(), - } -} - -// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *cSINodes) Get(name string, options v1.GetOptions) (result *storage.CSINode, err error) { - result = &storage.CSINode{} - err = c.client.Get(). - Resource("csinodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *cSINodes) List(opts v1.ListOptions) (result *storage.CSINodeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &storage.CSINodeList{} - err = c.client.Get(). - Resource("csinodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested cSINodes. -func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("csinodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Create(cSINode *storage.CSINode) (result *storage.CSINode, err error) { - result = &storage.CSINode{} - err = c.client.Post(). - Resource("csinodes"). - Body(cSINode). - Do(). - Into(result) - return -} - -// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Update(cSINode *storage.CSINode) (result *storage.CSINode, err error) { - result = &storage.CSINode{} - err = c.client.Put(). - Resource("csinodes"). - Name(cSINode.Name). - Body(cSINode). - Do(). - Into(result) - return -} - -// Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *cSINodes) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("csinodes"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *cSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("csinodes"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched cSINode. -func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error) { - result = &storage.CSINode{} - err = c.client.Patch(pt). - Resource("csinodes"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/doc.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/doc.go deleted file mode 100644 index 86602442babd..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package internalversion diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD deleted file mode 100644 index 335907eb4d2f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_csidriver.go", - "fake_csinode.go", - "fake_storage_client.go", - "fake_storageclass.go", - "fake_volumeattachment.go", - ], - importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake", - deps = [ - "//pkg/apis/storage:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/doc.go deleted file mode 100644 index 16f44399065e..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csidriver.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csidriver.go deleted file mode 100644 index cf34374d0984..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csidriver.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - storage "k8s.io/kubernetes/pkg/apis/storage" -) - -// FakeCSIDrivers implements CSIDriverInterface -type FakeCSIDrivers struct { - Fake *FakeStorage -} - -var csidriversResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "csidrivers"} - -var csidriversKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "CSIDriver"} - -// Get takes name of the cSIDriver, and returns the corresponding cSIDriver object, and an error if there is any. -func (c *FakeCSIDrivers) Get(name string, options v1.GetOptions) (result *storage.CSIDriver, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(csidriversResource, name), &storage.CSIDriver{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSIDriver), err -} - -// List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. -func (c *FakeCSIDrivers) List(opts v1.ListOptions) (result *storage.CSIDriverList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(csidriversResource, csidriversKind, opts), &storage.CSIDriverList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &storage.CSIDriverList{ListMeta: obj.(*storage.CSIDriverList).ListMeta} - for _, item := range obj.(*storage.CSIDriverList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cSIDrivers. -func (c *FakeCSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(csidriversResource, opts)) -} - -// Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Create(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &storage.CSIDriver{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSIDriver), err -} - -// Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Update(cSIDriver *storage.CSIDriver) (result *storage.CSIDriver, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &storage.CSIDriver{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSIDriver), err -} - -// Delete takes name of the cSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeCSIDrivers) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(csidriversResource, name), &storage.CSIDriver{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csidriversResource, listOptions) - - _, err := c.Fake.Invokes(action, &storage.CSIDriverList{}) - return err -} - -// Patch applies the patch and returns the patched cSIDriver. -func (c *FakeCSIDrivers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSIDriver, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &storage.CSIDriver{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSIDriver), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csinode.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csinode.go deleted file mode 100644 index fc6df1b914bc..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_csinode.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - storage "k8s.io/kubernetes/pkg/apis/storage" -) - -// FakeCSINodes implements CSINodeInterface -type FakeCSINodes struct { - Fake *FakeStorage -} - -var csinodesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "csinodes"} - -var csinodesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "CSINode"} - -// Get takes name of the cSINode, and returns the corresponding cSINode object, and an error if there is any. -func (c *FakeCSINodes) Get(name string, options v1.GetOptions) (result *storage.CSINode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(csinodesResource, name), &storage.CSINode{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSINode), err -} - -// List takes label and field selectors, and returns the list of CSINodes that match those selectors. -func (c *FakeCSINodes) List(opts v1.ListOptions) (result *storage.CSINodeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(csinodesResource, csinodesKind, opts), &storage.CSINodeList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &storage.CSINodeList{ListMeta: obj.(*storage.CSINodeList).ListMeta} - for _, item := range obj.(*storage.CSINodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cSINodes. -func (c *FakeCSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(csinodesResource, opts)) -} - -// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Create(cSINode *storage.CSINode) (result *storage.CSINode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &storage.CSINode{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSINode), err -} - -// Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Update(cSINode *storage.CSINode) (result *storage.CSINode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &storage.CSINode{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSINode), err -} - -// Delete takes name of the cSINode and deletes it. Returns an error if one occurs. -func (c *FakeCSINodes) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(csinodesResource, name), &storage.CSINode{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(csinodesResource, listOptions) - - _, err := c.Fake.Invokes(action, &storage.CSINodeList{}) - return err -} - -// Patch applies the patch and returns the patched cSINode. -func (c *FakeCSINodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.CSINode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &storage.CSINode{}) - if obj == nil { - return nil, err - } - return obj.(*storage.CSINode), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go deleted file mode 100644 index 9b8cb5eb8ea2..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" -) - -type FakeStorage struct { - *testing.Fake -} - -func (c *FakeStorage) CSIDrivers() internalversion.CSIDriverInterface { - return &FakeCSIDrivers{c} -} - -func (c *FakeStorage) CSINodes() internalversion.CSINodeInterface { - return &FakeCSINodes{c} -} - -func (c *FakeStorage) StorageClasses() internalversion.StorageClassInterface { - return &FakeStorageClasses{c} -} - -func (c *FakeStorage) VolumeAttachments() internalversion.VolumeAttachmentInterface { - return &FakeVolumeAttachments{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeStorage) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go deleted file mode 100644 index 49b08e0c26e1..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - storage "k8s.io/kubernetes/pkg/apis/storage" -) - -// FakeStorageClasses implements StorageClassInterface -type FakeStorageClasses struct { - Fake *FakeStorage -} - -var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "storageclasses"} - -var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "StorageClass"} - -// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storage.StorageClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(storageclassesResource, name), &storage.StorageClass{}) - if obj == nil { - return nil, err - } - return obj.(*storage.StorageClass), err -} - -// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage.StorageClassList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storage.StorageClassList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &storage.StorageClassList{ListMeta: obj.(*storage.StorageClassList).ListMeta} - for _, item := range obj.(*storage.StorageClassList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested storageClasses. -func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) -} - -// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(storageClass *storage.StorageClass) (result *storage.StorageClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storage.StorageClass{}) - if obj == nil { - return nil, err - } - return obj.(*storage.StorageClass), err -} - -// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(storageClass *storage.StorageClass) (result *storage.StorageClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storage.StorageClass{}) - if obj == nil { - return nil, err - } - return obj.(*storage.StorageClass), err -} - -// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storage.StorageClass{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions) - - _, err := c.Fake.Invokes(action, &storage.StorageClassList{}) - return err -} - -// Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &storage.StorageClass{}) - if obj == nil { - return nil, err - } - return obj.(*storage.StorageClass), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_volumeattachment.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_volumeattachment.go deleted file mode 100644 index 30ec839c887f..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_volumeattachment.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - storage "k8s.io/kubernetes/pkg/apis/storage" -) - -// FakeVolumeAttachments implements VolumeAttachmentInterface -type FakeVolumeAttachments struct { - Fake *FakeStorage -} - -var volumeattachmentsResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "volumeattachments"} - -var volumeattachmentsKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "", Kind: "VolumeAttachment"} - -// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *FakeVolumeAttachments) Get(name string, options v1.GetOptions) (result *storage.VolumeAttachment, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(volumeattachmentsResource, name), &storage.VolumeAttachment{}) - if obj == nil { - return nil, err - } - return obj.(*storage.VolumeAttachment), err -} - -// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *storage.VolumeAttachmentList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(volumeattachmentsResource, volumeattachmentsKind, opts), &storage.VolumeAttachmentList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &storage.VolumeAttachmentList{ListMeta: obj.(*storage.VolumeAttachmentList).ListMeta} - for _, item := range obj.(*storage.VolumeAttachmentList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *FakeVolumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(volumeattachmentsResource, opts)) -} - -// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(volumeAttachment *storage.VolumeAttachment) (result *storage.VolumeAttachment, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &storage.VolumeAttachment{}) - if obj == nil { - return nil, err - } - return obj.(*storage.VolumeAttachment), err -} - -// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(volumeAttachment *storage.VolumeAttachment) (result *storage.VolumeAttachment, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &storage.VolumeAttachment{}) - if obj == nil { - return nil, err - } - return obj.(*storage.VolumeAttachment), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(volumeAttachment *storage.VolumeAttachment) (*storage.VolumeAttachment, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &storage.VolumeAttachment{}) - if obj == nil { - return nil, err - } - return obj.(*storage.VolumeAttachment), err -} - -// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *FakeVolumeAttachments) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(volumeattachmentsResource, name), &storage.VolumeAttachment{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVolumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(volumeattachmentsResource, listOptions) - - _, err := c.Fake.Invokes(action, &storage.VolumeAttachmentList{}) - return err -} - -// Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.VolumeAttachment, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &storage.VolumeAttachment{}) - if obj == nil { - return nil, err - } - return obj.(*storage.VolumeAttachment), err -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/generated_expansion.go deleted file mode 100644 index 873439a3a286..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/generated_expansion.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -type CSIDriverExpansion interface{} - -type CSINodeExpansion interface{} - -type StorageClassExpansion interface{} - -type VolumeAttachmentExpansion interface{} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go deleted file mode 100644 index 823bfe82fa35..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - rest "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -type StorageInterface interface { - RESTClient() rest.Interface - CSIDriversGetter - CSINodesGetter - StorageClassesGetter - VolumeAttachmentsGetter -} - -// StorageClient is used to interact with features provided by the storage.k8s.io group. -type StorageClient struct { - restClient rest.Interface -} - -func (c *StorageClient) CSIDrivers() CSIDriverInterface { - return newCSIDrivers(c) -} - -func (c *StorageClient) CSINodes() CSINodeInterface { - return newCSINodes(c) -} - -func (c *StorageClient) StorageClasses() StorageClassInterface { - return newStorageClasses(c) -} - -func (c *StorageClient) VolumeAttachments() VolumeAttachmentInterface { - return newVolumeAttachments(c) -} - -// NewForConfig creates a new StorageClient for the given config. -func NewForConfig(c *rest.Config) (*StorageClient, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &StorageClient{client}, nil -} - -// NewForConfigOrDie creates a new StorageClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *StorageClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new StorageClient for the given RESTClient. -func New(c rest.Interface) *StorageClient { - return &StorageClient{c} -} - -func setConfigDefaults(config *rest.Config) error { - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("storage.k8s.io")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("storage.k8s.io")[0] - config.GroupVersion = &gv - } - config.NegotiatedSerializer = scheme.Codecs - - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *StorageClient) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go deleted file mode 100644 index 5f40850a8079..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - storage "k8s.io/kubernetes/pkg/apis/storage" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// StorageClassesGetter has a method to return a StorageClassInterface. -// A group's client should implement this interface. -type StorageClassesGetter interface { - StorageClasses() StorageClassInterface -} - -// StorageClassInterface has methods to work with StorageClass resources. -type StorageClassInterface interface { - Create(*storage.StorageClass) (*storage.StorageClass, error) - Update(*storage.StorageClass) (*storage.StorageClass, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*storage.StorageClass, error) - List(opts v1.ListOptions) (*storage.StorageClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) - StorageClassExpansion -} - -// storageClasses implements StorageClassInterface -type storageClasses struct { - client rest.Interface -} - -// newStorageClasses returns a StorageClasses -func newStorageClasses(c *StorageClient) *storageClasses { - return &storageClasses{ - client: c.RESTClient(), - } -} - -// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string, options v1.GetOptions) (result *storage.StorageClass, err error) { - result = &storage.StorageClass{} - err = c.client.Get(). - Resource("storageclasses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts v1.ListOptions) (result *storage.StorageClassList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &storage.StorageClassList{} - err = c.client.Get(). - Resource("storageclasses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("storageclasses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Create(storageClass *storage.StorageClass) (result *storage.StorageClass, err error) { - result = &storage.StorageClass{} - err = c.client.Post(). - Resource("storageclasses"). - Body(storageClass). - Do(). - Into(result) - return -} - -// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Update(storageClass *storage.StorageClass) (result *storage.StorageClass, err error) { - result = &storage.StorageClass{} - err = c.client.Put(). - Resource("storageclasses"). - Name(storageClass.Name). - Body(storageClass). - Do(). - Into(result) - return -} - -// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("storageclasses"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("storageclasses"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { - result = &storage.StorageClass{} - err = c.client.Patch(pt). - Resource("storageclasses"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/volumeattachment.go b/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/volumeattachment.go deleted file mode 100644 index 571cd99809a8..000000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/volumeattachment.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package internalversion - -import ( - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - storage "k8s.io/kubernetes/pkg/apis/storage" - scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" -) - -// VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface. -// A group's client should implement this interface. -type VolumeAttachmentsGetter interface { - VolumeAttachments() VolumeAttachmentInterface -} - -// VolumeAttachmentInterface has methods to work with VolumeAttachment resources. -type VolumeAttachmentInterface interface { - Create(*storage.VolumeAttachment) (*storage.VolumeAttachment, error) - Update(*storage.VolumeAttachment) (*storage.VolumeAttachment, error) - UpdateStatus(*storage.VolumeAttachment) (*storage.VolumeAttachment, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*storage.VolumeAttachment, error) - List(opts v1.ListOptions) (*storage.VolumeAttachmentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.VolumeAttachment, err error) - VolumeAttachmentExpansion -} - -// volumeAttachments implements VolumeAttachmentInterface -type volumeAttachments struct { - client rest.Interface -} - -// newVolumeAttachments returns a VolumeAttachments -func newVolumeAttachments(c *StorageClient) *volumeAttachments { - return &volumeAttachments{ - client: c.RESTClient(), - } -} - -// Get takes name of the volumeAttachment, and returns the corresponding volumeAttachment object, and an error if there is any. -func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *storage.VolumeAttachment, err error) { - result = &storage.VolumeAttachment{} - err = c.client.Get(). - Resource("volumeattachments"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. -func (c *volumeAttachments) List(opts v1.ListOptions) (result *storage.VolumeAttachmentList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &storage.VolumeAttachmentList{} - err = c.client.Get(). - Resource("volumeattachments"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested volumeAttachments. -func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("volumeattachments"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch() -} - -// Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(volumeAttachment *storage.VolumeAttachment) (result *storage.VolumeAttachment, err error) { - result = &storage.VolumeAttachment{} - err = c.client.Post(). - Resource("volumeattachments"). - Body(volumeAttachment). - Do(). - Into(result) - return -} - -// Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(volumeAttachment *storage.VolumeAttachment) (result *storage.VolumeAttachment, err error) { - result = &storage.VolumeAttachment{} - err = c.client.Put(). - Resource("volumeattachments"). - Name(volumeAttachment.Name). - Body(volumeAttachment). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(volumeAttachment *storage.VolumeAttachment) (result *storage.VolumeAttachment, err error) { - result = &storage.VolumeAttachment{} - err = c.client.Put(). - Resource("volumeattachments"). - Name(volumeAttachment.Name). - SubResource("status"). - Body(volumeAttachment). - Do(). - Into(result) - return -} - -// Delete takes name of the volumeAttachment and deletes it. Returns an error if one occurs. -func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Resource("volumeattachments"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("volumeattachments"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Timeout(timeout). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.VolumeAttachment, err error) { - result = &storage.VolumeAttachment{} - err = c.client.Patch(pt). - Resource("volumeattachments"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/pkg/client/tests/BUILD b/pkg/client/tests/BUILD index a86b180f8876..4f3d97737ce4 100644 --- a/pkg/client/tests/BUILD +++ b/pkg/client/tests/BUILD @@ -20,8 +20,6 @@ go_test( "//pkg/api/testapi:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/install:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -33,6 +31,8 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/portforward:go_default_library", diff --git a/pkg/client/tests/fake_client_test.go b/pkg/client/tests/fake_client_test.go index 731e334e7661..66dea2960513 100644 --- a/pkg/client/tests/fake_client_test.go +++ b/pkg/client/tests/fake_client_test.go @@ -19,9 +19,9 @@ package tests import ( "testing" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - api "k8s.io/kubernetes/pkg/apis/core" - clientsetfake "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" + clientsetfake "k8s.io/client-go/kubernetes/fake" _ "k8s.io/kubernetes/pkg/apis/core/install" ) @@ -37,7 +37,7 @@ func TestFakeClientSetFiltering(t *testing.T) { testSA("nsB", "sa-3"), ) - saList1, err := tc.Core().ServiceAccounts("nsA").List(metav1.ListOptions{}) + saList1, err := tc.CoreV1().ServiceAccounts("nsA").List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -50,7 +50,7 @@ func TestFakeClientSetFiltering(t *testing.T) { } } - saList2, err := tc.Core().ServiceAccounts("nsB").List(metav1.ListOptions{}) + saList2, err := tc.CoreV1().ServiceAccounts("nsB").List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -63,7 +63,7 @@ func TestFakeClientSetFiltering(t *testing.T) { } } - pod1, err := tc.Core().Pods("nsA").Get("pod-1", metav1.GetOptions{}) + pod1, err := tc.CoreV1().Pods("nsA").Get("pod-1", metav1.GetOptions{}) if err != nil { t.Fatalf("Pods.Get: %s", err) } @@ -74,12 +74,12 @@ func TestFakeClientSetFiltering(t *testing.T) { t.Fatalf("Expected to find pod nsA/pod-1t, got %s/%s", pod1.Namespace, pod1.Name) } - wrongPod, err := tc.Core().Pods("nsB").Get("pod-1", metav1.GetOptions{}) + wrongPod, err := tc.CoreV1().Pods("nsB").Get("pod-1", metav1.GetOptions{}) if err == nil { t.Fatalf("Pods.Get: expected nsB/pod-1 not to match, but it matched %s/%s", wrongPod.Namespace, wrongPod.Name) } - allPods, err := tc.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) + allPods, err := tc.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("Pods.List: %s", err) } @@ -87,7 +87,7 @@ func TestFakeClientSetFiltering(t *testing.T) { t.Fatalf("Expected %d pods to match, got %d", expected, actual) } - allSAs, err := tc.Core().ServiceAccounts(metav1.NamespaceAll).List(metav1.ListOptions{}) + allSAs, err := tc.CoreV1().ServiceAccounts(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -102,12 +102,12 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { testPod("nsA", "pod-1"), ) - _, err := tc.Core().Namespaces().Create(testNamespace("nsB")) + _, err := tc.CoreV1().Namespaces().Create(testNamespace("nsB")) if err != nil { t.Fatalf("Namespaces.Create: %s", err) } - allNS, err := tc.Core().Namespaces().List(metav1.ListOptions{}) + allNS, err := tc.CoreV1().Namespaces().List(metav1.ListOptions{}) if err != nil { t.Fatalf("Namespaces.List: %s", err) } @@ -115,12 +115,12 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { t.Fatalf("Expected %d namespaces to match, got %d", expected, actual) } - _, err = tc.Core().Pods("nsB").Create(testPod("", "pod-1")) + _, err = tc.CoreV1().Pods("nsB").Create(testPod("", "pod-1")) if err != nil { t.Fatalf("Pods.Create nsB/pod-1: %s", err) } - podB1, err := tc.Core().Pods("nsB").Get("pod-1", metav1.GetOptions{}) + podB1, err := tc.CoreV1().Pods("nsB").Get("pod-1", metav1.GetOptions{}) if err != nil { t.Fatalf("Pods.Get nsB/pod-1: %s", err) } @@ -131,17 +131,17 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { t.Fatalf("Expected to find pod nsB/pod-1t, got %s/%s", podB1.Namespace, podB1.Name) } - _, err = tc.Core().Pods("nsA").Create(testPod("", "pod-1")) + _, err = tc.CoreV1().Pods("nsA").Create(testPod("", "pod-1")) if err == nil { t.Fatalf("Expected Pods.Create to fail with already exists error") } - _, err = tc.Core().Pods("nsA").Update(testPod("", "pod-1")) + _, err = tc.CoreV1().Pods("nsA").Update(testPod("", "pod-1")) if err != nil { t.Fatalf("Pods.Update nsA/pod-1: %s", err) } - _, err = tc.Core().Pods("nsA").Create(testPod("nsB", "pod-2")) + _, err = tc.CoreV1().Pods("nsA").Create(testPod("nsB", "pod-2")) if err == nil { t.Fatalf("Expected Pods.Create to fail with bad request from namespace mismtach") } @@ -149,14 +149,14 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { t.Fatalf("Expected Pods.Create error to provide object and request namespaces, got %q", err) } - _, err = tc.Core().Pods("nsA").Update(testPod("", "pod-3")) + _, err = tc.CoreV1().Pods("nsA").Update(testPod("", "pod-3")) if err == nil { t.Fatalf("Expected Pods.Update nsA/pod-3 to fail with not found error") } } -func testSA(ns, name string) *api.ServiceAccount { - return &api.ServiceAccount{ +func testSA(ns, name string) *corev1.ServiceAccount { + return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -164,8 +164,8 @@ func testSA(ns, name string) *api.ServiceAccount { } } -func testPod(ns, name string) *api.Pod { - return &api.Pod{ +func testPod(ns, name string) *corev1.Pod { + return &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -173,8 +173,8 @@ func testPod(ns, name string) *api.Pod { } } -func testNamespace(ns string) *api.Namespace { - return &api.Namespace{ +func testNamespace(ns string) *corev1.Namespace { + return &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: ns, }, diff --git a/pkg/client/tests/listwatch_test.go b/pkg/client/tests/listwatch_test.go index 1adaf67adbf5..e1b1ba39f976 100644 --- a/pkg/client/tests/listwatch_test.go +++ b/pkg/client/tests/listwatch_test.go @@ -29,12 +29,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" . "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/testapi" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" ) func parseSelectorOrDie(s string) fields.Selector { @@ -105,7 +105,7 @@ func TestListWatchesCanList(t *testing.T) { server := httptest.NewServer(&handler) defer server.Close() client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Group: "", Version: "v1"}}}) - lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector) + lw := NewListWatchFromClient(client.CoreV1().RESTClient(), item.resource, item.namespace, item.fieldSelector) lw.DisableChunking = true // This test merely tests that the correct request is made. lw.List(metav1.ListOptions{}) @@ -172,7 +172,7 @@ func TestListWatchesCanWatch(t *testing.T) { server := httptest.NewServer(&handler) defer server.Close() client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Group: "", Version: "v1"}}}) - lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector) + lw := NewListWatchFromClient(client.CoreV1().RESTClient(), item.resource, item.namespace, item.fieldSelector) // This test merely tests that the correct request is made. lw.Watch(metav1.ListOptions{ResourceVersion: item.rv}) handler.ValidateRequest(t, item.location, "GET", nil) diff --git a/pkg/kubeapiserver/admission/BUILD b/pkg/kubeapiserver/admission/BUILD index ba6185120e91..6f788d9483b8 100644 --- a/pkg/kubeapiserver/admission/BUILD +++ b/pkg/kubeapiserver/admission/BUILD @@ -9,7 +9,6 @@ go_library( importpath = "k8s.io/kubernetes/pkg/kubeapiserver/admission", visibility = ["//visibility:public"], deps = [ - "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/quota/v1:go_default_library", "//pkg/quota/v1/install:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", @@ -21,6 +20,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/discovery/cached/memory:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/restmapper:go_default_library", "//vendor/k8s.io/klog:go_default_library", diff --git a/pkg/kubeapiserver/admission/config.go b/pkg/kubeapiserver/admission/config.go index 52788434eab5..5ea79ca850ab 100644 --- a/pkg/kubeapiserver/admission/config.go +++ b/pkg/kubeapiserver/admission/config.go @@ -31,9 +31,9 @@ import ( "k8s.io/apiserver/pkg/util/webhook" cacheddiscovery "k8s.io/client-go/discovery/cached/memory" externalinformers "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/restmapper" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" quotainstall "k8s.io/kubernetes/pkg/quota/v1/install" ) @@ -57,12 +57,12 @@ func (c *Config) New(proxyTransport *http.Transport, serviceResolver webhook.Ser klog.Fatalf("Error reading from cloud configuration file %s: %#v", c.CloudConfigFile, err) } } - internalClient, err := internalclientset.NewForConfig(c.LoopbackClientConfig) + clientset, err := kubernetes.NewForConfig(c.LoopbackClientConfig) if err != nil { return nil, nil, err } - discoveryClient := cacheddiscovery.NewMemCacheClient(internalClient.Discovery()) + discoveryClient := cacheddiscovery.NewMemCacheClient(clientset.Discovery()) discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient) kubePluginInitializer := NewPluginInitializer( cloudConfig, diff --git a/pkg/registry/core/pod/storage/BUILD b/pkg/registry/core/pod/storage/BUILD index b02aa3655051..ffba4f9988c4 100644 --- a/pkg/registry/core/pod/storage/BUILD +++ b/pkg/registry/core/pod/storage/BUILD @@ -16,10 +16,10 @@ go_test( deps = [ "//pkg/apis/core:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/securitycontext:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -36,6 +36,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], ) @@ -51,13 +52,13 @@ go_library( "//pkg/apis/core:go_default_library", "//pkg/apis/core/validation:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/printers:go_default_library", "//pkg/printers/internalversion:go_default_library", "//pkg/printers/storage:go_default_library", "//pkg/registry/core/pod:go_default_library", "//pkg/registry/core/pod/rest:go_default_library", + "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", @@ -70,6 +71,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/dryrun:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", ], ) diff --git a/pkg/registry/core/pod/storage/eviction.go b/pkg/registry/core/pod/storage/eviction.go index fdcf2d8dbd35..77d2b3c5bc9a 100644 --- a/pkg/registry/core/pod/storage/eviction.go +++ b/pkg/registry/core/pod/storage/eviction.go @@ -21,6 +21,7 @@ import ( "fmt" "time" + policyv1beta1 "k8s.io/api/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -29,10 +30,10 @@ import ( "k8s.io/apimachinery/pkg/util/wait" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/registry/rest" + policyclient "k8s.io/client-go/kubernetes/typed/policy/v1beta1" "k8s.io/client-go/util/retry" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/policy" - policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" ) const ( @@ -153,7 +154,7 @@ func (r *EvictionREST) Create(ctx context.Context, obj runtime.Object, createVal } // checkAndDecrement checks if the provided PodDisruptionBudget allows any disruption. -func (r *EvictionREST) checkAndDecrement(namespace string, podName string, pdb policy.PodDisruptionBudget) error { +func (r *EvictionREST) checkAndDecrement(namespace string, podName string, pdb policyv1beta1.PodDisruptionBudget) error { if pdb.Status.ObservedGeneration < pdb.Generation { // TODO(mml): Add a Retry-After header. Once there are time-based // budgets, we can sometimes compute a sensible suggested value. But @@ -192,7 +193,7 @@ func (r *EvictionREST) checkAndDecrement(namespace string, podName string, pdb p } // getPodDisruptionBudgets returns any PDBs that match the pod or err if there's an error. -func (r *EvictionREST) getPodDisruptionBudgets(ctx context.Context, pod *api.Pod) ([]policy.PodDisruptionBudget, error) { +func (r *EvictionREST) getPodDisruptionBudgets(ctx context.Context, pod *api.Pod) ([]policyv1beta1.PodDisruptionBudget, error) { if len(pod.Labels) == 0 { return nil, nil } @@ -202,7 +203,7 @@ func (r *EvictionREST) getPodDisruptionBudgets(ctx context.Context, pod *api.Pod return nil, err } - var pdbs []policy.PodDisruptionBudget + var pdbs []policyv1beta1.PodDisruptionBudget for _, pdb := range pdbList.Items { if pdb.Namespace != pod.Namespace { continue diff --git a/pkg/registry/core/pod/storage/eviction_test.go b/pkg/registry/core/pod/storage/eviction_test.go index a5cc1ac762db..ba3e659c626c 100644 --- a/pkg/registry/core/pod/storage/eviction_test.go +++ b/pkg/registry/core/pod/storage/eviction_test.go @@ -19,13 +19,14 @@ package storage import ( "testing" + policyv1beta1 "k8s.io/api/policy/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/client-go/kubernetes/fake" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/policy" - "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" ) func TestEviction(t *testing.T) { @@ -38,40 +39,12 @@ func TestEviction(t *testing.T) { expectError bool expectDeleted bool }{ - { - name: "no pdbs, unscheduled pod, nil delete options, deletes immediately", - pdbs: nil, - pod: validNewPod(), - eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}}, - expectDeleted: true, - }, - { - name: "no pdbs, scheduled pod, nil delete options, deletes gracefully", - pdbs: nil, - pod: func() *api.Pod { pod := validNewPod(); pod.Spec.NodeName = "foo"; return pod }(), - eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}}, - expectDeleted: false, // not deleted immediately because of graceful deletion - }, - { - name: "no pdbs, scheduled pod, empty delete options, deletes gracefully", - pdbs: nil, - pod: func() *api.Pod { pod := validNewPod(); pod.Spec.NodeName = "foo"; return pod }(), - eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, DeleteOptions: &metav1.DeleteOptions{}}, - expectDeleted: false, // not deleted immediately because of graceful deletion - }, - { - name: "no pdbs, scheduled pod, graceless delete options, deletes immediately", - pdbs: nil, - pod: func() *api.Pod { pod := validNewPod(); pod.Spec.NodeName = "foo"; return pod }(), - eviction: &policy.Eviction{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, DeleteOptions: metav1.NewDeleteOptions(0)}, - expectDeleted: true, - }, { name: "matching pdbs with no disruptions allowed", - pdbs: []runtime.Object{&policy.PodDisruptionBudget{ + pdbs: []runtime.Object{&policyv1beta1.PodDisruptionBudget{ ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, - Spec: policy.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "true"}}}, - Status: policy.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 0}, + Spec: policyv1beta1.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "true"}}}, + Status: policyv1beta1.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 0}, }}, pod: func() *api.Pod { pod := validNewPod() @@ -84,10 +57,10 @@ func TestEviction(t *testing.T) { }, { name: "matching pdbs with disruptions allowed", - pdbs: []runtime.Object{&policy.PodDisruptionBudget{ + pdbs: []runtime.Object{&policyv1beta1.PodDisruptionBudget{ ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, - Spec: policy.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "true"}}}, - Status: policy.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 1}, + Spec: policyv1beta1.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "true"}}}, + Status: policyv1beta1.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 1}, }}, pod: func() *api.Pod { pod := validNewPod() @@ -100,10 +73,10 @@ func TestEviction(t *testing.T) { }, { name: "non-matching pdbs", - pdbs: []runtime.Object{&policy.PodDisruptionBudget{ + pdbs: []runtime.Object{&policyv1beta1.PodDisruptionBudget{ ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"}, - Spec: policy.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"b": "true"}}}, - Status: policy.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 0}, + Spec: policyv1beta1.PodDisruptionBudgetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"b": "true"}}}, + Status: policyv1beta1.PodDisruptionBudgetStatus{PodDisruptionsAllowed: 0}, }}, pod: func() *api.Pod { pod := validNewPod() @@ -129,7 +102,7 @@ func TestEviction(t *testing.T) { } client := fake.NewSimpleClientset(tc.pdbs...) - evictionRest := newEvictionStorage(storage.Store, client.Policy()) + evictionRest := newEvictionStorage(storage.Store, client.PolicyV1beta1()) _, err := evictionRest.Create(testContext, tc.eviction, nil, &metav1.CreateOptions{}) if (err != nil) != tc.expectError { t.Errorf("expected error=%v, got %v", tc.expectError, err) diff --git a/pkg/registry/core/pod/storage/storage.go b/pkg/registry/core/pod/storage/storage.go index 1a81995c5d36..898e1c7d0768 100644 --- a/pkg/registry/core/pod/storage/storage.go +++ b/pkg/registry/core/pod/storage/storage.go @@ -31,10 +31,10 @@ import ( "k8s.io/apiserver/pkg/storage" storeerr "k8s.io/apiserver/pkg/storage/errors" "k8s.io/apiserver/pkg/util/dryrun" + policyclient "k8s.io/client-go/kubernetes/typed/policy/v1beta1" podutil "k8s.io/kubernetes/pkg/api/pod" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/core/validation" - policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/printers" printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" diff --git a/pkg/registry/core/rest/BUILD b/pkg/registry/core/rest/BUILD index f03a3434662b..bb579e1c0de4 100644 --- a/pkg/registry/core/rest/BUILD +++ b/pkg/registry/core/rest/BUILD @@ -24,7 +24,6 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/core:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", "//pkg/features:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/master/ports:go_default_library", @@ -59,6 +58,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd/util:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], diff --git a/pkg/registry/core/rest/storage_core.go b/pkg/registry/core/rest/storage_core.go index f188d9e49a45..fd7466e468da 100644 --- a/pkg/registry/core/rest/storage_core.go +++ b/pkg/registry/core/rest/storage_core.go @@ -36,10 +36,10 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" etcdutil "k8s.io/apiserver/pkg/storage/etcd/util" utilfeature "k8s.io/apiserver/pkg/util/feature" + policyclient "k8s.io/client-go/kubernetes/typed/policy/v1beta1" restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/legacyscheme" api "k8s.io/kubernetes/pkg/apis/core" - policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" "k8s.io/kubernetes/pkg/features" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master/ports" diff --git a/pkg/registry/scheduling/rest/BUILD b/pkg/registry/scheduling/rest/BUILD index 6f1b053eeeab..60dd421cc877 100644 --- a/pkg/registry/scheduling/rest/BUILD +++ b/pkg/registry/scheduling/rest/BUILD @@ -15,8 +15,8 @@ go_library( "//pkg/apis/scheduling/v1:go_default_library", "//pkg/apis/scheduling/v1alpha1:go_default_library", "//pkg/apis/scheduling/v1beta1:go_default_library", - "//pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion:go_default_library", "//pkg/registry/scheduling/priorityclass/storage:go_default_library", + "//staging/src/k8s.io/api/scheduling/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", @@ -25,6 +25,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/pkg/registry/scheduling/rest/storage_scheduling.go b/pkg/registry/scheduling/rest/storage_scheduling.go index bcfc65ae0517..9d1695eb1f9a 100644 --- a/pkg/registry/scheduling/rest/storage_scheduling.go +++ b/pkg/registry/scheduling/rest/storage_scheduling.go @@ -22,6 +22,7 @@ import ( "k8s.io/klog" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -30,12 +31,12 @@ import ( "k8s.io/apiserver/pkg/registry/rest" genericapiserver "k8s.io/apiserver/pkg/server" serverstorage "k8s.io/apiserver/pkg/server/storage" + schedulingclient "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/scheduling" schedulingapiv1 "k8s.io/kubernetes/pkg/apis/scheduling/v1" schedulingapiv1alpha1 "k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1" schedulingapiv1beta1 "k8s.io/kubernetes/pkg/apis/scheduling/v1beta1" - schedulingclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion" priorityclassstore "k8s.io/kubernetes/pkg/registry/scheduling/priorityclass/storage" ) @@ -106,7 +107,12 @@ func AddSystemPriorityClasses() genericapiserver.PostStartHookFunc { _, err := schedClientSet.PriorityClasses().Get(pc.Name, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { - _, err := schedClientSet.PriorityClasses().Create(pc) + // TODO: Remove this explicit conversion after scheduling api move to v1 + v1beta1PriorityClass := &schedulingv1beta1.PriorityClass{} + if err := schedulingapiv1beta1.Convert_scheduling_PriorityClass_To_v1beta1_PriorityClass(pc, v1beta1PriorityClass, nil); err != nil { + return false, err + } + _, err := schedClientSet.PriorityClasses().Create(v1beta1PriorityClass) if err != nil && !apierrors.IsAlreadyExists(err) { return false, err } else { diff --git a/test/images/nettest/BUILD b/test/images/nettest/BUILD index 39a51b0030f5..1182e4d3dea9 100644 --- a/test/images/nettest/BUILD +++ b/test/images/nettest/BUILD @@ -11,9 +11,9 @@ go_library( srcs = ["nettest.go"], importpath = "k8s.io/kubernetes/test/images/nettest", deps = [ - "//pkg/client/clientset_generated/internalclientset:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/test/images/nettest/nettest.go b/test/images/nettest/nettest.go index 8336d7cfeb87..e2f33f5565ef 100644 --- a/test/images/nettest/nettest.go +++ b/test/images/nettest/nettest.go @@ -46,8 +46,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" ) var ( @@ -270,7 +270,7 @@ func contactOthers(state *State) { //getWebserverEndpoints returns the webserver endpoints as a set of String, each in the format like "http://{ip}:{port}" func getWebserverEndpoints(client clientset.Interface) sets.String { - endpoints, err := client.Core().Endpoints(*namespace).Get(*service, v1.GetOptions{}) + endpoints, err := client.CoreV1().Endpoints(*namespace).Get(*service, v1.GetOptions{}) eps := sets.String{} if err != nil { state.Logf("Unable to read the endpoints for %v/%v: %v.", *namespace, *service, err) diff --git a/test/integration/auth/BUILD b/test/integration/auth/BUILD index 9d604cea9699..82c8771d7dc4 100644 --- a/test/integration/auth/BUILD +++ b/test/integration/auth/BUILD @@ -24,15 +24,11 @@ go_test( "//cmd/kube-apiserver/app/testing:go_default_library", "//pkg/api/legacyscheme:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/apis/authorization:go_default_library", "//pkg/apis/autoscaling:go_default_library", - "//pkg/apis/coordination:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/apis/policy:go_default_library", - "//pkg/apis/rbac:go_default_library", + "//pkg/apis/rbac/v1:go_default_library", "//pkg/auth/authorizer/abac:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/serviceaccount:go_default_library", "//pkg/features:go_default_library", @@ -51,7 +47,11 @@ go_test( "//plugin/pkg/auth/authorizer/rbac:go_default_library", "//staging/src/k8s.io/api/authentication/v1:go_default_library", "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", + "//staging/src/k8s.io/api/authorization/v1:go_default_library", + "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", + "//staging/src/k8s.io/api/rbac/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1beta1:go_default_library", "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", @@ -81,6 +81,7 @@ go_test( "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/tokentest:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", diff --git a/test/integration/auth/accessreview_test.go b/test/integration/auth/accessreview_test.go index df7d1c96f93b..2353ffaaebd4 100644 --- a/test/integration/auth/accessreview_test.go +++ b/test/integration/auth/accessreview_test.go @@ -22,15 +22,15 @@ import ( "strings" "testing" + authorizationapi "k8s.io/api/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/testapi" - authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" api "k8s.io/kubernetes/pkg/apis/core" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/test/integration/framework" ) @@ -123,7 +123,7 @@ func TestSubjectAccessReview(t *testing.T) { } for _, test := range tests { - response, err := clientset.Authorization().SubjectAccessReviews().Create(test.sar) + response, err := clientset.AuthorizationV1().SubjectAccessReviews().Create(test.sar) switch { case err == nil && len(test.expectedError) == 0: @@ -207,7 +207,7 @@ func TestSelfSubjectAccessReview(t *testing.T) { for _, test := range tests { username = test.username - response, err := clientset.Authorization().SelfSubjectAccessReviews().Create(test.sar) + response, err := clientset.AuthorizationV1().SelfSubjectAccessReviews().Create(test.sar) switch { case err == nil && len(test.expectedError) == 0: @@ -325,7 +325,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { } for _, test := range tests { - response, err := clientset.Authorization().LocalSubjectAccessReviews(test.namespace).Create(test.sar) + response, err := clientset.AuthorizationV1().LocalSubjectAccessReviews(test.namespace).Create(test.sar) switch { case err == nil && len(test.expectedError) == 0: diff --git a/test/integration/auth/node_test.go b/test/integration/auth/node_test.go index f9fba397a38e..aa786f49fe7d 100644 --- a/test/integration/auth/node_test.go +++ b/test/integration/auth/node_test.go @@ -23,6 +23,9 @@ import ( "testing" "time" + coordination "k8s.io/api/coordination/v1" + corev1 "k8s.io/api/core/v1" + policy "k8s.io/api/policy/v1beta1" storagev1 "k8s.io/api/storage/v1" storagev1beta1 "k8s.io/api/storage/v1beta1" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" @@ -34,14 +37,10 @@ import ( "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing" + clientset "k8s.io/client-go/kubernetes" externalclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" kubeapiservertesting "k8s.io/kubernetes/cmd/kube-apiserver/app/testing" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/coordination" - "k8s.io/kubernetes/pkg/apis/core" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/policy" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/integration/framework" "k8s.io/utils/pointer" @@ -93,7 +92,7 @@ func TestNodeAuthorizer(t *testing.T) { // Wait for a healthy server for { - result := superuserClient.Core().RESTClient().Get().AbsPath("/healthz").Do() + result := superuserClient.CoreV1().RESTClient().Get().AbsPath("/healthz").Do() _, err := result.Raw() if err == nil { break @@ -103,20 +102,20 @@ func TestNodeAuthorizer(t *testing.T) { } // Create objects - if _, err := superuserClient.Core().Namespaces().Create(&core.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "ns"}}); err != nil { + if _, err := superuserClient.CoreV1().Namespaces().Create(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "ns"}}); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().Secrets("ns").Create(&api.Secret{ObjectMeta: metav1.ObjectMeta{Name: "mysecret"}}); err != nil { + if _, err := superuserClient.CoreV1().Secrets("ns").Create(&corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "mysecret"}}); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().Secrets("ns").Create(&api.Secret{ObjectMeta: metav1.ObjectMeta{Name: "mypvsecret"}}); err != nil { + if _, err := superuserClient.CoreV1().Secrets("ns").Create(&corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "mypvsecret"}}); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().ConfigMaps("ns").Create(&api.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmap"}}); err != nil { + if _, err := superuserClient.CoreV1().ConfigMaps("ns").Create(&corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmap"}}); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().ConfigMaps("ns").Create(&api.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmapconfigsource"}}); err != nil { + if _, err := superuserClient.CoreV1().ConfigMaps("ns").Create(&corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmapconfigsource"}}); err != nil { t.Fatal(err) } pvName := "mypv" @@ -130,23 +129,23 @@ func TestNodeAuthorizer(t *testing.T) { }); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().PersistentVolumeClaims("ns").Create(&api.PersistentVolumeClaim{ + if _, err := superuserClient.CoreV1().PersistentVolumeClaims("ns").Create(&corev1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{Name: "mypvc"}, - Spec: api.PersistentVolumeClaimSpec{ - AccessModes: []api.PersistentVolumeAccessMode{api.ReadOnlyMany}, - Resources: api.ResourceRequirements{Requests: api.ResourceList{api.ResourceStorage: resource.MustParse("1")}}, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadOnlyMany}, + Resources: corev1.ResourceRequirements{Requests: corev1.ResourceList{corev1.ResourceStorage: resource.MustParse("1")}}, }, }); err != nil { t.Fatal(err) } - if _, err := superuserClient.Core().PersistentVolumes().Create(&api.PersistentVolume{ + if _, err := superuserClient.CoreV1().PersistentVolumes().Create(&corev1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{Name: "mypv"}, - Spec: api.PersistentVolumeSpec{ - AccessModes: []api.PersistentVolumeAccessMode{api.ReadOnlyMany}, - Capacity: api.ResourceList{api.ResourceStorage: resource.MustParse("1")}, - ClaimRef: &api.ObjectReference{Namespace: "ns", Name: "mypvc"}, - PersistentVolumeSource: api.PersistentVolumeSource{AzureFile: &api.AzureFilePersistentVolumeSource{ShareName: "default", SecretName: "mypvsecret"}}, + Spec: corev1.PersistentVolumeSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadOnlyMany}, + Capacity: corev1.ResourceList{corev1.ResourceStorage: resource.MustParse("1")}, + ClaimRef: &corev1.ObjectReference{Namespace: "ns", Name: "mypvc"}, + PersistentVolumeSource: corev1.PersistentVolumeSource{AzureFile: &corev1.AzureFilePersistentVolumeSource{ShareName: "default", SecretName: "mypvsecret"}}, }, }); err != nil { t.Fatal(err) @@ -154,37 +153,37 @@ func TestNodeAuthorizer(t *testing.T) { getSecret := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Secrets("ns").Get("mysecret", metav1.GetOptions{}) + _, err := client.CoreV1().Secrets("ns").Get("mysecret", metav1.GetOptions{}) return err } } getPVSecret := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Secrets("ns").Get("mypvsecret", metav1.GetOptions{}) + _, err := client.CoreV1().Secrets("ns").Get("mypvsecret", metav1.GetOptions{}) return err } } getConfigMap := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().ConfigMaps("ns").Get("myconfigmap", metav1.GetOptions{}) + _, err := client.CoreV1().ConfigMaps("ns").Get("myconfigmap", metav1.GetOptions{}) return err } } getConfigMapConfigSource := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().ConfigMaps("ns").Get("myconfigmapconfigsource", metav1.GetOptions{}) + _, err := client.CoreV1().ConfigMaps("ns").Get("myconfigmapconfigsource", metav1.GetOptions{}) return err } } getPVC := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().PersistentVolumeClaims("ns").Get("mypvc", metav1.GetOptions{}) + _, err := client.CoreV1().PersistentVolumeClaims("ns").Get("mypvc", metav1.GetOptions{}) return err } } getPV := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().PersistentVolumes().Get("mypv", metav1.GetOptions{}) + _, err := client.CoreV1().PersistentVolumes().Get("mypv", metav1.GetOptions{}) return err } } @@ -197,15 +196,15 @@ func TestNodeAuthorizer(t *testing.T) { createNode2NormalPod := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Pods("ns").Create(&api.Pod{ + _, err := client.CoreV1().Pods("ns").Create(&corev1.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "node2normalpod"}, - Spec: api.PodSpec{ + Spec: corev1.PodSpec{ NodeName: "node2", - Containers: []api.Container{{Name: "image", Image: "busybox"}}, - Volumes: []api.Volume{ - {Name: "secret", VolumeSource: api.VolumeSource{Secret: &api.SecretVolumeSource{SecretName: "mysecret"}}}, - {Name: "cm", VolumeSource: api.VolumeSource{ConfigMap: &api.ConfigMapVolumeSource{LocalObjectReference: api.LocalObjectReference{Name: "myconfigmap"}}}}, - {Name: "pvc", VolumeSource: api.VolumeSource{PersistentVolumeClaim: &api.PersistentVolumeClaimVolumeSource{ClaimName: "mypvc"}}}, + Containers: []corev1.Container{{Name: "image", Image: "busybox"}}, + Volumes: []corev1.Volume{ + {Name: "secret", VolumeSource: corev1.VolumeSource{Secret: &corev1.SecretVolumeSource{SecretName: "mysecret"}}}, + {Name: "cm", VolumeSource: corev1.VolumeSource{ConfigMap: &corev1.ConfigMapVolumeSource{LocalObjectReference: corev1.LocalObjectReference{Name: "myconfigmap"}}}}, + {Name: "pvc", VolumeSource: corev1.VolumeSource{PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{ClaimName: "mypvc"}}}, }, }, }) @@ -215,9 +214,9 @@ func TestNodeAuthorizer(t *testing.T) { updateNode2NormalPodStatus := func(client clientset.Interface) func() error { return func() error { startTime := metav1.NewTime(time.Now()) - _, err := client.Core().Pods("ns").UpdateStatus(&api.Pod{ + _, err := client.CoreV1().Pods("ns").UpdateStatus(&corev1.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "node2normalpod"}, - Status: api.PodStatus{StartTime: &startTime}, + Status: corev1.PodStatus{StartTime: &startTime}, }) return err } @@ -225,20 +224,20 @@ func TestNodeAuthorizer(t *testing.T) { deleteNode2NormalPod := func(client clientset.Interface) func() error { return func() error { zero := int64(0) - return client.Core().Pods("ns").Delete("node2normalpod", &metav1.DeleteOptions{GracePeriodSeconds: &zero}) + return client.CoreV1().Pods("ns").Delete("node2normalpod", &metav1.DeleteOptions{GracePeriodSeconds: &zero}) } } createNode2MirrorPod := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Pods("ns").Create(&api.Pod{ + _, err := client.CoreV1().Pods("ns").Create(&corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "node2mirrorpod", - Annotations: map[string]string{api.MirrorPodAnnotationKey: "true"}, + Annotations: map[string]string{corev1.MirrorPodAnnotationKey: "true"}, }, - Spec: api.PodSpec{ + Spec: corev1.PodSpec{ NodeName: "node2", - Containers: []api.Container{{Name: "image", Image: "busybox"}}, + Containers: []corev1.Container{{Name: "image", Image: "busybox"}}, }, }) return err @@ -247,62 +246,62 @@ func TestNodeAuthorizer(t *testing.T) { deleteNode2MirrorPod := func(client clientset.Interface) func() error { return func() error { zero := int64(0) - return client.Core().Pods("ns").Delete("node2mirrorpod", &metav1.DeleteOptions{GracePeriodSeconds: &zero}) + return client.CoreV1().Pods("ns").Delete("node2mirrorpod", &metav1.DeleteOptions{GracePeriodSeconds: &zero}) } } createNode2 := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Nodes().Create(&api.Node{ObjectMeta: metav1.ObjectMeta{Name: "node2"}}) + _, err := client.CoreV1().Nodes().Create(&corev1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node2"}}) return err } } setNode2ConfigSource := func(client clientset.Interface) func() error { return func() error { - node2, err := client.Core().Nodes().Get("node2", metav1.GetOptions{}) + node2, err := client.CoreV1().Nodes().Get("node2", metav1.GetOptions{}) if err != nil { return err } - node2.Spec.ConfigSource = &api.NodeConfigSource{ - ConfigMap: &api.ConfigMapNodeConfigSource{ + node2.Spec.ConfigSource = &corev1.NodeConfigSource{ + ConfigMap: &corev1.ConfigMapNodeConfigSource{ Namespace: "ns", Name: "myconfigmapconfigsource", KubeletConfigKey: "kubelet", }, } - _, err = client.Core().Nodes().Update(node2) + _, err = client.CoreV1().Nodes().Update(node2) return err } } unsetNode2ConfigSource := func(client clientset.Interface) func() error { return func() error { - node2, err := client.Core().Nodes().Get("node2", metav1.GetOptions{}) + node2, err := client.CoreV1().Nodes().Get("node2", metav1.GetOptions{}) if err != nil { return err } node2.Spec.ConfigSource = nil - _, err = client.Core().Nodes().Update(node2) + _, err = client.CoreV1().Nodes().Update(node2) return err } } updateNode2Status := func(client clientset.Interface) func() error { return func() error { - _, err := client.Core().Nodes().UpdateStatus(&api.Node{ + _, err := client.CoreV1().Nodes().UpdateStatus(&corev1.Node{ ObjectMeta: metav1.ObjectMeta{Name: "node2"}, - Status: api.NodeStatus{}, + Status: corev1.NodeStatus{}, }) return err } } deleteNode2 := func(client clientset.Interface) func() error { return func() error { - return client.Core().Nodes().Delete("node2", nil) + return client.CoreV1().Nodes().Delete("node2", nil) } } createNode2NormalPodEviction := func(client clientset.Interface) func() error { return func() error { zero := int64(0) - return client.Policy().Evictions("ns").Evict(&policy.Eviction{ + return client.PolicyV1beta1().Evictions("ns").Evict(&policy.Eviction{ TypeMeta: metav1.TypeMeta{ APIVersion: "policy/v1beta1", Kind: "Eviction", @@ -318,7 +317,7 @@ func TestNodeAuthorizer(t *testing.T) { createNode2MirrorPodEviction := func(client clientset.Interface) func() error { return func() error { zero := int64(0) - return client.Policy().Evictions("ns").Evict(&policy.Eviction{ + return client.PolicyV1beta1().Evictions("ns").Evict(&policy.Eviction{ TypeMeta: metav1.TypeMeta{ APIVersion: "policy/v1beta1", Kind: "Eviction", @@ -338,7 +337,7 @@ func TestNodeAuthorizer(t *testing.T) { capacity++ statusString := fmt.Sprintf("{\"status\": {\"capacity\": {\"storage\": \"%dG\"}}}", capacity) patchBytes := []byte(statusString) - _, err := client.Core().PersistentVolumeClaims("ns").Patch("mypvc", types.StrategicMergePatchType, patchBytes, "status") + _, err := client.CoreV1().PersistentVolumeClaims("ns").Patch("mypvc", types.StrategicMergePatchType, patchBytes, "status") return err } } @@ -346,14 +345,14 @@ func TestNodeAuthorizer(t *testing.T) { updatePVCPhase := func(client clientset.Interface) func() error { return func() error { patchBytes := []byte(`{"status":{"phase": "Bound"}}`) - _, err := client.Core().PersistentVolumeClaims("ns").Patch("mypvc", types.StrategicMergePatchType, patchBytes, "status") + _, err := client.CoreV1().PersistentVolumeClaims("ns").Patch("mypvc", types.StrategicMergePatchType, patchBytes, "status") return err } } getNode1Lease := func(client clientset.Interface) func() error { return func() error { - _, err := client.Coordination().Leases(api.NamespaceNodeLease).Get("node1", metav1.GetOptions{}) + _, err := client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Get("node1", metav1.GetOptions{}) return err } } @@ -370,18 +369,18 @@ func TestNodeAuthorizer(t *testing.T) { RenewTime: &metav1.MicroTime{Time: time.Now()}, }, } - _, err := client.Coordination().Leases(api.NamespaceNodeLease).Create(lease) + _, err := client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Create(lease) return err } } updateNode1Lease := func(client clientset.Interface) func() error { return func() error { - lease, err := client.Coordination().Leases(api.NamespaceNodeLease).Get("node1", metav1.GetOptions{}) + lease, err := client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Get("node1", metav1.GetOptions{}) if err != nil { return err } lease.Spec.RenewTime = &metav1.MicroTime{Time: time.Now()} - _, err = client.Coordination().Leases(api.NamespaceNodeLease).Update(lease) + _, err = client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Update(lease) return err } } @@ -389,13 +388,13 @@ func TestNodeAuthorizer(t *testing.T) { return func() error { node1LeaseDurationSeconds++ bs := []byte(fmt.Sprintf(`{"spec": {"leaseDurationSeconds": %d}}`, node1LeaseDurationSeconds)) - _, err := client.Coordination().Leases(api.NamespaceNodeLease).Patch("node1", types.StrategicMergePatchType, bs) + _, err := client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Patch("node1", types.StrategicMergePatchType, bs) return err } } deleteNode1Lease := func(client clientset.Interface) func() error { return func() error { - return client.Coordination().Leases(api.NamespaceNodeLease).Delete("node1", &metav1.DeleteOptions{}) + return client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Delete("node1", &metav1.DeleteOptions{}) } } @@ -671,7 +670,7 @@ func crdFromManifest(filename string) (*apiextensionsv1beta1.CustomResourceDefin return nil, err } - if err := runtime.DecodeInto(legacyscheme.Codecs.UniversalDecoder(), data, &crd); err != nil { + if err := runtime.DecodeInto(scheme.Codecs.UniversalDecoder(), data, &crd); err != nil { return nil, err } return &crd, nil diff --git a/test/integration/auth/rbac_test.go b/test/integration/auth/rbac_test.go index 93374f9bfa51..a1d4f21edda2 100644 --- a/test/integration/auth/rbac_test.go +++ b/test/integration/auth/rbac_test.go @@ -28,6 +28,8 @@ import ( "testing" "time" + api "k8s.io/api/core/v1" + rbacapi "k8s.io/api/rbac/v1" apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" @@ -41,6 +43,7 @@ import ( "k8s.io/apiserver/pkg/registry/generic" utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing" + clientset "k8s.io/client-go/kubernetes" externalclientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" watchtools "k8s.io/client-go/tools/watch" @@ -48,9 +51,7 @@ import ( "k8s.io/klog" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/testapi" - api "k8s.io/kubernetes/pkg/apis/core" - rbacapi "k8s.io/kubernetes/pkg/apis/rbac" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" + rbachelper "k8s.io/kubernetes/pkg/apis/rbac/v1" "k8s.io/kubernetes/pkg/master" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" clusterrolestore "k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage" @@ -119,25 +120,25 @@ type bootstrapRoles struct { // client should be authenticated as the RBAC super user. func (b bootstrapRoles) bootstrap(client clientset.Interface) error { for _, r := range b.clusterRoles { - _, err := client.Rbac().ClusterRoles().Create(&r) + _, err := client.RbacV1().ClusterRoles().Create(&r) if err != nil { return fmt.Errorf("failed to make request: %v", err) } } for _, r := range b.roles { - _, err := client.Rbac().Roles(r.Namespace).Create(&r) + _, err := client.RbacV1().Roles(r.Namespace).Create(&r) if err != nil { return fmt.Errorf("failed to make request: %v", err) } } for _, r := range b.clusterRoleBindings { - _, err := client.Rbac().ClusterRoleBindings().Create(&r) + _, err := client.RbacV1().ClusterRoleBindings().Create(&r) if err != nil { return fmt.Errorf("failed to make request: %v", err) } } for _, r := range b.roleBindings { - _, err := client.Rbac().RoleBindings(r.Namespace).Create(&r) + _, err := client.RbacV1().RoleBindings(r.Namespace).Create(&r) if err != nil { return fmt.Errorf("failed to make request: %v", err) } @@ -282,9 +283,9 @@ var ( // Declare some PolicyRules beforehand. var ( - ruleAllowAll = rbacapi.NewRule("*").Groups("*").Resources("*").RuleOrDie() - ruleReadPods = rbacapi.NewRule("list", "get", "watch").Groups("").Resources("pods").RuleOrDie() - ruleWriteJobs = rbacapi.NewRule("*").Groups("batch").Resources("*").RuleOrDie() + ruleAllowAll = rbachelper.NewRule("*").Groups("*").Resources("*").RuleOrDie() + ruleReadPods = rbachelper.NewRule("list", "get", "watch").Groups("").Resources("pods").RuleOrDie() + ruleWriteJobs = rbachelper.NewRule("*").Groups("batch").Resources("*").RuleOrDie() ) func TestRBAC(t *testing.T) { @@ -345,13 +346,13 @@ func TestRBAC(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings"}, Rules: []rbacapi.PolicyRule{ - rbacapi.NewRule("create").Groups("rbac.authorization.k8s.io").Resources("rolebindings").RuleOrDie(), + rbachelper.NewRule("create").Groups("rbac.authorization.k8s.io").Resources("rolebindings").RuleOrDie(), }, }, { ObjectMeta: metav1.ObjectMeta{Name: "bind-any-clusterrole"}, Rules: []rbacapi.PolicyRule{ - rbacapi.NewRule("bind").Groups("rbac.authorization.k8s.io").Resources("clusterroles").RuleOrDie(), + rbachelper.NewRule("bind").Groups("rbac.authorization.k8s.io").Resources("clusterroles").RuleOrDie(), }, }, }, @@ -452,7 +453,7 @@ func TestRBAC(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Name: "update-limitranges"}, Rules: []rbacapi.PolicyRule{ - rbacapi.NewRule("update").Groups("").Resources("limitranges").RuleOrDie(), + rbachelper.NewRule("update").Groups("").Resources("limitranges").RuleOrDie(), }, }, }, @@ -486,7 +487,7 @@ func TestRBAC(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Name: "patch-limitranges"}, Rules: []rbacapi.PolicyRule{ - rbacapi.NewRule("patch").Groups("").Resources("limitranges").RuleOrDie(), + rbachelper.NewRule("patch").Groups("").Resources("limitranges").RuleOrDie(), }, }, }, @@ -638,7 +639,7 @@ func TestBootstrapping(t *testing.T) { clientset := clientset.NewForConfigOrDie(&restclient.Config{BearerToken: superUser, Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Groups[api.GroupName].GroupVersion()}}) - watcher, err := clientset.Rbac().ClusterRoles().Watch(metav1.ListOptions{ResourceVersion: "0"}) + watcher, err := clientset.RbacV1().ClusterRoles().Watch(metav1.ListOptions{ResourceVersion: "0"}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -654,7 +655,7 @@ func TestBootstrapping(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - clusterRoles, err := clientset.Rbac().ClusterRoles().List(metav1.ListOptions{}) + clusterRoles, err := clientset.RbacV1().ClusterRoles().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -701,7 +702,7 @@ func TestDiscoveryUpgradeBootstrapping(t *testing.T) { // Modify the default RBAC discovery ClusterRoleBidnings to look more like the defaults that // existed prior to v1.14, but with user modifications. t.Logf("Modifying default `system:discovery` ClusterRoleBinding") - discRoleBinding, err := client.Rbac().ClusterRoleBindings().Get("system:discovery", metav1.GetOptions{}) + discRoleBinding, err := client.RbacV1().ClusterRoleBindings().Get("system:discovery", metav1.GetOptions{}) discRoleBinding.Annotations["rbac.authorization.kubernetes.io/autoupdate"] = "false" discRoleBinding.Annotations["rbac-discovery-upgrade-test"] = "pass" discRoleBinding.Subjects = []rbacapi.Subject{ @@ -711,18 +712,18 @@ func TestDiscoveryUpgradeBootstrapping(t *testing.T) { APIGroup: "rbac.authorization.k8s.io", }, } - if discRoleBinding, err = client.Rbac().ClusterRoleBindings().Update(discRoleBinding); err != nil { + if discRoleBinding, err = client.RbacV1().ClusterRoleBindings().Update(discRoleBinding); err != nil { t.Fatalf("Failed to update `system:discovery` ClusterRoleBinding: %v", err) } t.Logf("Modifying default `system:basic-user` ClusterRoleBinding") - basicUserRoleBinding, err := client.Rbac().ClusterRoleBindings().Get("system:basic-user", metav1.GetOptions{}) + basicUserRoleBinding, err := client.RbacV1().ClusterRoleBindings().Get("system:basic-user", metav1.GetOptions{}) basicUserRoleBinding.Annotations["rbac.authorization.kubernetes.io/autoupdate"] = "false" basicUserRoleBinding.Annotations["rbac-discovery-upgrade-test"] = "pass" - if basicUserRoleBinding, err = client.Rbac().ClusterRoleBindings().Update(basicUserRoleBinding); err != nil { + if basicUserRoleBinding, err = client.RbacV1().ClusterRoleBindings().Update(basicUserRoleBinding); err != nil { t.Fatalf("Failed to update `system:basic-user` ClusterRoleBinding: %v", err) } t.Logf("Deleting default `system:public-info-viewer` ClusterRoleBinding") - if err = client.Rbac().ClusterRoleBindings().Delete("system:public-info-viewer", &metav1.DeleteOptions{}); err != nil { + if err = client.RbacV1().ClusterRoleBindings().Delete("system:public-info-viewer", &metav1.DeleteOptions{}); err != nil { t.Fatalf("Failed to delete `system:public-info-viewer` ClusterRoleBinding: %v", err) } @@ -736,21 +737,21 @@ func TestDiscoveryUpgradeBootstrapping(t *testing.T) { client = clientset.NewForConfigOrDie(&restclient.Config{BearerToken: superUser, Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Groups[api.GroupName].GroupVersion()}}) - newDiscRoleBinding, err := client.Rbac().ClusterRoleBindings().Get("system:discovery", metav1.GetOptions{}) + newDiscRoleBinding, err := client.RbacV1().ClusterRoleBindings().Get("system:discovery", metav1.GetOptions{}) if err != nil { t.Fatalf("Failed to get `system:discovery` ClusterRoleBinding: %v", err) } if !reflect.DeepEqual(newDiscRoleBinding, discRoleBinding) { t.Errorf("`system:discovery` should have been unmodified. Wanted: %v, got %v", discRoleBinding, newDiscRoleBinding) } - newBasicUserRoleBinding, err := client.Rbac().ClusterRoleBindings().Get("system:basic-user", metav1.GetOptions{}) + newBasicUserRoleBinding, err := client.RbacV1().ClusterRoleBindings().Get("system:basic-user", metav1.GetOptions{}) if err != nil { t.Fatalf("Failed to get `system:basic-user` ClusterRoleBinding: %v", err) } if !reflect.DeepEqual(newBasicUserRoleBinding, basicUserRoleBinding) { t.Errorf("`system:basic-user` should have been unmodified. Wanted: %v, got %v", basicUserRoleBinding, newBasicUserRoleBinding) } - publicInfoViewerRoleBinding, err := client.Rbac().ClusterRoleBindings().Get("system:public-info-viewer", metav1.GetOptions{}) + publicInfoViewerRoleBinding, err := client.RbacV1().ClusterRoleBindings().Get("system:public-info-viewer", metav1.GetOptions{}) if err != nil { t.Fatalf("Failed to get `system:public-info-viewer` ClusterRoleBinding: %v", err) } diff --git a/test/integration/master/BUILD b/test/integration/master/BUILD index cad6f6810b50..bcbcb517a63b 100644 --- a/test/integration/master/BUILD +++ b/test/integration/master/BUILD @@ -25,8 +25,6 @@ go_test( deps = [ "//cmd/kube-apiserver/app/options:go_default_library", "//cmd/kube-apiserver/app/testing:go_default_library", - "//pkg/apis/core:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/master:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/test/integration/master/synthetic_master_test.go b/test/integration/master/synthetic_master_test.go index 6cab439f5f96..1fb409898032 100644 --- a/test/integration/master/synthetic_master_test.go +++ b/test/integration/master/synthetic_master_test.go @@ -35,6 +35,7 @@ import ( appsv1 "k8s.io/api/apps/v1" "k8s.io/api/core/v1" + api "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,11 +46,9 @@ import ( "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/authorizerfactory" "k8s.io/apiserver/plugin/pkg/authenticator/token/tokentest" - clientsetv1 "k8s.io/client-go/kubernetes" + clientset "k8s.io/client-go/kubernetes" clienttypedv1 "k8s.io/client-go/kubernetes/typed/core/v1" restclient "k8s.io/client-go/rest" - api "k8s.io/kubernetes/pkg/apis/core" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/master" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" @@ -104,7 +103,7 @@ func TestKubernetesService(t *testing.T) { defer closeFn() coreClient := clientset.NewForConfigOrDie(config.GenericConfig.LoopbackClientConfig) err := wait.PollImmediate(time.Millisecond*100, wait.ForeverTestTimeout, func() (bool, error) { - if _, err := coreClient.Core().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}); err != nil && errors.IsNotFound(err) { + if _, err := coreClient.CoreV1().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}); err != nil && errors.IsNotFound(err) { return false, nil } else if err != nil { return false, err @@ -306,7 +305,7 @@ func TestObjectSizeResponses(t *testing.T) { _, s, closeFn := framework.RunAMaster(nil) defer closeFn() - client := clientsetv1.NewForConfigOrDie(&restclient.Config{Host: s.URL}) + client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) const DeploymentMegabyteSize = 100000 const DeploymentTwoMegabyteSize = 1000000 @@ -653,7 +652,7 @@ func TestMasterService(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL}) err := wait.Poll(time.Second, time.Minute, func() (bool, error) { - svcList, err := client.Core().Services(metav1.NamespaceDefault).List(metav1.ListOptions{}) + svcList, err := client.CoreV1().Services(metav1.NamespaceDefault).List(metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error: %v", err) return false, nil @@ -666,7 +665,7 @@ func TestMasterService(t *testing.T) { } } if found { - ep, err := client.Core().Endpoints(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + ep, err := client.CoreV1().Endpoints(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) if err != nil { return false, nil } @@ -710,7 +709,7 @@ func TestServiceAlloc(t *testing.T) { // Wait until the default "kubernetes" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { - _, err := client.Core().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + _, err := client.CoreV1().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) if err != nil && !errors.IsNotFound(err) { return false, err } @@ -721,18 +720,18 @@ func TestServiceAlloc(t *testing.T) { // make 5 more services to take up all IPs for i := 0; i < 5; i++ { - if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(i)); err != nil { + if _, err := client.CoreV1().Services(metav1.NamespaceDefault).Create(svc(i)); err != nil { t.Error(err) } } // Make another service. It will fail because we're out of cluster IPs - if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { + if _, err := client.CoreV1().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { if !strings.Contains(err.Error(), "range is full") { t.Errorf("unexpected error text: %v", err) } } else { - svcs, err := client.Core().Services(metav1.NamespaceAll).List(metav1.ListOptions{}) + svcs, err := client.CoreV1().Services(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected success, and error getting the services: %v", err) } @@ -744,12 +743,12 @@ func TestServiceAlloc(t *testing.T) { } // Delete the first service. - if err := client.Core().Services(metav1.NamespaceDefault).Delete(svc(1).ObjectMeta.Name, nil); err != nil { + if err := client.CoreV1().Services(metav1.NamespaceDefault).Delete(svc(1).ObjectMeta.Name, nil); err != nil { t.Fatalf("got unexpected error: %v", err) } // This time creating the second service should work. - if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { + if _, err := client.CoreV1().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { t.Fatalf("got unexpected error: %v", err) } } diff --git a/test/soak/cauldron/BUILD b/test/soak/cauldron/BUILD index dbf02e64b422..6382c15db08d 100644 --- a/test/soak/cauldron/BUILD +++ b/test/soak/cauldron/BUILD @@ -16,11 +16,11 @@ go_library( srcs = ["cauldron.go"], importpath = "k8s.io/kubernetes/test/soak/cauldron", deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//test/e2e/framework:go_default_library", "//vendor/k8s.io/klog:go_default_library", diff --git a/test/soak/cauldron/cauldron.go b/test/soak/cauldron/cauldron.go index 63173667841f..3a920d2054db 100644 --- a/test/soak/cauldron/cauldron.go +++ b/test/soak/cauldron/cauldron.go @@ -29,13 +29,13 @@ import ( "net/http" "time" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" + clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" "k8s.io/klog" - api "k8s.io/kubernetes/pkg/apis/core" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/test/e2e/framework" ) @@ -72,9 +72,9 @@ func main() { klog.Fatalf("Failed to make client: %v", err) } - var nodes *api.NodeList + var nodes *corev1.NodeList for start := time.Now(); time.Since(start) < nodeListTimeout; time.Sleep(2 * time.Second) { - nodes, err = client.Core().Nodes().List(metav1.ListOptions{}) + nodes, err = client.CoreV1().Nodes().List(metav1.ListOptions{}) if err == nil { break } @@ -96,18 +96,18 @@ func main() { queries := *queriesAverage * len(nodes.Items) * *podsPerNode // Create a uniquely named namespace. - got, err := client.Core().Namespaces().Create(&api.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) + got, err := client.CoreV1().Namespaces().Create(&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) if err != nil { klog.Fatalf("Failed to create namespace: %v", err) } ns := got.Name defer func(ns string) { - if err := client.Core().Namespaces().Delete(ns, nil); err != nil { + if err := client.CoreV1().Namespaces().Delete(ns, nil); err != nil { klog.Warningf("Failed to delete namespace %s: %v", ns, err) } else { // wait until the namespace disappears for i := 0; i < int(namespaceDeleteTimeout/time.Second); i++ { - if _, err := client.Core().Namespaces().Get(ns, metav1.GetOptions{}); err != nil { + if _, err := client.CoreV1().Namespaces().Get(ns, metav1.GetOptions{}); err != nil { if errors.IsNotFound(err) { return } @@ -121,18 +121,18 @@ func main() { // Create a service for these pods. klog.Infof("Creating service %s/serve-hostnames", ns) // Make several attempts to create a service. - var svc *api.Service + var svc *corev1.Service for start := time.Now(); time.Since(start) < serviceCreateTimeout; time.Sleep(2 * time.Second) { t := time.Now() - svc, err = client.Core().Services(ns).Create(&api.Service{ + svc, err = client.CoreV1().Services(ns).Create(&corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "serve-hostnames", Labels: map[string]string{ "name": "serve-hostname", }, }, - Spec: api.ServiceSpec{ - Ports: []api.ServicePort{{ + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{{ Protocol: "TCP", Port: 9376, TargetPort: intstr.FromInt(9376), @@ -157,7 +157,7 @@ func main() { klog.Infof("Cleaning up service %s/serve-hostnames", ns) // Make several attempts to delete the service. for start := time.Now(); time.Since(start) < deleteTimeout; time.Sleep(1 * time.Second) { - if err := client.Core().Services(ns).Delete(svc.Name, nil); err == nil { + if err := client.CoreV1().Services(ns).Delete(svc.Name, nil); err == nil { return } klog.Warningf("After %v unable to delete service %s/%s: %v", time.Since(start), ns, svc.Name, err) @@ -174,19 +174,19 @@ func main() { for start := time.Now(); time.Since(start) < podCreateTimeout; time.Sleep(2 * time.Second) { klog.Infof("Creating pod %s/%s on node %s", ns, podName, node.Name) t := time.Now() - _, err = client.Core().Pods(ns).Create(&api.Pod{ + _, err = client.CoreV1().Pods(ns).Create(&corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": "serve-hostname", }, }, - Spec: api.PodSpec{ - Containers: []api.Container{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ { Name: "serve-hostname", Image: framework.ServeHostnameImage, - Ports: []api.ContainerPort{{ContainerPort: 9376}}, + Ports: []corev1.ContainerPort{{ContainerPort: 9376}}, }, }, NodeName: node.Name, @@ -210,7 +210,7 @@ func main() { // Make several attempts to delete the pods. for _, podName := range podNames { for start := time.Now(); time.Since(start) < deleteTimeout; time.Sleep(1 * time.Second) { - if err = client.Core().Pods(ns).Delete(podName, nil); err == nil { + if err = client.CoreV1().Pods(ns).Delete(podName, nil); err == nil { break } klog.Warningf("After %v failed to delete pod %s/%s: %v", time.Since(start), ns, podName, err) @@ -220,18 +220,18 @@ func main() { klog.Info("Waiting for the serve-hostname pods to be ready") for _, podName := range podNames { - var pod *api.Pod + var pod *corev1.Pod for start := time.Now(); time.Since(start) < podStartTimeout; time.Sleep(5 * time.Second) { - pod, err = client.Core().Pods(ns).Get(podName, metav1.GetOptions{}) + pod, err = client.CoreV1().Pods(ns).Get(podName, metav1.GetOptions{}) if err != nil { klog.Warningf("Get pod %s/%s failed, ignoring for %v: %v", ns, podName, err, podStartTimeout) continue } - if pod.Status.Phase == api.PodRunning { + if pod.Status.Phase == corev1.PodRunning { break } } - if pod.Status.Phase != api.PodRunning { + if pod.Status.Phase != corev1.PodRunning { klog.Warningf("Gave up waiting on pod %s/%s to be running (saw %v)", ns, podName, pod.Status.Phase) } else { klog.Infof("%s/%s is running", ns, podName)