From 32ede5901d9923227eb2aec0e8c9eade98da65cf Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Mon, 12 Dec 2022 09:58:48 +0800 Subject: [PATCH 1/2] bump k8s to v1.26 --- go.mod | 81 ++++---- go.sum | 177 ++++++++-------- pkg/client/clientset/versioned/clientset.go | 3 +- .../informers/externalversions/factory.go | 79 ++++++- .../listers/clientset/versioned/clientset.go | 121 ----------- pkg/client/listers/clientset/versioned/doc.go | 20 -- .../versioned/fake/clientset_generated.go | 85 -------- .../listers/clientset/versioned/fake/doc.go | 20 -- .../clientset/versioned/fake/register.go | 56 ----- .../listers/clientset/versioned/scheme/doc.go | 20 -- .../clientset/versioned/scheme/register.go | 56 ----- .../versioned/typed/kubeovn/v1/doc.go | 20 -- .../versioned/typed/kubeovn/v1/fake/doc.go | 20 -- .../typed/kubeovn/v1/fake/fake_htbqos.go | 122 ----------- .../typed/kubeovn/v1/fake/fake_ip.go | 122 ----------- .../kubeovn/v1/fake/fake_iptablesdnatrule.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_iptableseip.go | 133 ------------ .../kubeovn/v1/fake/fake_iptablesfiprule.go | 133 ------------ .../kubeovn/v1/fake/fake_iptablessnatrule.go | 133 ------------ .../kubeovn/v1/fake/fake_kubeovn_client.go | 108 ---------- .../typed/kubeovn/v1/fake/fake_ovneip.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_ovnfip.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_ovnsnatrule.go | 133 ------------ .../kubeovn/v1/fake/fake_providernetwork.go | 133 ------------ .../kubeovn/v1/fake/fake_securitygroup.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_subnet.go | 133 ------------ .../kubeovn/v1/fake/fake_switchlbrule.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_vip.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_vlan.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_vpc.go | 133 ------------ .../typed/kubeovn/v1/fake/fake_vpcdns.go | 133 ------------ .../kubeovn/v1/fake/fake_vpcnatgateway.go | 122 ----------- .../typed/kubeovn/v1/generated_expansion.go | 55 ----- .../versioned/typed/kubeovn/v1/htbqos.go | 168 --------------- .../versioned/typed/kubeovn/v1/ip.go | 168 --------------- .../typed/kubeovn/v1/iptablesdnatrule.go | 184 ----------------- .../versioned/typed/kubeovn/v1/iptableseip.go | 184 ----------------- .../typed/kubeovn/v1/iptablesfiprule.go | 184 ----------------- .../typed/kubeovn/v1/iptablessnatrule.go | 184 ----------------- .../typed/kubeovn/v1/kubeovn_client.go | 192 ------------------ .../versioned/typed/kubeovn/v1/ovneip.go | 184 ----------------- .../versioned/typed/kubeovn/v1/ovnfip.go | 184 ----------------- .../versioned/typed/kubeovn/v1/ovnsnatrule.go | 184 ----------------- .../typed/kubeovn/v1/providernetwork.go | 184 ----------------- .../typed/kubeovn/v1/securitygroup.go | 184 ----------------- .../versioned/typed/kubeovn/v1/subnet.go | 184 ----------------- .../typed/kubeovn/v1/switchlbrule.go | 184 ----------------- .../versioned/typed/kubeovn/v1/vip.go | 184 ----------------- .../versioned/typed/kubeovn/v1/vlan.go | 184 ----------------- .../versioned/typed/kubeovn/v1/vpc.go | 184 ----------------- .../versioned/typed/kubeovn/v1/vpcdns.go | 184 ----------------- .../typed/kubeovn/v1/vpcnatgateway.go | 168 --------------- .../informers/externalversions/factory.go | 180 ---------------- .../informers/externalversions/generic.go | 96 --------- .../internalinterfaces/factory_interfaces.go | 40 ---- .../externalversions/kubeovn/interface.go | 46 ----- .../externalversions/kubeovn/v1/htbqos.go | 89 -------- .../externalversions/kubeovn/v1/interface.go | 164 --------------- .../externalversions/kubeovn/v1/ip.go | 89 -------- .../kubeovn/v1/iptablesdnatrule.go | 89 -------- .../kubeovn/v1/iptableseip.go | 89 -------- .../kubeovn/v1/iptablesfiprule.go | 89 -------- .../kubeovn/v1/iptablessnatrule.go | 89 -------- .../externalversions/kubeovn/v1/ovneip.go | 89 -------- .../externalversions/kubeovn/v1/ovnfip.go | 89 -------- .../kubeovn/v1/ovnsnatrule.go | 89 -------- .../kubeovn/v1/providernetwork.go | 89 -------- .../kubeovn/v1/securitygroup.go | 89 -------- .../externalversions/kubeovn/v1/subnet.go | 89 -------- .../kubeovn/v1/switchlbrule.go | 89 -------- .../externalversions/kubeovn/v1/vip.go | 89 -------- .../externalversions/kubeovn/v1/vlan.go | 89 -------- .../externalversions/kubeovn/v1/vpc.go | 89 -------- .../externalversions/kubeovn/v1/vpcdns.go | 89 -------- .../kubeovn/v1/vpcnatgateway.go | 89 -------- .../listers/kubeovn/v1/expansion_generated.go | 91 --------- .../listers/listers/kubeovn/v1/htbqos.go | 65 ------ pkg/client/listers/listers/kubeovn/v1/ip.go | 65 ------ .../listers/kubeovn/v1/iptablesdnatrule.go | 65 ------ .../listers/listers/kubeovn/v1/iptableseip.go | 65 ------ .../listers/kubeovn/v1/iptablesfiprule.go | 65 ------ .../listers/kubeovn/v1/iptablessnatrule.go | 65 ------ .../listers/listers/kubeovn/v1/ovneip.go | 65 ------ .../listers/listers/kubeovn/v1/ovnfip.go | 65 ------ .../listers/listers/kubeovn/v1/ovnsnatrule.go | 65 ------ .../listers/kubeovn/v1/providernetwork.go | 65 ------ .../listers/kubeovn/v1/securitygroup.go | 65 ------ .../listers/listers/kubeovn/v1/subnet.go | 65 ------ .../listers/kubeovn/v1/switchlbrule.go | 65 ------ pkg/client/listers/listers/kubeovn/v1/vip.go | 65 ------ pkg/client/listers/listers/kubeovn/v1/vlan.go | 65 ------ pkg/client/listers/listers/kubeovn/v1/vpc.go | 65 ------ .../listers/listers/kubeovn/v1/vpcdns.go | 65 ------ .../listers/kubeovn/v1/vpcnatgateway.go | 65 ------ yamls/kind.yaml.j2 | 2 +- 95 files changed, 213 insertions(+), 9916 deletions(-) delete mode 100644 pkg/client/listers/clientset/versioned/clientset.go delete mode 100644 pkg/client/listers/clientset/versioned/doc.go delete mode 100644 pkg/client/listers/clientset/versioned/fake/clientset_generated.go delete mode 100644 pkg/client/listers/clientset/versioned/fake/doc.go delete mode 100644 pkg/client/listers/clientset/versioned/fake/register.go delete mode 100644 pkg/client/listers/clientset/versioned/scheme/doc.go delete mode 100644 pkg/client/listers/clientset/versioned/scheme/register.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/doc.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/doc.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_htbqos.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesdnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptableseip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesfiprule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablessnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_kubeovn_client.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovneip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnfip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnsnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_providernetwork.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_securitygroup.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_subnet.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_switchlbrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vlan.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpc.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcdns.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcnatgateway.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/generated_expansion.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/htbqos.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesdnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptableseip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesfiprule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablessnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/kubeovn_client.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovneip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnfip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnsnatrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/providernetwork.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/securitygroup.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/subnet.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/switchlbrule.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vip.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vlan.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpc.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcdns.go delete mode 100644 pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcnatgateway.go delete mode 100644 pkg/client/listers/informers/externalversions/factory.go delete mode 100644 pkg/client/listers/informers/externalversions/generic.go delete mode 100644 pkg/client/listers/informers/externalversions/internalinterfaces/factory_interfaces.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/interface.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/htbqos.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/interface.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/ip.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesdnatrule.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/iptableseip.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesfiprule.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/iptablessnatrule.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/ovneip.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/ovnfip.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/ovnsnatrule.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/providernetwork.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/securitygroup.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/subnet.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/switchlbrule.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/vip.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/vlan.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/vpc.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/vpcdns.go delete mode 100644 pkg/client/listers/informers/externalversions/kubeovn/v1/vpcnatgateway.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/expansion_generated.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/htbqos.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/ip.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/iptablesdnatrule.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/iptableseip.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/iptablesfiprule.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/iptablessnatrule.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/ovneip.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/ovnfip.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/ovnsnatrule.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/providernetwork.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/securitygroup.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/subnet.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/switchlbrule.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/vip.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/vlan.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/vpc.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/vpcdns.go delete mode 100644 pkg/client/listers/listers/kubeovn/v1/vpcnatgateway.go diff --git a/go.mod b/go.mod index cdbd6cc88cb..8af4c480860 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/moby/sys/mountinfo v0.6.2 github.com/neverlee/keymutex v0.0.0-20171121013845-f593aa834bf9 github.com/oilbeater/go-ping v0.0.0-20200413021620-332b7197c5b5 - github.com/onsi/ginkgo/v2 v2.5.1 + github.com/onsi/ginkgo/v2 v2.6.0 github.com/onsi/gomega v1.24.1 github.com/osrg/gobgp/v3 v3.9.0 github.com/ovn-org/libovsdb v0.0.0-20221101143603-8f21d188c3a5 @@ -32,25 +32,26 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 github.com/vishvananda/netlink v1.2.1-beta.2 - golang.org/x/exp v0.0.0-20221208044002-44028be4359e + golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 golang.org/x/sys v0.3.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.51.0 google.golang.org/protobuf v1.28.1 gopkg.in/k8snetworkplumbingwg/multus-cni.v3 v3.9.2 - k8s.io/api v0.25.5 - k8s.io/apimachinery v0.25.5 + k8s.io/api v0.26.0 + k8s.io/apimachinery v0.26.0 k8s.io/client-go v12.0.0+incompatible k8s.io/klog/v2 v2.80.1 - k8s.io/kubernetes v1.25.4 - k8s.io/sample-controller v0.25.5 + k8s.io/kubernetes v1.26.0 + k8s.io/sample-controller v0.26.0 k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 kubevirt.io/client-go v0.58.0 - sigs.k8s.io/controller-runtime v0.13.1 + sigs.k8s.io/controller-runtime v0.0.0-20221211125314-222fb669e109 ) require ( github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenk/hub v1.0.1 // indirect github.com/cenkalti/hub v1.0.1 // indirect @@ -146,13 +147,13 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.4 // indirect - k8s.io/apiserver v0.25.4 // indirect - k8s.io/cluster-bootstrap v0.25.4 // indirect - k8s.io/component-base v0.25.4 // indirect - k8s.io/component-helpers v0.25.4 // indirect + k8s.io/apiextensions-apiserver v0.26.0 // indirect + k8s.io/apiserver v0.26.0 // indirect + k8s.io/cluster-bootstrap v0.26.0 // indirect + k8s.io/component-base v0.26.0 // indirect + k8s.io/component-helpers v0.26.0 // indirect k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715 // indirect - k8s.io/kube-proxy v0.25.4 // indirect + k8s.io/kube-proxy v0.26.0 // indirect kubevirt.io/api v0.58.0 // indirect kubevirt.io/containerized-data-importer-api v1.55.1 // indirect kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 // indirect @@ -165,33 +166,35 @@ require ( replace ( github.com/alauda/felix => github.com/kubeovn/felix v0.0.0-20220325073257-c8a0f705d139 github.com/greenpau/ovsdb => github.com/alauda/ovsdb v0.0.0-20210113100339-040cf3e76c28 + github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.4.0 github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20221107163225-3335a34a1d24 github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8 gopkg.in/k8snetworkplumbingwg/multus-cni.v3 => github.com/k8snetworkplumbingwg/multus-cni v0.0.0-20220818150730-3d9cec4ec9d5 - k8s.io/api => k8s.io/api v0.25.4 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.4 - k8s.io/apimachinery => k8s.io/apimachinery v0.25.4 - k8s.io/apiserver => k8s.io/apiserver v0.25.4 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.4 - k8s.io/client-go => k8s.io/client-go v0.25.4 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.25.4 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.25.4 - k8s.io/code-generator => k8s.io/code-generator v0.25.4 - k8s.io/component-base => k8s.io/component-base v0.25.4 - k8s.io/component-helpers => k8s.io/component-helpers v0.25.4 - k8s.io/controller-manager => k8s.io/controller-manager v0.25.4 - k8s.io/cri-api => k8s.io/cri-api v0.25.4 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.25.4 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.25.4 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.25.4 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.25.4 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.25.4 - k8s.io/kubectl => k8s.io/kubectl v0.25.4 - k8s.io/kubelet => k8s.io/kubelet v0.25.4 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.25.4 - k8s.io/metrics => k8s.io/metrics v0.25.4 - k8s.io/mount-utils => k8s.io/mount-utils v0.25.4 - k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.25.4 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.25.4 - kubevirt.io/client-go => github.com/kubeovn/kubevirt-client-go v0.0.0-20221124062348-dc7672cf3995 + k8s.io/api => k8s.io/api v0.26.0 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.26.0 + k8s.io/apiserver => k8s.io/apiserver v0.26.0 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.26.0 + k8s.io/client-go => k8s.io/client-go v0.26.0 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.26.0 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.26.0 + k8s.io/code-generator => k8s.io/code-generator v0.26.0 + k8s.io/component-base => k8s.io/component-base v0.26.0 + k8s.io/component-helpers => k8s.io/component-helpers v0.26.0 + k8s.io/controller-manager => k8s.io/controller-manager v0.26.0 + k8s.io/cri-api => k8s.io/cri-api v0.26.0 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.26.0 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.26.0 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.26.0 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.26.0 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.26.0 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.26.0 + k8s.io/kubectl => k8s.io/kubectl v0.26.0 + k8s.io/kubelet => k8s.io/kubelet v0.26.0 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.26.0 + k8s.io/metrics => k8s.io/metrics v0.26.0 + k8s.io/mount-utils => k8s.io/mount-utils v0.26.0 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.26.0 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.26.0 + kubevirt.io/client-go => github.com/kubeovn/kubevirt-client-go v0.0.0-20221209084839-9c2ed1f0604d ) diff --git a/go.sum b/go.sum index 3e6145e60c8..6ce631b25c0 100644 --- a/go.sum +++ b/go.sum @@ -61,28 +61,19 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -137,6 +128,7 @@ github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9 github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220418222510-f25a4f6275ed/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -151,7 +143,6 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -166,6 +157,7 @@ github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edY github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= @@ -182,6 +174,7 @@ github.com/cenk/hub v1.0.1 h1:RBwXNOF4a8KjD8BJ08XqN8KbrqaGiQLDrgvUGJSHuPA= github.com/cenk/hub v1.0.1/go.mod h1:rJM1LNAW0ppT8FMMuPK6c2NP/R2nH/UthtuRySSaf6Y= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cenkalti/hub v1.0.1 h1:UMtjc6dHSaOQTO15SVA50MBIR9zQwvsukQupDrkIRtg= @@ -216,6 +209,7 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -338,7 +332,7 @@ github.com/coreos/prometheus-operator v0.38.0/go.mod h1:xZC7/TgeC0/mBaJk+1H9dbHa github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= @@ -394,6 +388,7 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -403,6 +398,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= @@ -415,7 +411,7 @@ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -486,7 +482,6 @@ github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= @@ -545,8 +540,6 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -682,6 +675,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -731,6 +725,7 @@ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -796,8 +791,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubeovn/felix v0.0.0-20220325073257-c8a0f705d139 h1:MaLC8/dohKHU8nkfglfE2oikefB6urJG75yZDOcKTRU= github.com/kubeovn/felix v0.0.0-20220325073257-c8a0f705d139/go.mod h1:ulxnUH9cbIOtCH+exhJPeV2mleh+bDv67WKsl/MVU/g= -github.com/kubeovn/kubevirt-client-go v0.0.0-20221124062348-dc7672cf3995 h1:vFkuCrlhmzpmPw8+OaEgAOKjns88v6goiMZPNduHXtQ= -github.com/kubeovn/kubevirt-client-go v0.0.0-20221124062348-dc7672cf3995/go.mod h1:Xrw0MvOCGZeQ9/OGTiHheQLuvMPDMWcGyL47UjtviVM= +github.com/kubeovn/kubevirt-client-go v0.0.0-20221209084839-9c2ed1f0604d h1:sM7V2MhONBa10zYQA1yg/UbPm/Y7JqVqymtgoDiGqMo= +github.com/kubeovn/kubevirt-client-go v0.0.0-20221209084839-9c2ed1f0604d/go.mod h1:FjHUGVwls5NE1q8rsSL0LsRU46p35cwgnwSItkr8oXs= github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8 h1:gkYOU8DJQJeDef9hYETOf0D270zVS3xYuytjFLEi0rc= github.com/kubeovn/libovsdb v0.0.0-20221208095821-f8830e1998e8/go.mod h1:N20zsElkDpTm57hVDosiZVghprt9Y4Vfqsi1HBXOzr4= github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA= @@ -835,6 +830,7 @@ github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= @@ -877,7 +873,7 @@ github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2J github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -921,12 +917,8 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.5.1 h1:auzK7OI497k6x4OvWq+TKAcpcSAlod0doAH72oIN0Jw= -github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= +github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -939,7 +931,8 @@ github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDs github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1123,7 +1116,6 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1134,7 +1126,7 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1226,13 +1218,13 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.etcd.io/etcd/pkg/v3 v3.5.4/go.mod h1:OI+TtO+Aa3nhQSppMbwE4ld3uF1/fqqwbpfndbbrEe0= -go.etcd.io/etcd/raft/v3 v3.5.4/go.mod h1:SCuunjYvZFC0fBX0vxMSPjuZmpcSk+XaAcMrD6Do03w= -go.etcd.io/etcd/server/v3 v3.5.4/go.mod h1:S5/YTU15KxymM5l3T6b09sNOHPXqGYIZStpuuGbb65c= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= +go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= +go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= +go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1246,24 +1238,33 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= +go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= +go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= +go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= +go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1272,7 +1273,7 @@ go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1297,9 +1298,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1310,8 +1310,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20221208044002-44028be4359e h1:lTjJJUAuWTLRn0pXoNLiVZIFYOIpvmg3MxmZxgO09bM= -golang.org/x/exp v0.0.0-20221208044002-44028be4359e/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 h1:T8EldfGCcveFMewH5xAYxxoX3PSQMrsechlUGVFlQBU= +golang.org/x/exp v0.0.0-20221211140036-ad323defaf05/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1340,6 +1340,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1408,8 +1409,9 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1442,6 +1444,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1560,15 +1563,16 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1582,6 +1586,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1669,6 +1674,7 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1781,6 +1787,7 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70= @@ -1817,8 +1824,11 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1894,28 +1904,29 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= -k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= -k8s.io/apiextensions-apiserver v0.25.4 h1:7hu9pF+xikxQuQZ7/30z/qxIPZc2J1lFElPtr7f+B6U= -k8s.io/apiextensions-apiserver v0.25.4/go.mod h1:bkSGki5YBoZWdn5pWtNIdGvDrrsRWlmnvl9a+tAw5vQ= -k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= -k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= -k8s.io/apiserver v0.25.4 h1:/3TwZcgLqX7wUxq7TtXOUqXeBTwXIblVMQdhR5XZ7yo= -k8s.io/apiserver v0.25.4/go.mod h1:rPcm567XxjOnnd7jedDUnGJGmDGAo+cT6H7QHAN+xV0= -k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8= -k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= -k8s.io/cluster-bootstrap v0.25.4 h1:m50ICwMsEW13N7Z/tdTmLwELGHt4SJEJaeriPdQRxs0= -k8s.io/cluster-bootstrap v0.25.4/go.mod h1:q6XZzStf/uGcXUZhMHmRB8ael1k+bv8//AajQ6FPJag= -k8s.io/code-generator v0.25.4/go.mod h1:9F5fuVZOMWRme7MYj2YT3L9ropPWPokd9VRhVyD3+0w= -k8s.io/component-base v0.25.4 h1:n1bjg9Yt+G1C0WnIDJmg2fo6wbEU1UGMRiQSjmj7hNQ= -k8s.io/component-base v0.25.4/go.mod h1:nnZJU8OP13PJEm6/p5V2ztgX2oyteIaAGKGMYb2L2cY= -k8s.io/component-helpers v0.25.4 h1:FIwp5ZzjaA7p0lekHQM28E7qTd9Aetx5O9e7r4n2Kqo= -k8s.io/component-helpers v0.25.4/go.mod h1:X4KJ8SsJ/onWcDQkRhcE2WRG/iNMufCl7RsNSYtguJg= -k8s.io/cri-api v0.25.4/go.mod h1:riC/P0yOGUf2K1735wW+CXs1aY2ctBgePtnnoFLd0dU= +k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I= +k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg= +k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= +k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= +k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg= +k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/apiserver v0.26.0 h1:q+LqIK5EZwdznGZb8bq0+a+vCqdeEEe4Ux3zsOjbc4o= +k8s.io/apiserver v0.26.0/go.mod h1:aWhlLD+mU+xRo+zhkvP/gFNbShI4wBDHS33o0+JGI84= +k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= +k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= +k8s.io/cluster-bootstrap v0.26.0 h1:jd6T3WmpZo6TpmIHqg1wc4bX/BLsGC8Tzle/VKI9vRo= +k8s.io/cluster-bootstrap v0.26.0/go.mod h1:daR7iryq3QgPGqyuhlwdQ3jBkvrl2SBGjFYrcL6fZ7s= +k8s.io/code-generator v0.26.0/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= +k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= +k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8= +k8s.io/component-helpers v0.26.0 h1:KNgwqs3EUdK0HLfW4GhnbD+q/Zl9U021VfIU7qoVYFk= +k8s.io/component-helpers v0.26.0/go.mod h1:jHN01qS/Jdj95WCbTe9S2VZ9yxpxXNY488WjF+yW4fo= +k8s.io/cri-api v0.26.0/go.mod h1:I5TGOn/ziMzqIcUvsYZzVE8xDAB1JBkvcwvR0yDreuw= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= @@ -1924,26 +1935,26 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.26.0/go.mod h1:ReC1IEGuxgfN+PDCIpR6w8+XMmDE7uJhxcCwMZFdIYc= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715 h1:tBEbstoM+K0FiBV5KGAKQ0kuvf54v/hwpldiJt69w1s= k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kube-proxy v0.25.4 h1:1pzWWs+4j2IVVg3ljnhWwG0Qot+w3ohEhvON99wRS1M= -k8s.io/kube-proxy v0.25.4/go.mod h1:k76TWxXoQwclQfH/NU6SFmOjPJt7h+11PGwgx0OR8T0= +k8s.io/kube-proxy v0.26.0 h1:VBC83bWr5L4GKSxRFz0YBbwGgQITc0+p8avGzw0LNKo= +k8s.io/kube-proxy v0.26.0/go.mod h1:4kz3dPdMUnspJnFgoJG9lWn1UCiho85Gyn1WLInK0XA= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.25.4 h1:M1+MR8IxE64zHhSSDn30twChLaOI+p0Kt77pvyQMKwU= -k8s.io/kubernetes v1.25.4/go.mod h1:lvEY+3iJhh+sGIK1LorGkI56rW0eLGsfalnp68wQwYU= -k8s.io/sample-controller v0.25.5 h1:pmQYG9DFX2kyDCUnS4r0c+mbCpiU/tgdiAYFJezBnaw= -k8s.io/sample-controller v0.25.5/go.mod h1:O304kQz5j23hWAbsu4OroeSHt/7RghBuzkKkjIzyI3E= +k8s.io/kubernetes v1.26.0 h1:fL8VMr4xlfTazPORLhz5fsvO5I3bsFpmynVxZTH1ItQ= +k8s.io/kubernetes v1.26.0/go.mod h1:z0aCJwn6DxzB/dDiWLbQaJO5jWOR2qoaCMnmSAx45XM= +k8s.io/sample-controller v0.26.0 h1:cOEpHfipQYZRiQAZDyJrGrBZLIi5q3y2jKBCxU1GU8E= +k8s.io/sample-controller v0.26.0/go.mod h1:t8CYIAljtF67tvO1tzBzfXUmEbnHf1dupDG/orwCsjY= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kubevirt.io/api v0.58.0 h1:qeNeRtD6AIJ5WVJuRXajmmXtnrO5dYchy+hpCm6QwhE= @@ -1958,8 +1969,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33/go.mod h1:soWkSNf2tZC7aMibXEqVhCd73GOY5fJikn8qbdzemB0= -sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= -sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.0.0-20221211125314-222fb669e109 h1:+tDs4g6sAbPSVahRtUyLLwV+dryt4EOefGR4R5xcELA= +sigs.k8s.io/controller-runtime v0.0.0-20221211125314-222fb669e109/go.mod h1:Sfz/i9onkzbOA3LgIzvVDfl4b3f3CS4ij6hEXQkMqx8= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 4dfab592983..6681321648f 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -33,8 +33,7 @@ type Interface interface { KubeovnV1() kubeovnv1.KubeovnV1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient kubeovnV1 *kubeovnv1.KubeovnV1Client diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index baba604c99f..83e87c3c836 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -47,6 +47,11 @@ type sharedInformerFactory struct { // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool } // WithCustomResyncConfig sets a custom resync period for the specified informer types. @@ -107,20 +112,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() + if f.shuttingDown { + return + } + for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - go informer.Run(stopCh) + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() f.startedInformers[informerType] = true } } } -// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() @@ -167,11 +191,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // SharedInformerFactory provides shared informers for resources in all known // API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InternalInformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + Kubeovn() kubeovn.Interface } diff --git a/pkg/client/listers/clientset/versioned/clientset.go b/pkg/client/listers/clientset/versioned/clientset.go deleted file mode 100644 index 4dfab592983..00000000000 --- a/pkg/client/listers/clientset/versioned/clientset.go +++ /dev/null @@ -1,121 +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 versioned - -import ( - "fmt" - "net/http" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/typed/kubeovn/v1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - KubeovnV1() kubeovnv1.KubeovnV1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - kubeovnV1 *kubeovnv1.KubeovnV1Client -} - -// KubeovnV1 retrieves the KubeovnV1Client -func (c *Clientset) KubeovnV1() kubeovnv1.KubeovnV1Interface { - return c.kubeovnV1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.kubeovnV1, err = kubeovnv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.kubeovnV1 = kubeovnv1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/pkg/client/listers/clientset/versioned/doc.go b/pkg/client/listers/clientset/versioned/doc.go deleted file mode 100644 index 41721ca52d4..00000000000 --- a/pkg/client/listers/clientset/versioned/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 versioned diff --git a/pkg/client/listers/clientset/versioned/fake/clientset_generated.go b/pkg/client/listers/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 164d4abfa66..00000000000 --- a/pkg/client/listers/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,85 +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 ( - clientset "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/typed/kubeovn/v1" - fakekubeovnv1 "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/typed/kubeovn/v1/fake" - "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" -) - -// 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{} - _ testing.FakeClient = &Clientset{} -) - -// KubeovnV1 retrieves the KubeovnV1Client -func (c *Clientset) KubeovnV1() kubeovnv1.KubeovnV1Interface { - return &fakekubeovnv1.FakeKubeovnV1{Fake: &c.Fake} -} diff --git a/pkg/client/listers/clientset/versioned/fake/doc.go b/pkg/client/listers/clientset/versioned/fake/doc.go deleted file mode 100644 index 9b99e716709..00000000000 --- a/pkg/client/listers/clientset/versioned/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/listers/clientset/versioned/fake/register.go b/pkg/client/listers/clientset/versioned/fake/register.go deleted file mode 100644 index fa092d649c1..00000000000 --- a/pkg/client/listers/clientset/versioned/fake/register.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 ( - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - kubeovnv1.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/listers/clientset/versioned/scheme/doc.go b/pkg/client/listers/clientset/versioned/scheme/doc.go deleted file mode 100644 index 7dc3756168f..00000000000 --- a/pkg/client/listers/clientset/versioned/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/listers/clientset/versioned/scheme/register.go b/pkg/client/listers/clientset/versioned/scheme/register.go deleted file mode 100644 index 0aa2b12abff..00000000000 --- a/pkg/client/listers/clientset/versioned/scheme/register.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 scheme - -import ( - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - kubeovnv1.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/listers/clientset/versioned/typed/kubeovn/v1/doc.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/doc.go deleted file mode 100644 index 3af5d054f10..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/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 v1 diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/doc.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/doc.go deleted file mode 100644 index 16f44399065..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/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/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_htbqos.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_htbqos.go deleted file mode 100644 index da95cb21262..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_htbqos.go +++ /dev/null @@ -1,122 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeHtbQoses implements HtbQosInterface -type FakeHtbQoses struct { - Fake *FakeKubeovnV1 -} - -var htbqosesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "htbqoses"} - -var htbqosesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "HtbQos"} - -// Get takes name of the htbQos, and returns the corresponding htbQos object, and an error if there is any. -func (c *FakeHtbQoses) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.HtbQos, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(htbqosesResource, name), &kubeovnv1.HtbQos{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.HtbQos), err -} - -// List takes label and field selectors, and returns the list of HtbQoses that match those selectors. -func (c *FakeHtbQoses) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.HtbQosList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(htbqosesResource, htbqosesKind, opts), &kubeovnv1.HtbQosList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.HtbQosList{ListMeta: obj.(*kubeovnv1.HtbQosList).ListMeta} - for _, item := range obj.(*kubeovnv1.HtbQosList).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 htbQoses. -func (c *FakeHtbQoses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(htbqosesResource, opts)) -} - -// Create takes the representation of a htbQos and creates it. Returns the server's representation of the htbQos, and an error, if there is any. -func (c *FakeHtbQoses) Create(ctx context.Context, htbQos *kubeovnv1.HtbQos, opts v1.CreateOptions) (result *kubeovnv1.HtbQos, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(htbqosesResource, htbQos), &kubeovnv1.HtbQos{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.HtbQos), err -} - -// Update takes the representation of a htbQos and updates it. Returns the server's representation of the htbQos, and an error, if there is any. -func (c *FakeHtbQoses) Update(ctx context.Context, htbQos *kubeovnv1.HtbQos, opts v1.UpdateOptions) (result *kubeovnv1.HtbQos, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(htbqosesResource, htbQos), &kubeovnv1.HtbQos{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.HtbQos), err -} - -// Delete takes name of the htbQos and deletes it. Returns an error if one occurs. -func (c *FakeHtbQoses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(htbqosesResource, name, opts), &kubeovnv1.HtbQos{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeHtbQoses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(htbqosesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.HtbQosList{}) - return err -} - -// Patch applies the patch and returns the patched htbQos. -func (c *FakeHtbQoses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.HtbQos, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(htbqosesResource, name, pt, data, subresources...), &kubeovnv1.HtbQos{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.HtbQos), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ip.go deleted file mode 100644 index 4ea825e77ee..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ip.go +++ /dev/null @@ -1,122 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeIPs implements IPInterface -type FakeIPs struct { - Fake *FakeKubeovnV1 -} - -var ipsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "ips"} - -var ipsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "IP"} - -// Get takes name of the iP, and returns the corresponding iP object, and an error if there is any. -func (c *FakeIPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.IP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ipsResource, name), &kubeovnv1.IP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IP), err -} - -// List takes label and field selectors, and returns the list of IPs that match those selectors. -func (c *FakeIPs) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.IPList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ipsResource, ipsKind, opts), &kubeovnv1.IPList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.IPList{ListMeta: obj.(*kubeovnv1.IPList).ListMeta} - for _, item := range obj.(*kubeovnv1.IPList).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 iPs. -func (c *FakeIPs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ipsResource, opts)) -} - -// Create takes the representation of a iP and creates it. Returns the server's representation of the iP, and an error, if there is any. -func (c *FakeIPs) Create(ctx context.Context, iP *kubeovnv1.IP, opts v1.CreateOptions) (result *kubeovnv1.IP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ipsResource, iP), &kubeovnv1.IP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IP), err -} - -// Update takes the representation of a iP and updates it. Returns the server's representation of the iP, and an error, if there is any. -func (c *FakeIPs) Update(ctx context.Context, iP *kubeovnv1.IP, opts v1.UpdateOptions) (result *kubeovnv1.IP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ipsResource, iP), &kubeovnv1.IP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IP), err -} - -// Delete takes name of the iP and deletes it. Returns an error if one occurs. -func (c *FakeIPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ipsResource, name, opts), &kubeovnv1.IP{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIPs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ipsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.IPList{}) - return err -} - -// Patch applies the patch and returns the patched iP. -func (c *FakeIPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.IP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ipsResource, name, pt, data, subresources...), &kubeovnv1.IP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IP), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesdnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesdnatrule.go deleted file mode 100644 index 76526eff581..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesdnatrule.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeIptablesDnatRules implements IptablesDnatRuleInterface -type FakeIptablesDnatRules struct { - Fake *FakeKubeovnV1 -} - -var iptablesdnatrulesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "iptables-dnat-rules"} - -var iptablesdnatrulesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "IptablesDnatRule"} - -// Get takes name of the iptablesDnatRule, and returns the corresponding iptablesDnatRule object, and an error if there is any. -func (c *FakeIptablesDnatRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.IptablesDnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(iptablesdnatrulesResource, name), &kubeovnv1.IptablesDnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesDnatRule), err -} - -// List takes label and field selectors, and returns the list of IptablesDnatRules that match those selectors. -func (c *FakeIptablesDnatRules) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.IptablesDnatRuleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(iptablesdnatrulesResource, iptablesdnatrulesKind, opts), &kubeovnv1.IptablesDnatRuleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.IptablesDnatRuleList{ListMeta: obj.(*kubeovnv1.IptablesDnatRuleList).ListMeta} - for _, item := range obj.(*kubeovnv1.IptablesDnatRuleList).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 iptablesDnatRules. -func (c *FakeIptablesDnatRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(iptablesdnatrulesResource, opts)) -} - -// Create takes the representation of a iptablesDnatRule and creates it. Returns the server's representation of the iptablesDnatRule, and an error, if there is any. -func (c *FakeIptablesDnatRules) Create(ctx context.Context, iptablesDnatRule *kubeovnv1.IptablesDnatRule, opts v1.CreateOptions) (result *kubeovnv1.IptablesDnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(iptablesdnatrulesResource, iptablesDnatRule), &kubeovnv1.IptablesDnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesDnatRule), err -} - -// Update takes the representation of a iptablesDnatRule and updates it. Returns the server's representation of the iptablesDnatRule, and an error, if there is any. -func (c *FakeIptablesDnatRules) Update(ctx context.Context, iptablesDnatRule *kubeovnv1.IptablesDnatRule, opts v1.UpdateOptions) (result *kubeovnv1.IptablesDnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(iptablesdnatrulesResource, iptablesDnatRule), &kubeovnv1.IptablesDnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesDnatRule), 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 *FakeIptablesDnatRules) UpdateStatus(ctx context.Context, iptablesDnatRule *kubeovnv1.IptablesDnatRule, opts v1.UpdateOptions) (*kubeovnv1.IptablesDnatRule, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(iptablesdnatrulesResource, "status", iptablesDnatRule), &kubeovnv1.IptablesDnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesDnatRule), err -} - -// Delete takes name of the iptablesDnatRule and deletes it. Returns an error if one occurs. -func (c *FakeIptablesDnatRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(iptablesdnatrulesResource, name, opts), &kubeovnv1.IptablesDnatRule{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIptablesDnatRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(iptablesdnatrulesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.IptablesDnatRuleList{}) - return err -} - -// Patch applies the patch and returns the patched iptablesDnatRule. -func (c *FakeIptablesDnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.IptablesDnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(iptablesdnatrulesResource, name, pt, data, subresources...), &kubeovnv1.IptablesDnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesDnatRule), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptableseip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptableseip.go deleted file mode 100644 index 3634fa55370..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptableseip.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeIptablesEIPs implements IptablesEIPInterface -type FakeIptablesEIPs struct { - Fake *FakeKubeovnV1 -} - -var iptableseipsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "iptables-eips"} - -var iptableseipsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "IptablesEIP"} - -// Get takes name of the iptablesEIP, and returns the corresponding iptablesEIP object, and an error if there is any. -func (c *FakeIptablesEIPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.IptablesEIP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(iptableseipsResource, name), &kubeovnv1.IptablesEIP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesEIP), err -} - -// List takes label and field selectors, and returns the list of IptablesEIPs that match those selectors. -func (c *FakeIptablesEIPs) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.IptablesEIPList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(iptableseipsResource, iptableseipsKind, opts), &kubeovnv1.IptablesEIPList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.IptablesEIPList{ListMeta: obj.(*kubeovnv1.IptablesEIPList).ListMeta} - for _, item := range obj.(*kubeovnv1.IptablesEIPList).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 iptablesEIPs. -func (c *FakeIptablesEIPs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(iptableseipsResource, opts)) -} - -// Create takes the representation of a iptablesEIP and creates it. Returns the server's representation of the iptablesEIP, and an error, if there is any. -func (c *FakeIptablesEIPs) Create(ctx context.Context, iptablesEIP *kubeovnv1.IptablesEIP, opts v1.CreateOptions) (result *kubeovnv1.IptablesEIP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(iptableseipsResource, iptablesEIP), &kubeovnv1.IptablesEIP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesEIP), err -} - -// Update takes the representation of a iptablesEIP and updates it. Returns the server's representation of the iptablesEIP, and an error, if there is any. -func (c *FakeIptablesEIPs) Update(ctx context.Context, iptablesEIP *kubeovnv1.IptablesEIP, opts v1.UpdateOptions) (result *kubeovnv1.IptablesEIP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(iptableseipsResource, iptablesEIP), &kubeovnv1.IptablesEIP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesEIP), 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 *FakeIptablesEIPs) UpdateStatus(ctx context.Context, iptablesEIP *kubeovnv1.IptablesEIP, opts v1.UpdateOptions) (*kubeovnv1.IptablesEIP, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(iptableseipsResource, "status", iptablesEIP), &kubeovnv1.IptablesEIP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesEIP), err -} - -// Delete takes name of the iptablesEIP and deletes it. Returns an error if one occurs. -func (c *FakeIptablesEIPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(iptableseipsResource, name, opts), &kubeovnv1.IptablesEIP{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIptablesEIPs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(iptableseipsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.IptablesEIPList{}) - return err -} - -// Patch applies the patch and returns the patched iptablesEIP. -func (c *FakeIptablesEIPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.IptablesEIP, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(iptableseipsResource, name, pt, data, subresources...), &kubeovnv1.IptablesEIP{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesEIP), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesfiprule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesfiprule.go deleted file mode 100644 index 9728282aaa8..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablesfiprule.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeIptablesFIPRules implements IptablesFIPRuleInterface -type FakeIptablesFIPRules struct { - Fake *FakeKubeovnV1 -} - -var iptablesfiprulesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "iptables-fip-rules"} - -var iptablesfiprulesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "IptablesFIPRule"} - -// Get takes name of the iptablesFIPRule, and returns the corresponding iptablesFIPRule object, and an error if there is any. -func (c *FakeIptablesFIPRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.IptablesFIPRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(iptablesfiprulesResource, name), &kubeovnv1.IptablesFIPRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesFIPRule), err -} - -// List takes label and field selectors, and returns the list of IptablesFIPRules that match those selectors. -func (c *FakeIptablesFIPRules) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.IptablesFIPRuleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(iptablesfiprulesResource, iptablesfiprulesKind, opts), &kubeovnv1.IptablesFIPRuleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.IptablesFIPRuleList{ListMeta: obj.(*kubeovnv1.IptablesFIPRuleList).ListMeta} - for _, item := range obj.(*kubeovnv1.IptablesFIPRuleList).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 iptablesFIPRules. -func (c *FakeIptablesFIPRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(iptablesfiprulesResource, opts)) -} - -// Create takes the representation of a iptablesFIPRule and creates it. Returns the server's representation of the iptablesFIPRule, and an error, if there is any. -func (c *FakeIptablesFIPRules) Create(ctx context.Context, iptablesFIPRule *kubeovnv1.IptablesFIPRule, opts v1.CreateOptions) (result *kubeovnv1.IptablesFIPRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(iptablesfiprulesResource, iptablesFIPRule), &kubeovnv1.IptablesFIPRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesFIPRule), err -} - -// Update takes the representation of a iptablesFIPRule and updates it. Returns the server's representation of the iptablesFIPRule, and an error, if there is any. -func (c *FakeIptablesFIPRules) Update(ctx context.Context, iptablesFIPRule *kubeovnv1.IptablesFIPRule, opts v1.UpdateOptions) (result *kubeovnv1.IptablesFIPRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(iptablesfiprulesResource, iptablesFIPRule), &kubeovnv1.IptablesFIPRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesFIPRule), 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 *FakeIptablesFIPRules) UpdateStatus(ctx context.Context, iptablesFIPRule *kubeovnv1.IptablesFIPRule, opts v1.UpdateOptions) (*kubeovnv1.IptablesFIPRule, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(iptablesfiprulesResource, "status", iptablesFIPRule), &kubeovnv1.IptablesFIPRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesFIPRule), err -} - -// Delete takes name of the iptablesFIPRule and deletes it. Returns an error if one occurs. -func (c *FakeIptablesFIPRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(iptablesfiprulesResource, name, opts), &kubeovnv1.IptablesFIPRule{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIptablesFIPRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(iptablesfiprulesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.IptablesFIPRuleList{}) - return err -} - -// Patch applies the patch and returns the patched iptablesFIPRule. -func (c *FakeIptablesFIPRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.IptablesFIPRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(iptablesfiprulesResource, name, pt, data, subresources...), &kubeovnv1.IptablesFIPRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesFIPRule), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablessnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablessnatrule.go deleted file mode 100644 index dfda17aba80..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_iptablessnatrule.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeIptablesSnatRules implements IptablesSnatRuleInterface -type FakeIptablesSnatRules struct { - Fake *FakeKubeovnV1 -} - -var iptablessnatrulesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "iptables-snat-rules"} - -var iptablessnatrulesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "IptablesSnatRule"} - -// Get takes name of the iptablesSnatRule, and returns the corresponding iptablesSnatRule object, and an error if there is any. -func (c *FakeIptablesSnatRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.IptablesSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(iptablessnatrulesResource, name), &kubeovnv1.IptablesSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesSnatRule), err -} - -// List takes label and field selectors, and returns the list of IptablesSnatRules that match those selectors. -func (c *FakeIptablesSnatRules) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.IptablesSnatRuleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(iptablessnatrulesResource, iptablessnatrulesKind, opts), &kubeovnv1.IptablesSnatRuleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.IptablesSnatRuleList{ListMeta: obj.(*kubeovnv1.IptablesSnatRuleList).ListMeta} - for _, item := range obj.(*kubeovnv1.IptablesSnatRuleList).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 iptablesSnatRules. -func (c *FakeIptablesSnatRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(iptablessnatrulesResource, opts)) -} - -// Create takes the representation of a iptablesSnatRule and creates it. Returns the server's representation of the iptablesSnatRule, and an error, if there is any. -func (c *FakeIptablesSnatRules) Create(ctx context.Context, iptablesSnatRule *kubeovnv1.IptablesSnatRule, opts v1.CreateOptions) (result *kubeovnv1.IptablesSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(iptablessnatrulesResource, iptablesSnatRule), &kubeovnv1.IptablesSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesSnatRule), err -} - -// Update takes the representation of a iptablesSnatRule and updates it. Returns the server's representation of the iptablesSnatRule, and an error, if there is any. -func (c *FakeIptablesSnatRules) Update(ctx context.Context, iptablesSnatRule *kubeovnv1.IptablesSnatRule, opts v1.UpdateOptions) (result *kubeovnv1.IptablesSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(iptablessnatrulesResource, iptablesSnatRule), &kubeovnv1.IptablesSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesSnatRule), 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 *FakeIptablesSnatRules) UpdateStatus(ctx context.Context, iptablesSnatRule *kubeovnv1.IptablesSnatRule, opts v1.UpdateOptions) (*kubeovnv1.IptablesSnatRule, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(iptablessnatrulesResource, "status", iptablesSnatRule), &kubeovnv1.IptablesSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesSnatRule), err -} - -// Delete takes name of the iptablesSnatRule and deletes it. Returns an error if one occurs. -func (c *FakeIptablesSnatRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(iptablessnatrulesResource, name, opts), &kubeovnv1.IptablesSnatRule{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIptablesSnatRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(iptablessnatrulesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.IptablesSnatRuleList{}) - return err -} - -// Patch applies the patch and returns the patched iptablesSnatRule. -func (c *FakeIptablesSnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.IptablesSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(iptablessnatrulesResource, name, pt, data, subresources...), &kubeovnv1.IptablesSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.IptablesSnatRule), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_kubeovn_client.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_kubeovn_client.go deleted file mode 100644 index 554c72654e0..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_kubeovn_client.go +++ /dev/null @@ -1,108 +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 "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/typed/kubeovn/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeKubeovnV1 struct { - *testing.Fake -} - -func (c *FakeKubeovnV1) HtbQoses() v1.HtbQosInterface { - return &FakeHtbQoses{c} -} - -func (c *FakeKubeovnV1) IPs() v1.IPInterface { - return &FakeIPs{c} -} - -func (c *FakeKubeovnV1) IptablesDnatRules() v1.IptablesDnatRuleInterface { - return &FakeIptablesDnatRules{c} -} - -func (c *FakeKubeovnV1) IptablesEIPs() v1.IptablesEIPInterface { - return &FakeIptablesEIPs{c} -} - -func (c *FakeKubeovnV1) IptablesFIPRules() v1.IptablesFIPRuleInterface { - return &FakeIptablesFIPRules{c} -} - -func (c *FakeKubeovnV1) IptablesSnatRules() v1.IptablesSnatRuleInterface { - return &FakeIptablesSnatRules{c} -} - -func (c *FakeKubeovnV1) OvnEips() v1.OvnEipInterface { - return &FakeOvnEips{c} -} - -func (c *FakeKubeovnV1) OvnFips() v1.OvnFipInterface { - return &FakeOvnFips{c} -} - -func (c *FakeKubeovnV1) OvnSnatRules() v1.OvnSnatRuleInterface { - return &FakeOvnSnatRules{c} -} - -func (c *FakeKubeovnV1) ProviderNetworks() v1.ProviderNetworkInterface { - return &FakeProviderNetworks{c} -} - -func (c *FakeKubeovnV1) SecurityGroups() v1.SecurityGroupInterface { - return &FakeSecurityGroups{c} -} - -func (c *FakeKubeovnV1) Subnets() v1.SubnetInterface { - return &FakeSubnets{c} -} - -func (c *FakeKubeovnV1) SwitchLBRules() v1.SwitchLBRuleInterface { - return &FakeSwitchLBRules{c} -} - -func (c *FakeKubeovnV1) Vips() v1.VipInterface { - return &FakeVips{c} -} - -func (c *FakeKubeovnV1) Vlans() v1.VlanInterface { - return &FakeVlans{c} -} - -func (c *FakeKubeovnV1) Vpcs() v1.VpcInterface { - return &FakeVpcs{c} -} - -func (c *FakeKubeovnV1) VpcDnses() v1.VpcDnsInterface { - return &FakeVpcDnses{c} -} - -func (c *FakeKubeovnV1) VpcNatGateways() v1.VpcNatGatewayInterface { - return &FakeVpcNatGateways{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeKubeovnV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovneip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovneip.go deleted file mode 100644 index 7c57fbc93d1..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovneip.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeOvnEips implements OvnEipInterface -type FakeOvnEips struct { - Fake *FakeKubeovnV1 -} - -var ovneipsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "ovn-eips"} - -var ovneipsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "OvnEip"} - -// Get takes name of the ovnEip, and returns the corresponding ovnEip object, and an error if there is any. -func (c *FakeOvnEips) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.OvnEip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ovneipsResource, name), &kubeovnv1.OvnEip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnEip), err -} - -// List takes label and field selectors, and returns the list of OvnEips that match those selectors. -func (c *FakeOvnEips) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.OvnEipList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ovneipsResource, ovneipsKind, opts), &kubeovnv1.OvnEipList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.OvnEipList{ListMeta: obj.(*kubeovnv1.OvnEipList).ListMeta} - for _, item := range obj.(*kubeovnv1.OvnEipList).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 ovnEips. -func (c *FakeOvnEips) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ovneipsResource, opts)) -} - -// Create takes the representation of a ovnEip and creates it. Returns the server's representation of the ovnEip, and an error, if there is any. -func (c *FakeOvnEips) Create(ctx context.Context, ovnEip *kubeovnv1.OvnEip, opts v1.CreateOptions) (result *kubeovnv1.OvnEip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ovneipsResource, ovnEip), &kubeovnv1.OvnEip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnEip), err -} - -// Update takes the representation of a ovnEip and updates it. Returns the server's representation of the ovnEip, and an error, if there is any. -func (c *FakeOvnEips) Update(ctx context.Context, ovnEip *kubeovnv1.OvnEip, opts v1.UpdateOptions) (result *kubeovnv1.OvnEip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ovneipsResource, ovnEip), &kubeovnv1.OvnEip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnEip), 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 *FakeOvnEips) UpdateStatus(ctx context.Context, ovnEip *kubeovnv1.OvnEip, opts v1.UpdateOptions) (*kubeovnv1.OvnEip, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ovneipsResource, "status", ovnEip), &kubeovnv1.OvnEip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnEip), err -} - -// Delete takes name of the ovnEip and deletes it. Returns an error if one occurs. -func (c *FakeOvnEips) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ovneipsResource, name, opts), &kubeovnv1.OvnEip{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOvnEips) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ovneipsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.OvnEipList{}) - return err -} - -// Patch applies the patch and returns the patched ovnEip. -func (c *FakeOvnEips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.OvnEip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ovneipsResource, name, pt, data, subresources...), &kubeovnv1.OvnEip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnEip), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnfip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnfip.go deleted file mode 100644 index e62c1df7a6f..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnfip.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeOvnFips implements OvnFipInterface -type FakeOvnFips struct { - Fake *FakeKubeovnV1 -} - -var ovnfipsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "ovn-fips"} - -var ovnfipsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "OvnFip"} - -// Get takes name of the ovnFip, and returns the corresponding ovnFip object, and an error if there is any. -func (c *FakeOvnFips) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.OvnFip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ovnfipsResource, name), &kubeovnv1.OvnFip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnFip), err -} - -// List takes label and field selectors, and returns the list of OvnFips that match those selectors. -func (c *FakeOvnFips) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.OvnFipList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ovnfipsResource, ovnfipsKind, opts), &kubeovnv1.OvnFipList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.OvnFipList{ListMeta: obj.(*kubeovnv1.OvnFipList).ListMeta} - for _, item := range obj.(*kubeovnv1.OvnFipList).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 ovnFips. -func (c *FakeOvnFips) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ovnfipsResource, opts)) -} - -// Create takes the representation of a ovnFip and creates it. Returns the server's representation of the ovnFip, and an error, if there is any. -func (c *FakeOvnFips) Create(ctx context.Context, ovnFip *kubeovnv1.OvnFip, opts v1.CreateOptions) (result *kubeovnv1.OvnFip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ovnfipsResource, ovnFip), &kubeovnv1.OvnFip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnFip), err -} - -// Update takes the representation of a ovnFip and updates it. Returns the server's representation of the ovnFip, and an error, if there is any. -func (c *FakeOvnFips) Update(ctx context.Context, ovnFip *kubeovnv1.OvnFip, opts v1.UpdateOptions) (result *kubeovnv1.OvnFip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ovnfipsResource, ovnFip), &kubeovnv1.OvnFip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnFip), 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 *FakeOvnFips) UpdateStatus(ctx context.Context, ovnFip *kubeovnv1.OvnFip, opts v1.UpdateOptions) (*kubeovnv1.OvnFip, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ovnfipsResource, "status", ovnFip), &kubeovnv1.OvnFip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnFip), err -} - -// Delete takes name of the ovnFip and deletes it. Returns an error if one occurs. -func (c *FakeOvnFips) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ovnfipsResource, name, opts), &kubeovnv1.OvnFip{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOvnFips) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ovnfipsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.OvnFipList{}) - return err -} - -// Patch applies the patch and returns the patched ovnFip. -func (c *FakeOvnFips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.OvnFip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ovnfipsResource, name, pt, data, subresources...), &kubeovnv1.OvnFip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnFip), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnsnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnsnatrule.go deleted file mode 100644 index 174716cea12..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_ovnsnatrule.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeOvnSnatRules implements OvnSnatRuleInterface -type FakeOvnSnatRules struct { - Fake *FakeKubeovnV1 -} - -var ovnsnatrulesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "ovn-snat-rules"} - -var ovnsnatrulesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "OvnSnatRule"} - -// Get takes name of the ovnSnatRule, and returns the corresponding ovnSnatRule object, and an error if there is any. -func (c *FakeOvnSnatRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.OvnSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ovnsnatrulesResource, name), &kubeovnv1.OvnSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnSnatRule), err -} - -// List takes label and field selectors, and returns the list of OvnSnatRules that match those selectors. -func (c *FakeOvnSnatRules) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.OvnSnatRuleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ovnsnatrulesResource, ovnsnatrulesKind, opts), &kubeovnv1.OvnSnatRuleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.OvnSnatRuleList{ListMeta: obj.(*kubeovnv1.OvnSnatRuleList).ListMeta} - for _, item := range obj.(*kubeovnv1.OvnSnatRuleList).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 ovnSnatRules. -func (c *FakeOvnSnatRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ovnsnatrulesResource, opts)) -} - -// Create takes the representation of a ovnSnatRule and creates it. Returns the server's representation of the ovnSnatRule, and an error, if there is any. -func (c *FakeOvnSnatRules) Create(ctx context.Context, ovnSnatRule *kubeovnv1.OvnSnatRule, opts v1.CreateOptions) (result *kubeovnv1.OvnSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ovnsnatrulesResource, ovnSnatRule), &kubeovnv1.OvnSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnSnatRule), err -} - -// Update takes the representation of a ovnSnatRule and updates it. Returns the server's representation of the ovnSnatRule, and an error, if there is any. -func (c *FakeOvnSnatRules) Update(ctx context.Context, ovnSnatRule *kubeovnv1.OvnSnatRule, opts v1.UpdateOptions) (result *kubeovnv1.OvnSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ovnsnatrulesResource, ovnSnatRule), &kubeovnv1.OvnSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnSnatRule), 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 *FakeOvnSnatRules) UpdateStatus(ctx context.Context, ovnSnatRule *kubeovnv1.OvnSnatRule, opts v1.UpdateOptions) (*kubeovnv1.OvnSnatRule, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ovnsnatrulesResource, "status", ovnSnatRule), &kubeovnv1.OvnSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnSnatRule), err -} - -// Delete takes name of the ovnSnatRule and deletes it. Returns an error if one occurs. -func (c *FakeOvnSnatRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ovnsnatrulesResource, name, opts), &kubeovnv1.OvnSnatRule{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOvnSnatRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ovnsnatrulesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.OvnSnatRuleList{}) - return err -} - -// Patch applies the patch and returns the patched ovnSnatRule. -func (c *FakeOvnSnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.OvnSnatRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ovnsnatrulesResource, name, pt, data, subresources...), &kubeovnv1.OvnSnatRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.OvnSnatRule), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_providernetwork.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_providernetwork.go deleted file mode 100644 index ef7b5b6831f..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_providernetwork.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeProviderNetworks implements ProviderNetworkInterface -type FakeProviderNetworks struct { - Fake *FakeKubeovnV1 -} - -var providernetworksResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "provider-networks"} - -var providernetworksKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "ProviderNetwork"} - -// Get takes name of the providerNetwork, and returns the corresponding providerNetwork object, and an error if there is any. -func (c *FakeProviderNetworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.ProviderNetwork, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(providernetworksResource, name), &kubeovnv1.ProviderNetwork{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.ProviderNetwork), err -} - -// List takes label and field selectors, and returns the list of ProviderNetworks that match those selectors. -func (c *FakeProviderNetworks) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.ProviderNetworkList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(providernetworksResource, providernetworksKind, opts), &kubeovnv1.ProviderNetworkList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.ProviderNetworkList{ListMeta: obj.(*kubeovnv1.ProviderNetworkList).ListMeta} - for _, item := range obj.(*kubeovnv1.ProviderNetworkList).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 providerNetworks. -func (c *FakeProviderNetworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(providernetworksResource, opts)) -} - -// Create takes the representation of a providerNetwork and creates it. Returns the server's representation of the providerNetwork, and an error, if there is any. -func (c *FakeProviderNetworks) Create(ctx context.Context, providerNetwork *kubeovnv1.ProviderNetwork, opts v1.CreateOptions) (result *kubeovnv1.ProviderNetwork, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(providernetworksResource, providerNetwork), &kubeovnv1.ProviderNetwork{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.ProviderNetwork), err -} - -// Update takes the representation of a providerNetwork and updates it. Returns the server's representation of the providerNetwork, and an error, if there is any. -func (c *FakeProviderNetworks) Update(ctx context.Context, providerNetwork *kubeovnv1.ProviderNetwork, opts v1.UpdateOptions) (result *kubeovnv1.ProviderNetwork, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(providernetworksResource, providerNetwork), &kubeovnv1.ProviderNetwork{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.ProviderNetwork), 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 *FakeProviderNetworks) UpdateStatus(ctx context.Context, providerNetwork *kubeovnv1.ProviderNetwork, opts v1.UpdateOptions) (*kubeovnv1.ProviderNetwork, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(providernetworksResource, "status", providerNetwork), &kubeovnv1.ProviderNetwork{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.ProviderNetwork), err -} - -// Delete takes name of the providerNetwork and deletes it. Returns an error if one occurs. -func (c *FakeProviderNetworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(providernetworksResource, name, opts), &kubeovnv1.ProviderNetwork{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeProviderNetworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(providernetworksResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.ProviderNetworkList{}) - return err -} - -// Patch applies the patch and returns the patched providerNetwork. -func (c *FakeProviderNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.ProviderNetwork, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(providernetworksResource, name, pt, data, subresources...), &kubeovnv1.ProviderNetwork{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.ProviderNetwork), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_securitygroup.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_securitygroup.go deleted file mode 100644 index 58690a1c8ee..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_securitygroup.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeSecurityGroups implements SecurityGroupInterface -type FakeSecurityGroups struct { - Fake *FakeKubeovnV1 -} - -var securitygroupsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "security-groups"} - -var securitygroupsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "SecurityGroup"} - -// Get takes name of the securityGroup, and returns the corresponding securityGroup object, and an error if there is any. -func (c *FakeSecurityGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.SecurityGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(securitygroupsResource, name), &kubeovnv1.SecurityGroup{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SecurityGroup), err -} - -// List takes label and field selectors, and returns the list of SecurityGroups that match those selectors. -func (c *FakeSecurityGroups) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.SecurityGroupList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(securitygroupsResource, securitygroupsKind, opts), &kubeovnv1.SecurityGroupList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.SecurityGroupList{ListMeta: obj.(*kubeovnv1.SecurityGroupList).ListMeta} - for _, item := range obj.(*kubeovnv1.SecurityGroupList).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 securityGroups. -func (c *FakeSecurityGroups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(securitygroupsResource, opts)) -} - -// Create takes the representation of a securityGroup and creates it. Returns the server's representation of the securityGroup, and an error, if there is any. -func (c *FakeSecurityGroups) Create(ctx context.Context, securityGroup *kubeovnv1.SecurityGroup, opts v1.CreateOptions) (result *kubeovnv1.SecurityGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(securitygroupsResource, securityGroup), &kubeovnv1.SecurityGroup{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SecurityGroup), err -} - -// Update takes the representation of a securityGroup and updates it. Returns the server's representation of the securityGroup, and an error, if there is any. -func (c *FakeSecurityGroups) Update(ctx context.Context, securityGroup *kubeovnv1.SecurityGroup, opts v1.UpdateOptions) (result *kubeovnv1.SecurityGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(securitygroupsResource, securityGroup), &kubeovnv1.SecurityGroup{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SecurityGroup), 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 *FakeSecurityGroups) UpdateStatus(ctx context.Context, securityGroup *kubeovnv1.SecurityGroup, opts v1.UpdateOptions) (*kubeovnv1.SecurityGroup, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(securitygroupsResource, "status", securityGroup), &kubeovnv1.SecurityGroup{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SecurityGroup), err -} - -// Delete takes name of the securityGroup and deletes it. Returns an error if one occurs. -func (c *FakeSecurityGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(securitygroupsResource, name, opts), &kubeovnv1.SecurityGroup{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSecurityGroups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(securitygroupsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.SecurityGroupList{}) - return err -} - -// Patch applies the patch and returns the patched securityGroup. -func (c *FakeSecurityGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.SecurityGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(securitygroupsResource, name, pt, data, subresources...), &kubeovnv1.SecurityGroup{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SecurityGroup), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_subnet.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_subnet.go deleted file mode 100644 index 18c7512188a..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_subnet.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeSubnets implements SubnetInterface -type FakeSubnets struct { - Fake *FakeKubeovnV1 -} - -var subnetsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "subnets"} - -var subnetsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "Subnet"} - -// Get takes name of the subnet, and returns the corresponding subnet object, and an error if there is any. -func (c *FakeSubnets) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.Subnet, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(subnetsResource, name), &kubeovnv1.Subnet{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Subnet), err -} - -// List takes label and field selectors, and returns the list of Subnets that match those selectors. -func (c *FakeSubnets) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.SubnetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(subnetsResource, subnetsKind, opts), &kubeovnv1.SubnetList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.SubnetList{ListMeta: obj.(*kubeovnv1.SubnetList).ListMeta} - for _, item := range obj.(*kubeovnv1.SubnetList).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 subnets. -func (c *FakeSubnets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(subnetsResource, opts)) -} - -// Create takes the representation of a subnet and creates it. Returns the server's representation of the subnet, and an error, if there is any. -func (c *FakeSubnets) Create(ctx context.Context, subnet *kubeovnv1.Subnet, opts v1.CreateOptions) (result *kubeovnv1.Subnet, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(subnetsResource, subnet), &kubeovnv1.Subnet{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Subnet), err -} - -// Update takes the representation of a subnet and updates it. Returns the server's representation of the subnet, and an error, if there is any. -func (c *FakeSubnets) Update(ctx context.Context, subnet *kubeovnv1.Subnet, opts v1.UpdateOptions) (result *kubeovnv1.Subnet, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(subnetsResource, subnet), &kubeovnv1.Subnet{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Subnet), 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 *FakeSubnets) UpdateStatus(ctx context.Context, subnet *kubeovnv1.Subnet, opts v1.UpdateOptions) (*kubeovnv1.Subnet, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(subnetsResource, "status", subnet), &kubeovnv1.Subnet{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Subnet), err -} - -// Delete takes name of the subnet and deletes it. Returns an error if one occurs. -func (c *FakeSubnets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(subnetsResource, name, opts), &kubeovnv1.Subnet{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSubnets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(subnetsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.SubnetList{}) - return err -} - -// Patch applies the patch and returns the patched subnet. -func (c *FakeSubnets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.Subnet, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(subnetsResource, name, pt, data, subresources...), &kubeovnv1.Subnet{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Subnet), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_switchlbrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_switchlbrule.go deleted file mode 100644 index 237d3447795..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_switchlbrule.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeSwitchLBRules implements SwitchLBRuleInterface -type FakeSwitchLBRules struct { - Fake *FakeKubeovnV1 -} - -var switchlbrulesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "switch-lb-rules"} - -var switchlbrulesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "SwitchLBRule"} - -// Get takes name of the switchLBRule, and returns the corresponding switchLBRule object, and an error if there is any. -func (c *FakeSwitchLBRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.SwitchLBRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(switchlbrulesResource, name), &kubeovnv1.SwitchLBRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SwitchLBRule), err -} - -// List takes label and field selectors, and returns the list of SwitchLBRules that match those selectors. -func (c *FakeSwitchLBRules) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.SwitchLBRuleList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(switchlbrulesResource, switchlbrulesKind, opts), &kubeovnv1.SwitchLBRuleList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.SwitchLBRuleList{ListMeta: obj.(*kubeovnv1.SwitchLBRuleList).ListMeta} - for _, item := range obj.(*kubeovnv1.SwitchLBRuleList).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 switchLBRules. -func (c *FakeSwitchLBRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(switchlbrulesResource, opts)) -} - -// Create takes the representation of a switchLBRule and creates it. Returns the server's representation of the switchLBRule, and an error, if there is any. -func (c *FakeSwitchLBRules) Create(ctx context.Context, switchLBRule *kubeovnv1.SwitchLBRule, opts v1.CreateOptions) (result *kubeovnv1.SwitchLBRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(switchlbrulesResource, switchLBRule), &kubeovnv1.SwitchLBRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SwitchLBRule), err -} - -// Update takes the representation of a switchLBRule and updates it. Returns the server's representation of the switchLBRule, and an error, if there is any. -func (c *FakeSwitchLBRules) Update(ctx context.Context, switchLBRule *kubeovnv1.SwitchLBRule, opts v1.UpdateOptions) (result *kubeovnv1.SwitchLBRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(switchlbrulesResource, switchLBRule), &kubeovnv1.SwitchLBRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SwitchLBRule), 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 *FakeSwitchLBRules) UpdateStatus(ctx context.Context, switchLBRule *kubeovnv1.SwitchLBRule, opts v1.UpdateOptions) (*kubeovnv1.SwitchLBRule, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(switchlbrulesResource, "status", switchLBRule), &kubeovnv1.SwitchLBRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SwitchLBRule), err -} - -// Delete takes name of the switchLBRule and deletes it. Returns an error if one occurs. -func (c *FakeSwitchLBRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(switchlbrulesResource, name, opts), &kubeovnv1.SwitchLBRule{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSwitchLBRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(switchlbrulesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.SwitchLBRuleList{}) - return err -} - -// Patch applies the patch and returns the patched switchLBRule. -func (c *FakeSwitchLBRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.SwitchLBRule, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(switchlbrulesResource, name, pt, data, subresources...), &kubeovnv1.SwitchLBRule{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.SwitchLBRule), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vip.go deleted file mode 100644 index 3329206a3ec..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vip.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeVips implements VipInterface -type FakeVips struct { - Fake *FakeKubeovnV1 -} - -var vipsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "vips"} - -var vipsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "Vip"} - -// Get takes name of the vip, and returns the corresponding vip object, and an error if there is any. -func (c *FakeVips) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.Vip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(vipsResource, name), &kubeovnv1.Vip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vip), err -} - -// List takes label and field selectors, and returns the list of Vips that match those selectors. -func (c *FakeVips) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.VipList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(vipsResource, vipsKind, opts), &kubeovnv1.VipList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.VipList{ListMeta: obj.(*kubeovnv1.VipList).ListMeta} - for _, item := range obj.(*kubeovnv1.VipList).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 vips. -func (c *FakeVips) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(vipsResource, opts)) -} - -// Create takes the representation of a vip and creates it. Returns the server's representation of the vip, and an error, if there is any. -func (c *FakeVips) Create(ctx context.Context, vip *kubeovnv1.Vip, opts v1.CreateOptions) (result *kubeovnv1.Vip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(vipsResource, vip), &kubeovnv1.Vip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vip), err -} - -// Update takes the representation of a vip and updates it. Returns the server's representation of the vip, and an error, if there is any. -func (c *FakeVips) Update(ctx context.Context, vip *kubeovnv1.Vip, opts v1.UpdateOptions) (result *kubeovnv1.Vip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(vipsResource, vip), &kubeovnv1.Vip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vip), 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 *FakeVips) UpdateStatus(ctx context.Context, vip *kubeovnv1.Vip, opts v1.UpdateOptions) (*kubeovnv1.Vip, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(vipsResource, "status", vip), &kubeovnv1.Vip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vip), err -} - -// Delete takes name of the vip and deletes it. Returns an error if one occurs. -func (c *FakeVips) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(vipsResource, name, opts), &kubeovnv1.Vip{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVips) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(vipsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.VipList{}) - return err -} - -// Patch applies the patch and returns the patched vip. -func (c *FakeVips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.Vip, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(vipsResource, name, pt, data, subresources...), &kubeovnv1.Vip{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vip), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vlan.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vlan.go deleted file mode 100644 index 3b4b9749c2c..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vlan.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeVlans implements VlanInterface -type FakeVlans struct { - Fake *FakeKubeovnV1 -} - -var vlansResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "vlans"} - -var vlansKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "Vlan"} - -// Get takes name of the vlan, and returns the corresponding vlan object, and an error if there is any. -func (c *FakeVlans) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.Vlan, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(vlansResource, name), &kubeovnv1.Vlan{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vlan), err -} - -// List takes label and field selectors, and returns the list of Vlans that match those selectors. -func (c *FakeVlans) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.VlanList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(vlansResource, vlansKind, opts), &kubeovnv1.VlanList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.VlanList{ListMeta: obj.(*kubeovnv1.VlanList).ListMeta} - for _, item := range obj.(*kubeovnv1.VlanList).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 vlans. -func (c *FakeVlans) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(vlansResource, opts)) -} - -// Create takes the representation of a vlan and creates it. Returns the server's representation of the vlan, and an error, if there is any. -func (c *FakeVlans) Create(ctx context.Context, vlan *kubeovnv1.Vlan, opts v1.CreateOptions) (result *kubeovnv1.Vlan, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(vlansResource, vlan), &kubeovnv1.Vlan{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vlan), err -} - -// Update takes the representation of a vlan and updates it. Returns the server's representation of the vlan, and an error, if there is any. -func (c *FakeVlans) Update(ctx context.Context, vlan *kubeovnv1.Vlan, opts v1.UpdateOptions) (result *kubeovnv1.Vlan, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(vlansResource, vlan), &kubeovnv1.Vlan{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vlan), 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 *FakeVlans) UpdateStatus(ctx context.Context, vlan *kubeovnv1.Vlan, opts v1.UpdateOptions) (*kubeovnv1.Vlan, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(vlansResource, "status", vlan), &kubeovnv1.Vlan{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vlan), err -} - -// Delete takes name of the vlan and deletes it. Returns an error if one occurs. -func (c *FakeVlans) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(vlansResource, name, opts), &kubeovnv1.Vlan{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVlans) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(vlansResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.VlanList{}) - return err -} - -// Patch applies the patch and returns the patched vlan. -func (c *FakeVlans) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.Vlan, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(vlansResource, name, pt, data, subresources...), &kubeovnv1.Vlan{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vlan), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpc.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpc.go deleted file mode 100644 index 5bfc6a70f7c..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpc.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeVpcs implements VpcInterface -type FakeVpcs struct { - Fake *FakeKubeovnV1 -} - -var vpcsResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "vpcs"} - -var vpcsKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "Vpc"} - -// Get takes name of the vpc, and returns the corresponding vpc object, and an error if there is any. -func (c *FakeVpcs) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.Vpc, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(vpcsResource, name), &kubeovnv1.Vpc{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vpc), err -} - -// List takes label and field selectors, and returns the list of Vpcs that match those selectors. -func (c *FakeVpcs) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.VpcList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(vpcsResource, vpcsKind, opts), &kubeovnv1.VpcList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.VpcList{ListMeta: obj.(*kubeovnv1.VpcList).ListMeta} - for _, item := range obj.(*kubeovnv1.VpcList).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 vpcs. -func (c *FakeVpcs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(vpcsResource, opts)) -} - -// Create takes the representation of a vpc and creates it. Returns the server's representation of the vpc, and an error, if there is any. -func (c *FakeVpcs) Create(ctx context.Context, vpc *kubeovnv1.Vpc, opts v1.CreateOptions) (result *kubeovnv1.Vpc, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(vpcsResource, vpc), &kubeovnv1.Vpc{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vpc), err -} - -// Update takes the representation of a vpc and updates it. Returns the server's representation of the vpc, and an error, if there is any. -func (c *FakeVpcs) Update(ctx context.Context, vpc *kubeovnv1.Vpc, opts v1.UpdateOptions) (result *kubeovnv1.Vpc, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(vpcsResource, vpc), &kubeovnv1.Vpc{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vpc), 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 *FakeVpcs) UpdateStatus(ctx context.Context, vpc *kubeovnv1.Vpc, opts v1.UpdateOptions) (*kubeovnv1.Vpc, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(vpcsResource, "status", vpc), &kubeovnv1.Vpc{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vpc), err -} - -// Delete takes name of the vpc and deletes it. Returns an error if one occurs. -func (c *FakeVpcs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(vpcsResource, name, opts), &kubeovnv1.Vpc{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVpcs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(vpcsResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.VpcList{}) - return err -} - -// Patch applies the patch and returns the patched vpc. -func (c *FakeVpcs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.Vpc, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(vpcsResource, name, pt, data, subresources...), &kubeovnv1.Vpc{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.Vpc), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcdns.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcdns.go deleted file mode 100644 index 69127f7e2c4..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcdns.go +++ /dev/null @@ -1,133 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeVpcDnses implements VpcDnsInterface -type FakeVpcDnses struct { - Fake *FakeKubeovnV1 -} - -var vpcdnsesResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "vpc-dnses"} - -var vpcdnsesKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "VpcDns"} - -// Get takes name of the vpcDns, and returns the corresponding vpcDns object, and an error if there is any. -func (c *FakeVpcDnses) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.VpcDns, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(vpcdnsesResource, name), &kubeovnv1.VpcDns{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcDns), err -} - -// List takes label and field selectors, and returns the list of VpcDnses that match those selectors. -func (c *FakeVpcDnses) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.VpcDnsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(vpcdnsesResource, vpcdnsesKind, opts), &kubeovnv1.VpcDnsList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.VpcDnsList{ListMeta: obj.(*kubeovnv1.VpcDnsList).ListMeta} - for _, item := range obj.(*kubeovnv1.VpcDnsList).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 vpcDnses. -func (c *FakeVpcDnses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(vpcdnsesResource, opts)) -} - -// Create takes the representation of a vpcDns and creates it. Returns the server's representation of the vpcDns, and an error, if there is any. -func (c *FakeVpcDnses) Create(ctx context.Context, vpcDns *kubeovnv1.VpcDns, opts v1.CreateOptions) (result *kubeovnv1.VpcDns, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(vpcdnsesResource, vpcDns), &kubeovnv1.VpcDns{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcDns), err -} - -// Update takes the representation of a vpcDns and updates it. Returns the server's representation of the vpcDns, and an error, if there is any. -func (c *FakeVpcDnses) Update(ctx context.Context, vpcDns *kubeovnv1.VpcDns, opts v1.UpdateOptions) (result *kubeovnv1.VpcDns, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(vpcdnsesResource, vpcDns), &kubeovnv1.VpcDns{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcDns), 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 *FakeVpcDnses) UpdateStatus(ctx context.Context, vpcDns *kubeovnv1.VpcDns, opts v1.UpdateOptions) (*kubeovnv1.VpcDns, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(vpcdnsesResource, "status", vpcDns), &kubeovnv1.VpcDns{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcDns), err -} - -// Delete takes name of the vpcDns and deletes it. Returns an error if one occurs. -func (c *FakeVpcDnses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(vpcdnsesResource, name, opts), &kubeovnv1.VpcDns{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVpcDnses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(vpcdnsesResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.VpcDnsList{}) - return err -} - -// Patch applies the patch and returns the patched vpcDns. -func (c *FakeVpcDnses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.VpcDns, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(vpcdnsesResource, name, pt, data, subresources...), &kubeovnv1.VpcDns{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcDns), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcnatgateway.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcnatgateway.go deleted file mode 100644 index 2125b85d99e..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/fake/fake_vpcnatgateway.go +++ /dev/null @@ -1,122 +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 ( - "context" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - 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" -) - -// FakeVpcNatGateways implements VpcNatGatewayInterface -type FakeVpcNatGateways struct { - Fake *FakeKubeovnV1 -} - -var vpcnatgatewaysResource = schema.GroupVersionResource{Group: "kubeovn.io", Version: "v1", Resource: "vpc-nat-gateways"} - -var vpcnatgatewaysKind = schema.GroupVersionKind{Group: "kubeovn.io", Version: "v1", Kind: "VpcNatGateway"} - -// Get takes name of the vpcNatGateway, and returns the corresponding vpcNatGateway object, and an error if there is any. -func (c *FakeVpcNatGateways) Get(ctx context.Context, name string, options v1.GetOptions) (result *kubeovnv1.VpcNatGateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(vpcnatgatewaysResource, name), &kubeovnv1.VpcNatGateway{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcNatGateway), err -} - -// List takes label and field selectors, and returns the list of VpcNatGateways that match those selectors. -func (c *FakeVpcNatGateways) List(ctx context.Context, opts v1.ListOptions) (result *kubeovnv1.VpcNatGatewayList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(vpcnatgatewaysResource, vpcnatgatewaysKind, opts), &kubeovnv1.VpcNatGatewayList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubeovnv1.VpcNatGatewayList{ListMeta: obj.(*kubeovnv1.VpcNatGatewayList).ListMeta} - for _, item := range obj.(*kubeovnv1.VpcNatGatewayList).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 vpcNatGateways. -func (c *FakeVpcNatGateways) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(vpcnatgatewaysResource, opts)) -} - -// Create takes the representation of a vpcNatGateway and creates it. Returns the server's representation of the vpcNatGateway, and an error, if there is any. -func (c *FakeVpcNatGateways) Create(ctx context.Context, vpcNatGateway *kubeovnv1.VpcNatGateway, opts v1.CreateOptions) (result *kubeovnv1.VpcNatGateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(vpcnatgatewaysResource, vpcNatGateway), &kubeovnv1.VpcNatGateway{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcNatGateway), err -} - -// Update takes the representation of a vpcNatGateway and updates it. Returns the server's representation of the vpcNatGateway, and an error, if there is any. -func (c *FakeVpcNatGateways) Update(ctx context.Context, vpcNatGateway *kubeovnv1.VpcNatGateway, opts v1.UpdateOptions) (result *kubeovnv1.VpcNatGateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(vpcnatgatewaysResource, vpcNatGateway), &kubeovnv1.VpcNatGateway{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcNatGateway), err -} - -// Delete takes name of the vpcNatGateway and deletes it. Returns an error if one occurs. -func (c *FakeVpcNatGateways) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(vpcnatgatewaysResource, name, opts), &kubeovnv1.VpcNatGateway{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVpcNatGateways) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(vpcnatgatewaysResource, listOpts) - - _, err := c.Fake.Invokes(action, &kubeovnv1.VpcNatGatewayList{}) - return err -} - -// Patch applies the patch and returns the patched vpcNatGateway. -func (c *FakeVpcNatGateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubeovnv1.VpcNatGateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(vpcnatgatewaysResource, name, pt, data, subresources...), &kubeovnv1.VpcNatGateway{}) - if obj == nil { - return nil, err - } - return obj.(*kubeovnv1.VpcNatGateway), err -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/generated_expansion.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/generated_expansion.go deleted file mode 100644 index 2aab46affd0..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/generated_expansion.go +++ /dev/null @@ -1,55 +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 v1 - -type HtbQosExpansion interface{} - -type IPExpansion interface{} - -type IptablesDnatRuleExpansion interface{} - -type IptablesEIPExpansion interface{} - -type IptablesFIPRuleExpansion interface{} - -type IptablesSnatRuleExpansion interface{} - -type OvnEipExpansion interface{} - -type OvnFipExpansion interface{} - -type OvnSnatRuleExpansion interface{} - -type ProviderNetworkExpansion interface{} - -type SecurityGroupExpansion interface{} - -type SubnetExpansion interface{} - -type SwitchLBRuleExpansion interface{} - -type VipExpansion interface{} - -type VlanExpansion interface{} - -type VpcExpansion interface{} - -type VpcDnsExpansion interface{} - -type VpcNatGatewayExpansion interface{} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/htbqos.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/htbqos.go deleted file mode 100644 index bd7077c4743..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/htbqos.go +++ /dev/null @@ -1,168 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// HtbQosesGetter has a method to return a HtbQosInterface. -// A group's client should implement this interface. -type HtbQosesGetter interface { - HtbQoses() HtbQosInterface -} - -// HtbQosInterface has methods to work with HtbQos resources. -type HtbQosInterface interface { - Create(ctx context.Context, htbQos *v1.HtbQos, opts metav1.CreateOptions) (*v1.HtbQos, error) - Update(ctx context.Context, htbQos *v1.HtbQos, opts metav1.UpdateOptions) (*v1.HtbQos, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HtbQos, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.HtbQosList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HtbQos, err error) - HtbQosExpansion -} - -// htbQoses implements HtbQosInterface -type htbQoses struct { - client rest.Interface -} - -// newHtbQoses returns a HtbQoses -func newHtbQoses(c *KubeovnV1Client) *htbQoses { - return &htbQoses{ - client: c.RESTClient(), - } -} - -// Get takes name of the htbQos, and returns the corresponding htbQos object, and an error if there is any. -func (c *htbQoses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HtbQos, err error) { - result = &v1.HtbQos{} - err = c.client.Get(). - Resource("htbqoses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of HtbQoses that match those selectors. -func (c *htbQoses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HtbQosList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.HtbQosList{} - err = c.client.Get(). - Resource("htbqoses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested htbQoses. -func (c *htbQoses) Watch(ctx context.Context, opts metav1.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("htbqoses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a htbQos and creates it. Returns the server's representation of the htbQos, and an error, if there is any. -func (c *htbQoses) Create(ctx context.Context, htbQos *v1.HtbQos, opts metav1.CreateOptions) (result *v1.HtbQos, err error) { - result = &v1.HtbQos{} - err = c.client.Post(). - Resource("htbqoses"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(htbQos). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a htbQos and updates it. Returns the server's representation of the htbQos, and an error, if there is any. -func (c *htbQoses) Update(ctx context.Context, htbQos *v1.HtbQos, opts metav1.UpdateOptions) (result *v1.HtbQos, err error) { - result = &v1.HtbQos{} - err = c.client.Put(). - Resource("htbqoses"). - Name(htbQos.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(htbQos). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the htbQos and deletes it. Returns an error if one occurs. -func (c *htbQoses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("htbqoses"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *htbQoses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("htbqoses"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched htbQos. -func (c *htbQoses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HtbQos, err error) { - result = &v1.HtbQos{} - err = c.client.Patch(pt). - Resource("htbqoses"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ip.go deleted file mode 100644 index 53015e82f54..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ip.go +++ /dev/null @@ -1,168 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// IPsGetter has a method to return a IPInterface. -// A group's client should implement this interface. -type IPsGetter interface { - IPs() IPInterface -} - -// IPInterface has methods to work with IP resources. -type IPInterface interface { - Create(ctx context.Context, iP *v1.IP, opts metav1.CreateOptions) (*v1.IP, error) - Update(ctx context.Context, iP *v1.IP, opts metav1.UpdateOptions) (*v1.IP, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IP, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IPList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IP, err error) - IPExpansion -} - -// iPs implements IPInterface -type iPs struct { - client rest.Interface -} - -// newIPs returns a IPs -func newIPs(c *KubeovnV1Client) *iPs { - return &iPs{ - client: c.RESTClient(), - } -} - -// Get takes name of the iP, and returns the corresponding iP object, and an error if there is any. -func (c *iPs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IP, err error) { - result = &v1.IP{} - err = c.client.Get(). - Resource("ips"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IPs that match those selectors. -func (c *iPs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IPList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IPList{} - err = c.client.Get(). - Resource("ips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested iPs. -func (c *iPs) Watch(ctx context.Context, opts metav1.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("ips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a iP and creates it. Returns the server's representation of the iP, and an error, if there is any. -func (c *iPs) Create(ctx context.Context, iP *v1.IP, opts metav1.CreateOptions) (result *v1.IP, err error) { - result = &v1.IP{} - err = c.client.Post(). - Resource("ips"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iP). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a iP and updates it. Returns the server's representation of the iP, and an error, if there is any. -func (c *iPs) Update(ctx context.Context, iP *v1.IP, opts metav1.UpdateOptions) (result *v1.IP, err error) { - result = &v1.IP{} - err = c.client.Put(). - Resource("ips"). - Name(iP.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iP). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the iP and deletes it. Returns an error if one occurs. -func (c *iPs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("ips"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *iPs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ips"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched iP. -func (c *iPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IP, err error) { - result = &v1.IP{} - err = c.client.Patch(pt). - Resource("ips"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesdnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesdnatrule.go deleted file mode 100644 index b2088e59d5e..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesdnatrule.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// IptablesDnatRulesGetter has a method to return a IptablesDnatRuleInterface. -// A group's client should implement this interface. -type IptablesDnatRulesGetter interface { - IptablesDnatRules() IptablesDnatRuleInterface -} - -// IptablesDnatRuleInterface has methods to work with IptablesDnatRule resources. -type IptablesDnatRuleInterface interface { - Create(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.CreateOptions) (*v1.IptablesDnatRule, error) - Update(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.UpdateOptions) (*v1.IptablesDnatRule, error) - UpdateStatus(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.UpdateOptions) (*v1.IptablesDnatRule, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IptablesDnatRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IptablesDnatRuleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesDnatRule, err error) - IptablesDnatRuleExpansion -} - -// iptablesDnatRules implements IptablesDnatRuleInterface -type iptablesDnatRules struct { - client rest.Interface -} - -// newIptablesDnatRules returns a IptablesDnatRules -func newIptablesDnatRules(c *KubeovnV1Client) *iptablesDnatRules { - return &iptablesDnatRules{ - client: c.RESTClient(), - } -} - -// Get takes name of the iptablesDnatRule, and returns the corresponding iptablesDnatRule object, and an error if there is any. -func (c *iptablesDnatRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IptablesDnatRule, err error) { - result = &v1.IptablesDnatRule{} - err = c.client.Get(). - Resource("iptables-dnat-rules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IptablesDnatRules that match those selectors. -func (c *iptablesDnatRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IptablesDnatRuleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IptablesDnatRuleList{} - err = c.client.Get(). - Resource("iptables-dnat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested iptablesDnatRules. -func (c *iptablesDnatRules) Watch(ctx context.Context, opts metav1.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("iptables-dnat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a iptablesDnatRule and creates it. Returns the server's representation of the iptablesDnatRule, and an error, if there is any. -func (c *iptablesDnatRules) Create(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.CreateOptions) (result *v1.IptablesDnatRule, err error) { - result = &v1.IptablesDnatRule{} - err = c.client.Post(). - Resource("iptables-dnat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesDnatRule). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a iptablesDnatRule and updates it. Returns the server's representation of the iptablesDnatRule, and an error, if there is any. -func (c *iptablesDnatRules) Update(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.UpdateOptions) (result *v1.IptablesDnatRule, err error) { - result = &v1.IptablesDnatRule{} - err = c.client.Put(). - Resource("iptables-dnat-rules"). - Name(iptablesDnatRule.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesDnatRule). - Do(ctx). - 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 *iptablesDnatRules) UpdateStatus(ctx context.Context, iptablesDnatRule *v1.IptablesDnatRule, opts metav1.UpdateOptions) (result *v1.IptablesDnatRule, err error) { - result = &v1.IptablesDnatRule{} - err = c.client.Put(). - Resource("iptables-dnat-rules"). - Name(iptablesDnatRule.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesDnatRule). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the iptablesDnatRule and deletes it. Returns an error if one occurs. -func (c *iptablesDnatRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("iptables-dnat-rules"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *iptablesDnatRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("iptables-dnat-rules"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched iptablesDnatRule. -func (c *iptablesDnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesDnatRule, err error) { - result = &v1.IptablesDnatRule{} - err = c.client.Patch(pt). - Resource("iptables-dnat-rules"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptableseip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptableseip.go deleted file mode 100644 index 607ad8e9928..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptableseip.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// IptablesEIPsGetter has a method to return a IptablesEIPInterface. -// A group's client should implement this interface. -type IptablesEIPsGetter interface { - IptablesEIPs() IptablesEIPInterface -} - -// IptablesEIPInterface has methods to work with IptablesEIP resources. -type IptablesEIPInterface interface { - Create(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.CreateOptions) (*v1.IptablesEIP, error) - Update(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.UpdateOptions) (*v1.IptablesEIP, error) - UpdateStatus(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.UpdateOptions) (*v1.IptablesEIP, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IptablesEIP, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IptablesEIPList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesEIP, err error) - IptablesEIPExpansion -} - -// iptablesEIPs implements IptablesEIPInterface -type iptablesEIPs struct { - client rest.Interface -} - -// newIptablesEIPs returns a IptablesEIPs -func newIptablesEIPs(c *KubeovnV1Client) *iptablesEIPs { - return &iptablesEIPs{ - client: c.RESTClient(), - } -} - -// Get takes name of the iptablesEIP, and returns the corresponding iptablesEIP object, and an error if there is any. -func (c *iptablesEIPs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IptablesEIP, err error) { - result = &v1.IptablesEIP{} - err = c.client.Get(). - Resource("iptables-eips"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IptablesEIPs that match those selectors. -func (c *iptablesEIPs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IptablesEIPList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IptablesEIPList{} - err = c.client.Get(). - Resource("iptables-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested iptablesEIPs. -func (c *iptablesEIPs) Watch(ctx context.Context, opts metav1.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("iptables-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a iptablesEIP and creates it. Returns the server's representation of the iptablesEIP, and an error, if there is any. -func (c *iptablesEIPs) Create(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.CreateOptions) (result *v1.IptablesEIP, err error) { - result = &v1.IptablesEIP{} - err = c.client.Post(). - Resource("iptables-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesEIP). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a iptablesEIP and updates it. Returns the server's representation of the iptablesEIP, and an error, if there is any. -func (c *iptablesEIPs) Update(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.UpdateOptions) (result *v1.IptablesEIP, err error) { - result = &v1.IptablesEIP{} - err = c.client.Put(). - Resource("iptables-eips"). - Name(iptablesEIP.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesEIP). - Do(ctx). - 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 *iptablesEIPs) UpdateStatus(ctx context.Context, iptablesEIP *v1.IptablesEIP, opts metav1.UpdateOptions) (result *v1.IptablesEIP, err error) { - result = &v1.IptablesEIP{} - err = c.client.Put(). - Resource("iptables-eips"). - Name(iptablesEIP.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesEIP). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the iptablesEIP and deletes it. Returns an error if one occurs. -func (c *iptablesEIPs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("iptables-eips"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *iptablesEIPs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("iptables-eips"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched iptablesEIP. -func (c *iptablesEIPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesEIP, err error) { - result = &v1.IptablesEIP{} - err = c.client.Patch(pt). - Resource("iptables-eips"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesfiprule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesfiprule.go deleted file mode 100644 index 2cc7fef6cd4..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablesfiprule.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// IptablesFIPRulesGetter has a method to return a IptablesFIPRuleInterface. -// A group's client should implement this interface. -type IptablesFIPRulesGetter interface { - IptablesFIPRules() IptablesFIPRuleInterface -} - -// IptablesFIPRuleInterface has methods to work with IptablesFIPRule resources. -type IptablesFIPRuleInterface interface { - Create(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.CreateOptions) (*v1.IptablesFIPRule, error) - Update(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.UpdateOptions) (*v1.IptablesFIPRule, error) - UpdateStatus(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.UpdateOptions) (*v1.IptablesFIPRule, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IptablesFIPRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IptablesFIPRuleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesFIPRule, err error) - IptablesFIPRuleExpansion -} - -// iptablesFIPRules implements IptablesFIPRuleInterface -type iptablesFIPRules struct { - client rest.Interface -} - -// newIptablesFIPRules returns a IptablesFIPRules -func newIptablesFIPRules(c *KubeovnV1Client) *iptablesFIPRules { - return &iptablesFIPRules{ - client: c.RESTClient(), - } -} - -// Get takes name of the iptablesFIPRule, and returns the corresponding iptablesFIPRule object, and an error if there is any. -func (c *iptablesFIPRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IptablesFIPRule, err error) { - result = &v1.IptablesFIPRule{} - err = c.client.Get(). - Resource("iptables-fip-rules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IptablesFIPRules that match those selectors. -func (c *iptablesFIPRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IptablesFIPRuleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IptablesFIPRuleList{} - err = c.client.Get(). - Resource("iptables-fip-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested iptablesFIPRules. -func (c *iptablesFIPRules) Watch(ctx context.Context, opts metav1.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("iptables-fip-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a iptablesFIPRule and creates it. Returns the server's representation of the iptablesFIPRule, and an error, if there is any. -func (c *iptablesFIPRules) Create(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.CreateOptions) (result *v1.IptablesFIPRule, err error) { - result = &v1.IptablesFIPRule{} - err = c.client.Post(). - Resource("iptables-fip-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesFIPRule). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a iptablesFIPRule and updates it. Returns the server's representation of the iptablesFIPRule, and an error, if there is any. -func (c *iptablesFIPRules) Update(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.UpdateOptions) (result *v1.IptablesFIPRule, err error) { - result = &v1.IptablesFIPRule{} - err = c.client.Put(). - Resource("iptables-fip-rules"). - Name(iptablesFIPRule.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesFIPRule). - Do(ctx). - 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 *iptablesFIPRules) UpdateStatus(ctx context.Context, iptablesFIPRule *v1.IptablesFIPRule, opts metav1.UpdateOptions) (result *v1.IptablesFIPRule, err error) { - result = &v1.IptablesFIPRule{} - err = c.client.Put(). - Resource("iptables-fip-rules"). - Name(iptablesFIPRule.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesFIPRule). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the iptablesFIPRule and deletes it. Returns an error if one occurs. -func (c *iptablesFIPRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("iptables-fip-rules"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *iptablesFIPRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("iptables-fip-rules"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched iptablesFIPRule. -func (c *iptablesFIPRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesFIPRule, err error) { - result = &v1.IptablesFIPRule{} - err = c.client.Patch(pt). - Resource("iptables-fip-rules"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablessnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablessnatrule.go deleted file mode 100644 index 576d1fbb92c..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/iptablessnatrule.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// IptablesSnatRulesGetter has a method to return a IptablesSnatRuleInterface. -// A group's client should implement this interface. -type IptablesSnatRulesGetter interface { - IptablesSnatRules() IptablesSnatRuleInterface -} - -// IptablesSnatRuleInterface has methods to work with IptablesSnatRule resources. -type IptablesSnatRuleInterface interface { - Create(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.CreateOptions) (*v1.IptablesSnatRule, error) - Update(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.UpdateOptions) (*v1.IptablesSnatRule, error) - UpdateStatus(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.UpdateOptions) (*v1.IptablesSnatRule, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IptablesSnatRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IptablesSnatRuleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesSnatRule, err error) - IptablesSnatRuleExpansion -} - -// iptablesSnatRules implements IptablesSnatRuleInterface -type iptablesSnatRules struct { - client rest.Interface -} - -// newIptablesSnatRules returns a IptablesSnatRules -func newIptablesSnatRules(c *KubeovnV1Client) *iptablesSnatRules { - return &iptablesSnatRules{ - client: c.RESTClient(), - } -} - -// Get takes name of the iptablesSnatRule, and returns the corresponding iptablesSnatRule object, and an error if there is any. -func (c *iptablesSnatRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IptablesSnatRule, err error) { - result = &v1.IptablesSnatRule{} - err = c.client.Get(). - Resource("iptables-snat-rules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of IptablesSnatRules that match those selectors. -func (c *iptablesSnatRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IptablesSnatRuleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.IptablesSnatRuleList{} - err = c.client.Get(). - Resource("iptables-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested iptablesSnatRules. -func (c *iptablesSnatRules) Watch(ctx context.Context, opts metav1.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("iptables-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a iptablesSnatRule and creates it. Returns the server's representation of the iptablesSnatRule, and an error, if there is any. -func (c *iptablesSnatRules) Create(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.CreateOptions) (result *v1.IptablesSnatRule, err error) { - result = &v1.IptablesSnatRule{} - err = c.client.Post(). - Resource("iptables-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesSnatRule). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a iptablesSnatRule and updates it. Returns the server's representation of the iptablesSnatRule, and an error, if there is any. -func (c *iptablesSnatRules) Update(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.UpdateOptions) (result *v1.IptablesSnatRule, err error) { - result = &v1.IptablesSnatRule{} - err = c.client.Put(). - Resource("iptables-snat-rules"). - Name(iptablesSnatRule.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesSnatRule). - Do(ctx). - 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 *iptablesSnatRules) UpdateStatus(ctx context.Context, iptablesSnatRule *v1.IptablesSnatRule, opts metav1.UpdateOptions) (result *v1.IptablesSnatRule, err error) { - result = &v1.IptablesSnatRule{} - err = c.client.Put(). - Resource("iptables-snat-rules"). - Name(iptablesSnatRule.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(iptablesSnatRule). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the iptablesSnatRule and deletes it. Returns an error if one occurs. -func (c *iptablesSnatRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("iptables-snat-rules"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *iptablesSnatRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("iptables-snat-rules"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched iptablesSnatRule. -func (c *iptablesSnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IptablesSnatRule, err error) { - result = &v1.IptablesSnatRule{} - err = c.client.Patch(pt). - Resource("iptables-snat-rules"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/kubeovn_client.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/kubeovn_client.go deleted file mode 100644 index 86dad154b9e..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/kubeovn_client.go +++ /dev/null @@ -1,192 +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 v1 - -import ( - "net/http" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type KubeovnV1Interface interface { - RESTClient() rest.Interface - HtbQosesGetter - IPsGetter - IptablesDnatRulesGetter - IptablesEIPsGetter - IptablesFIPRulesGetter - IptablesSnatRulesGetter - OvnEipsGetter - OvnFipsGetter - OvnSnatRulesGetter - ProviderNetworksGetter - SecurityGroupsGetter - SubnetsGetter - SwitchLBRulesGetter - VipsGetter - VlansGetter - VpcsGetter - VpcDnsesGetter - VpcNatGatewaysGetter -} - -// KubeovnV1Client is used to interact with features provided by the kubeovn.io group. -type KubeovnV1Client struct { - restClient rest.Interface -} - -func (c *KubeovnV1Client) HtbQoses() HtbQosInterface { - return newHtbQoses(c) -} - -func (c *KubeovnV1Client) IPs() IPInterface { - return newIPs(c) -} - -func (c *KubeovnV1Client) IptablesDnatRules() IptablesDnatRuleInterface { - return newIptablesDnatRules(c) -} - -func (c *KubeovnV1Client) IptablesEIPs() IptablesEIPInterface { - return newIptablesEIPs(c) -} - -func (c *KubeovnV1Client) IptablesFIPRules() IptablesFIPRuleInterface { - return newIptablesFIPRules(c) -} - -func (c *KubeovnV1Client) IptablesSnatRules() IptablesSnatRuleInterface { - return newIptablesSnatRules(c) -} - -func (c *KubeovnV1Client) OvnEips() OvnEipInterface { - return newOvnEips(c) -} - -func (c *KubeovnV1Client) OvnFips() OvnFipInterface { - return newOvnFips(c) -} - -func (c *KubeovnV1Client) OvnSnatRules() OvnSnatRuleInterface { - return newOvnSnatRules(c) -} - -func (c *KubeovnV1Client) ProviderNetworks() ProviderNetworkInterface { - return newProviderNetworks(c) -} - -func (c *KubeovnV1Client) SecurityGroups() SecurityGroupInterface { - return newSecurityGroups(c) -} - -func (c *KubeovnV1Client) Subnets() SubnetInterface { - return newSubnets(c) -} - -func (c *KubeovnV1Client) SwitchLBRules() SwitchLBRuleInterface { - return newSwitchLBRules(c) -} - -func (c *KubeovnV1Client) Vips() VipInterface { - return newVips(c) -} - -func (c *KubeovnV1Client) Vlans() VlanInterface { - return newVlans(c) -} - -func (c *KubeovnV1Client) Vpcs() VpcInterface { - return newVpcs(c) -} - -func (c *KubeovnV1Client) VpcDnses() VpcDnsInterface { - return newVpcDnses(c) -} - -func (c *KubeovnV1Client) VpcNatGateways() VpcNatGatewayInterface { - return newVpcNatGateways(c) -} - -// NewForConfig creates a new KubeovnV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*KubeovnV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new KubeovnV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KubeovnV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &KubeovnV1Client{client}, nil -} - -// NewForConfigOrDie creates a new KubeovnV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KubeovnV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new KubeovnV1Client for the given RESTClient. -func New(c rest.Interface) *KubeovnV1Client { - return &KubeovnV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *KubeovnV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovneip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovneip.go deleted file mode 100644 index 509d0492cac..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovneip.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// OvnEipsGetter has a method to return a OvnEipInterface. -// A group's client should implement this interface. -type OvnEipsGetter interface { - OvnEips() OvnEipInterface -} - -// OvnEipInterface has methods to work with OvnEip resources. -type OvnEipInterface interface { - Create(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.CreateOptions) (*v1.OvnEip, error) - Update(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.UpdateOptions) (*v1.OvnEip, error) - UpdateStatus(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.UpdateOptions) (*v1.OvnEip, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OvnEip, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OvnEipList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnEip, err error) - OvnEipExpansion -} - -// ovnEips implements OvnEipInterface -type ovnEips struct { - client rest.Interface -} - -// newOvnEips returns a OvnEips -func newOvnEips(c *KubeovnV1Client) *ovnEips { - return &ovnEips{ - client: c.RESTClient(), - } -} - -// Get takes name of the ovnEip, and returns the corresponding ovnEip object, and an error if there is any. -func (c *ovnEips) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OvnEip, err error) { - result = &v1.OvnEip{} - err = c.client.Get(). - Resource("ovn-eips"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of OvnEips that match those selectors. -func (c *ovnEips) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OvnEipList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.OvnEipList{} - err = c.client.Get(). - Resource("ovn-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ovnEips. -func (c *ovnEips) Watch(ctx context.Context, opts metav1.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("ovn-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ovnEip and creates it. Returns the server's representation of the ovnEip, and an error, if there is any. -func (c *ovnEips) Create(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.CreateOptions) (result *v1.OvnEip, err error) { - result = &v1.OvnEip{} - err = c.client.Post(). - Resource("ovn-eips"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnEip). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ovnEip and updates it. Returns the server's representation of the ovnEip, and an error, if there is any. -func (c *ovnEips) Update(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.UpdateOptions) (result *v1.OvnEip, err error) { - result = &v1.OvnEip{} - err = c.client.Put(). - Resource("ovn-eips"). - Name(ovnEip.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnEip). - Do(ctx). - 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 *ovnEips) UpdateStatus(ctx context.Context, ovnEip *v1.OvnEip, opts metav1.UpdateOptions) (result *v1.OvnEip, err error) { - result = &v1.OvnEip{} - err = c.client.Put(). - Resource("ovn-eips"). - Name(ovnEip.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnEip). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ovnEip and deletes it. Returns an error if one occurs. -func (c *ovnEips) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("ovn-eips"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ovnEips) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ovn-eips"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ovnEip. -func (c *ovnEips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnEip, err error) { - result = &v1.OvnEip{} - err = c.client.Patch(pt). - Resource("ovn-eips"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnfip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnfip.go deleted file mode 100644 index 0f20cebdfe0..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnfip.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// OvnFipsGetter has a method to return a OvnFipInterface. -// A group's client should implement this interface. -type OvnFipsGetter interface { - OvnFips() OvnFipInterface -} - -// OvnFipInterface has methods to work with OvnFip resources. -type OvnFipInterface interface { - Create(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.CreateOptions) (*v1.OvnFip, error) - Update(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.UpdateOptions) (*v1.OvnFip, error) - UpdateStatus(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.UpdateOptions) (*v1.OvnFip, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OvnFip, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OvnFipList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnFip, err error) - OvnFipExpansion -} - -// ovnFips implements OvnFipInterface -type ovnFips struct { - client rest.Interface -} - -// newOvnFips returns a OvnFips -func newOvnFips(c *KubeovnV1Client) *ovnFips { - return &ovnFips{ - client: c.RESTClient(), - } -} - -// Get takes name of the ovnFip, and returns the corresponding ovnFip object, and an error if there is any. -func (c *ovnFips) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OvnFip, err error) { - result = &v1.OvnFip{} - err = c.client.Get(). - Resource("ovn-fips"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of OvnFips that match those selectors. -func (c *ovnFips) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OvnFipList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.OvnFipList{} - err = c.client.Get(). - Resource("ovn-fips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ovnFips. -func (c *ovnFips) Watch(ctx context.Context, opts metav1.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("ovn-fips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ovnFip and creates it. Returns the server's representation of the ovnFip, and an error, if there is any. -func (c *ovnFips) Create(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.CreateOptions) (result *v1.OvnFip, err error) { - result = &v1.OvnFip{} - err = c.client.Post(). - Resource("ovn-fips"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnFip). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ovnFip and updates it. Returns the server's representation of the ovnFip, and an error, if there is any. -func (c *ovnFips) Update(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.UpdateOptions) (result *v1.OvnFip, err error) { - result = &v1.OvnFip{} - err = c.client.Put(). - Resource("ovn-fips"). - Name(ovnFip.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnFip). - Do(ctx). - 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 *ovnFips) UpdateStatus(ctx context.Context, ovnFip *v1.OvnFip, opts metav1.UpdateOptions) (result *v1.OvnFip, err error) { - result = &v1.OvnFip{} - err = c.client.Put(). - Resource("ovn-fips"). - Name(ovnFip.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnFip). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ovnFip and deletes it. Returns an error if one occurs. -func (c *ovnFips) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("ovn-fips"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ovnFips) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ovn-fips"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ovnFip. -func (c *ovnFips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnFip, err error) { - result = &v1.OvnFip{} - err = c.client.Patch(pt). - Resource("ovn-fips"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnsnatrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnsnatrule.go deleted file mode 100644 index 93bb2c01b12..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/ovnsnatrule.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// OvnSnatRulesGetter has a method to return a OvnSnatRuleInterface. -// A group's client should implement this interface. -type OvnSnatRulesGetter interface { - OvnSnatRules() OvnSnatRuleInterface -} - -// OvnSnatRuleInterface has methods to work with OvnSnatRule resources. -type OvnSnatRuleInterface interface { - Create(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.CreateOptions) (*v1.OvnSnatRule, error) - Update(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.UpdateOptions) (*v1.OvnSnatRule, error) - UpdateStatus(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.UpdateOptions) (*v1.OvnSnatRule, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OvnSnatRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OvnSnatRuleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnSnatRule, err error) - OvnSnatRuleExpansion -} - -// ovnSnatRules implements OvnSnatRuleInterface -type ovnSnatRules struct { - client rest.Interface -} - -// newOvnSnatRules returns a OvnSnatRules -func newOvnSnatRules(c *KubeovnV1Client) *ovnSnatRules { - return &ovnSnatRules{ - client: c.RESTClient(), - } -} - -// Get takes name of the ovnSnatRule, and returns the corresponding ovnSnatRule object, and an error if there is any. -func (c *ovnSnatRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OvnSnatRule, err error) { - result = &v1.OvnSnatRule{} - err = c.client.Get(). - Resource("ovn-snat-rules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of OvnSnatRules that match those selectors. -func (c *ovnSnatRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OvnSnatRuleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.OvnSnatRuleList{} - err = c.client.Get(). - Resource("ovn-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ovnSnatRules. -func (c *ovnSnatRules) Watch(ctx context.Context, opts metav1.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("ovn-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ovnSnatRule and creates it. Returns the server's representation of the ovnSnatRule, and an error, if there is any. -func (c *ovnSnatRules) Create(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.CreateOptions) (result *v1.OvnSnatRule, err error) { - result = &v1.OvnSnatRule{} - err = c.client.Post(). - Resource("ovn-snat-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnSnatRule). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ovnSnatRule and updates it. Returns the server's representation of the ovnSnatRule, and an error, if there is any. -func (c *ovnSnatRules) Update(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.UpdateOptions) (result *v1.OvnSnatRule, err error) { - result = &v1.OvnSnatRule{} - err = c.client.Put(). - Resource("ovn-snat-rules"). - Name(ovnSnatRule.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnSnatRule). - Do(ctx). - 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 *ovnSnatRules) UpdateStatus(ctx context.Context, ovnSnatRule *v1.OvnSnatRule, opts metav1.UpdateOptions) (result *v1.OvnSnatRule, err error) { - result = &v1.OvnSnatRule{} - err = c.client.Put(). - Resource("ovn-snat-rules"). - Name(ovnSnatRule.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ovnSnatRule). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ovnSnatRule and deletes it. Returns an error if one occurs. -func (c *ovnSnatRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("ovn-snat-rules"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ovnSnatRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ovn-snat-rules"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ovnSnatRule. -func (c *ovnSnatRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OvnSnatRule, err error) { - result = &v1.OvnSnatRule{} - err = c.client.Patch(pt). - Resource("ovn-snat-rules"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/providernetwork.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/providernetwork.go deleted file mode 100644 index fcef8da37fa..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/providernetwork.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// ProviderNetworksGetter has a method to return a ProviderNetworkInterface. -// A group's client should implement this interface. -type ProviderNetworksGetter interface { - ProviderNetworks() ProviderNetworkInterface -} - -// ProviderNetworkInterface has methods to work with ProviderNetwork resources. -type ProviderNetworkInterface interface { - Create(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.CreateOptions) (*v1.ProviderNetwork, error) - Update(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.UpdateOptions) (*v1.ProviderNetwork, error) - UpdateStatus(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.UpdateOptions) (*v1.ProviderNetwork, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ProviderNetwork, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ProviderNetworkList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ProviderNetwork, err error) - ProviderNetworkExpansion -} - -// providerNetworks implements ProviderNetworkInterface -type providerNetworks struct { - client rest.Interface -} - -// newProviderNetworks returns a ProviderNetworks -func newProviderNetworks(c *KubeovnV1Client) *providerNetworks { - return &providerNetworks{ - client: c.RESTClient(), - } -} - -// Get takes name of the providerNetwork, and returns the corresponding providerNetwork object, and an error if there is any. -func (c *providerNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ProviderNetwork, err error) { - result = &v1.ProviderNetwork{} - err = c.client.Get(). - Resource("provider-networks"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ProviderNetworks that match those selectors. -func (c *providerNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProviderNetworkList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.ProviderNetworkList{} - err = c.client.Get(). - Resource("provider-networks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested providerNetworks. -func (c *providerNetworks) Watch(ctx context.Context, opts metav1.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("provider-networks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a providerNetwork and creates it. Returns the server's representation of the providerNetwork, and an error, if there is any. -func (c *providerNetworks) Create(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.CreateOptions) (result *v1.ProviderNetwork, err error) { - result = &v1.ProviderNetwork{} - err = c.client.Post(). - Resource("provider-networks"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(providerNetwork). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a providerNetwork and updates it. Returns the server's representation of the providerNetwork, and an error, if there is any. -func (c *providerNetworks) Update(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.UpdateOptions) (result *v1.ProviderNetwork, err error) { - result = &v1.ProviderNetwork{} - err = c.client.Put(). - Resource("provider-networks"). - Name(providerNetwork.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(providerNetwork). - Do(ctx). - 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 *providerNetworks) UpdateStatus(ctx context.Context, providerNetwork *v1.ProviderNetwork, opts metav1.UpdateOptions) (result *v1.ProviderNetwork, err error) { - result = &v1.ProviderNetwork{} - err = c.client.Put(). - Resource("provider-networks"). - Name(providerNetwork.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(providerNetwork). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the providerNetwork and deletes it. Returns an error if one occurs. -func (c *providerNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("provider-networks"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *providerNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("provider-networks"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched providerNetwork. -func (c *providerNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ProviderNetwork, err error) { - result = &v1.ProviderNetwork{} - err = c.client.Patch(pt). - Resource("provider-networks"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/securitygroup.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/securitygroup.go deleted file mode 100644 index 391baf47c56..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/securitygroup.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// SecurityGroupsGetter has a method to return a SecurityGroupInterface. -// A group's client should implement this interface. -type SecurityGroupsGetter interface { - SecurityGroups() SecurityGroupInterface -} - -// SecurityGroupInterface has methods to work with SecurityGroup resources. -type SecurityGroupInterface interface { - Create(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.CreateOptions) (*v1.SecurityGroup, error) - Update(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.UpdateOptions) (*v1.SecurityGroup, error) - UpdateStatus(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.UpdateOptions) (*v1.SecurityGroup, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SecurityGroup, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SecurityGroupList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SecurityGroup, err error) - SecurityGroupExpansion -} - -// securityGroups implements SecurityGroupInterface -type securityGroups struct { - client rest.Interface -} - -// newSecurityGroups returns a SecurityGroups -func newSecurityGroups(c *KubeovnV1Client) *securityGroups { - return &securityGroups{ - client: c.RESTClient(), - } -} - -// Get takes name of the securityGroup, and returns the corresponding securityGroup object, and an error if there is any. -func (c *securityGroups) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SecurityGroup, err error) { - result = &v1.SecurityGroup{} - err = c.client.Get(). - Resource("security-groups"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of SecurityGroups that match those selectors. -func (c *securityGroups) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecurityGroupList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.SecurityGroupList{} - err = c.client.Get(). - Resource("security-groups"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested securityGroups. -func (c *securityGroups) Watch(ctx context.Context, opts metav1.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("security-groups"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a securityGroup and creates it. Returns the server's representation of the securityGroup, and an error, if there is any. -func (c *securityGroups) Create(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.CreateOptions) (result *v1.SecurityGroup, err error) { - result = &v1.SecurityGroup{} - err = c.client.Post(). - Resource("security-groups"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(securityGroup). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a securityGroup and updates it. Returns the server's representation of the securityGroup, and an error, if there is any. -func (c *securityGroups) Update(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.UpdateOptions) (result *v1.SecurityGroup, err error) { - result = &v1.SecurityGroup{} - err = c.client.Put(). - Resource("security-groups"). - Name(securityGroup.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(securityGroup). - Do(ctx). - 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 *securityGroups) UpdateStatus(ctx context.Context, securityGroup *v1.SecurityGroup, opts metav1.UpdateOptions) (result *v1.SecurityGroup, err error) { - result = &v1.SecurityGroup{} - err = c.client.Put(). - Resource("security-groups"). - Name(securityGroup.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(securityGroup). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the securityGroup and deletes it. Returns an error if one occurs. -func (c *securityGroups) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("security-groups"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *securityGroups) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("security-groups"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched securityGroup. -func (c *securityGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SecurityGroup, err error) { - result = &v1.SecurityGroup{} - err = c.client.Patch(pt). - Resource("security-groups"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/subnet.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/subnet.go deleted file mode 100644 index a1638ef10f5..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/subnet.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// SubnetsGetter has a method to return a SubnetInterface. -// A group's client should implement this interface. -type SubnetsGetter interface { - Subnets() SubnetInterface -} - -// SubnetInterface has methods to work with Subnet resources. -type SubnetInterface interface { - Create(ctx context.Context, subnet *v1.Subnet, opts metav1.CreateOptions) (*v1.Subnet, error) - Update(ctx context.Context, subnet *v1.Subnet, opts metav1.UpdateOptions) (*v1.Subnet, error) - UpdateStatus(ctx context.Context, subnet *v1.Subnet, opts metav1.UpdateOptions) (*v1.Subnet, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Subnet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SubnetList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Subnet, err error) - SubnetExpansion -} - -// subnets implements SubnetInterface -type subnets struct { - client rest.Interface -} - -// newSubnets returns a Subnets -func newSubnets(c *KubeovnV1Client) *subnets { - return &subnets{ - client: c.RESTClient(), - } -} - -// Get takes name of the subnet, and returns the corresponding subnet object, and an error if there is any. -func (c *subnets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Subnet, err error) { - result = &v1.Subnet{} - err = c.client.Get(). - Resource("subnets"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Subnets that match those selectors. -func (c *subnets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SubnetList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.SubnetList{} - err = c.client.Get(). - Resource("subnets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested subnets. -func (c *subnets) Watch(ctx context.Context, opts metav1.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("subnets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a subnet and creates it. Returns the server's representation of the subnet, and an error, if there is any. -func (c *subnets) Create(ctx context.Context, subnet *v1.Subnet, opts metav1.CreateOptions) (result *v1.Subnet, err error) { - result = &v1.Subnet{} - err = c.client.Post(). - Resource("subnets"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(subnet). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a subnet and updates it. Returns the server's representation of the subnet, and an error, if there is any. -func (c *subnets) Update(ctx context.Context, subnet *v1.Subnet, opts metav1.UpdateOptions) (result *v1.Subnet, err error) { - result = &v1.Subnet{} - err = c.client.Put(). - Resource("subnets"). - Name(subnet.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(subnet). - Do(ctx). - 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 *subnets) UpdateStatus(ctx context.Context, subnet *v1.Subnet, opts metav1.UpdateOptions) (result *v1.Subnet, err error) { - result = &v1.Subnet{} - err = c.client.Put(). - Resource("subnets"). - Name(subnet.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(subnet). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the subnet and deletes it. Returns an error if one occurs. -func (c *subnets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("subnets"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *subnets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("subnets"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched subnet. -func (c *subnets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Subnet, err error) { - result = &v1.Subnet{} - err = c.client.Patch(pt). - Resource("subnets"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/switchlbrule.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/switchlbrule.go deleted file mode 100644 index 537deb6a187..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/switchlbrule.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// SwitchLBRulesGetter has a method to return a SwitchLBRuleInterface. -// A group's client should implement this interface. -type SwitchLBRulesGetter interface { - SwitchLBRules() SwitchLBRuleInterface -} - -// SwitchLBRuleInterface has methods to work with SwitchLBRule resources. -type SwitchLBRuleInterface interface { - Create(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.CreateOptions) (*v1.SwitchLBRule, error) - Update(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.UpdateOptions) (*v1.SwitchLBRule, error) - UpdateStatus(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.UpdateOptions) (*v1.SwitchLBRule, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SwitchLBRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SwitchLBRuleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SwitchLBRule, err error) - SwitchLBRuleExpansion -} - -// switchLBRules implements SwitchLBRuleInterface -type switchLBRules struct { - client rest.Interface -} - -// newSwitchLBRules returns a SwitchLBRules -func newSwitchLBRules(c *KubeovnV1Client) *switchLBRules { - return &switchLBRules{ - client: c.RESTClient(), - } -} - -// Get takes name of the switchLBRule, and returns the corresponding switchLBRule object, and an error if there is any. -func (c *switchLBRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SwitchLBRule, err error) { - result = &v1.SwitchLBRule{} - err = c.client.Get(). - Resource("switch-lb-rules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of SwitchLBRules that match those selectors. -func (c *switchLBRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SwitchLBRuleList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.SwitchLBRuleList{} - err = c.client.Get(). - Resource("switch-lb-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested switchLBRules. -func (c *switchLBRules) Watch(ctx context.Context, opts metav1.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("switch-lb-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a switchLBRule and creates it. Returns the server's representation of the switchLBRule, and an error, if there is any. -func (c *switchLBRules) Create(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.CreateOptions) (result *v1.SwitchLBRule, err error) { - result = &v1.SwitchLBRule{} - err = c.client.Post(). - Resource("switch-lb-rules"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(switchLBRule). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a switchLBRule and updates it. Returns the server's representation of the switchLBRule, and an error, if there is any. -func (c *switchLBRules) Update(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.UpdateOptions) (result *v1.SwitchLBRule, err error) { - result = &v1.SwitchLBRule{} - err = c.client.Put(). - Resource("switch-lb-rules"). - Name(switchLBRule.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(switchLBRule). - Do(ctx). - 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 *switchLBRules) UpdateStatus(ctx context.Context, switchLBRule *v1.SwitchLBRule, opts metav1.UpdateOptions) (result *v1.SwitchLBRule, err error) { - result = &v1.SwitchLBRule{} - err = c.client.Put(). - Resource("switch-lb-rules"). - Name(switchLBRule.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(switchLBRule). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the switchLBRule and deletes it. Returns an error if one occurs. -func (c *switchLBRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("switch-lb-rules"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *switchLBRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("switch-lb-rules"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched switchLBRule. -func (c *switchLBRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SwitchLBRule, err error) { - result = &v1.SwitchLBRule{} - err = c.client.Patch(pt). - Resource("switch-lb-rules"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vip.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vip.go deleted file mode 100644 index b355e6079bc..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vip.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// VipsGetter has a method to return a VipInterface. -// A group's client should implement this interface. -type VipsGetter interface { - Vips() VipInterface -} - -// VipInterface has methods to work with Vip resources. -type VipInterface interface { - Create(ctx context.Context, vip *v1.Vip, opts metav1.CreateOptions) (*v1.Vip, error) - Update(ctx context.Context, vip *v1.Vip, opts metav1.UpdateOptions) (*v1.Vip, error) - UpdateStatus(ctx context.Context, vip *v1.Vip, opts metav1.UpdateOptions) (*v1.Vip, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Vip, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VipList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vip, err error) - VipExpansion -} - -// vips implements VipInterface -type vips struct { - client rest.Interface -} - -// newVips returns a Vips -func newVips(c *KubeovnV1Client) *vips { - return &vips{ - client: c.RESTClient(), - } -} - -// Get takes name of the vip, and returns the corresponding vip object, and an error if there is any. -func (c *vips) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Vip, err error) { - result = &v1.Vip{} - err = c.client.Get(). - Resource("vips"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Vips that match those selectors. -func (c *vips) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VipList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VipList{} - err = c.client.Get(). - Resource("vips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested vips. -func (c *vips) Watch(ctx context.Context, opts metav1.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("vips"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a vip and creates it. Returns the server's representation of the vip, and an error, if there is any. -func (c *vips) Create(ctx context.Context, vip *v1.Vip, opts metav1.CreateOptions) (result *v1.Vip, err error) { - result = &v1.Vip{} - err = c.client.Post(). - Resource("vips"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vip). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a vip and updates it. Returns the server's representation of the vip, and an error, if there is any. -func (c *vips) Update(ctx context.Context, vip *v1.Vip, opts metav1.UpdateOptions) (result *v1.Vip, err error) { - result = &v1.Vip{} - err = c.client.Put(). - Resource("vips"). - Name(vip.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vip). - Do(ctx). - 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 *vips) UpdateStatus(ctx context.Context, vip *v1.Vip, opts metav1.UpdateOptions) (result *v1.Vip, err error) { - result = &v1.Vip{} - err = c.client.Put(). - Resource("vips"). - Name(vip.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vip). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the vip and deletes it. Returns an error if one occurs. -func (c *vips) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("vips"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *vips) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("vips"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched vip. -func (c *vips) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vip, err error) { - result = &v1.Vip{} - err = c.client.Patch(pt). - Resource("vips"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vlan.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vlan.go deleted file mode 100644 index 64e91699707..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vlan.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// VlansGetter has a method to return a VlanInterface. -// A group's client should implement this interface. -type VlansGetter interface { - Vlans() VlanInterface -} - -// VlanInterface has methods to work with Vlan resources. -type VlanInterface interface { - Create(ctx context.Context, vlan *v1.Vlan, opts metav1.CreateOptions) (*v1.Vlan, error) - Update(ctx context.Context, vlan *v1.Vlan, opts metav1.UpdateOptions) (*v1.Vlan, error) - UpdateStatus(ctx context.Context, vlan *v1.Vlan, opts metav1.UpdateOptions) (*v1.Vlan, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Vlan, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VlanList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vlan, err error) - VlanExpansion -} - -// vlans implements VlanInterface -type vlans struct { - client rest.Interface -} - -// newVlans returns a Vlans -func newVlans(c *KubeovnV1Client) *vlans { - return &vlans{ - client: c.RESTClient(), - } -} - -// Get takes name of the vlan, and returns the corresponding vlan object, and an error if there is any. -func (c *vlans) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Vlan, err error) { - result = &v1.Vlan{} - err = c.client.Get(). - Resource("vlans"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Vlans that match those selectors. -func (c *vlans) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VlanList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VlanList{} - err = c.client.Get(). - Resource("vlans"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested vlans. -func (c *vlans) Watch(ctx context.Context, opts metav1.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("vlans"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a vlan and creates it. Returns the server's representation of the vlan, and an error, if there is any. -func (c *vlans) Create(ctx context.Context, vlan *v1.Vlan, opts metav1.CreateOptions) (result *v1.Vlan, err error) { - result = &v1.Vlan{} - err = c.client.Post(). - Resource("vlans"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vlan). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a vlan and updates it. Returns the server's representation of the vlan, and an error, if there is any. -func (c *vlans) Update(ctx context.Context, vlan *v1.Vlan, opts metav1.UpdateOptions) (result *v1.Vlan, err error) { - result = &v1.Vlan{} - err = c.client.Put(). - Resource("vlans"). - Name(vlan.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vlan). - Do(ctx). - 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 *vlans) UpdateStatus(ctx context.Context, vlan *v1.Vlan, opts metav1.UpdateOptions) (result *v1.Vlan, err error) { - result = &v1.Vlan{} - err = c.client.Put(). - Resource("vlans"). - Name(vlan.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vlan). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the vlan and deletes it. Returns an error if one occurs. -func (c *vlans) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("vlans"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *vlans) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("vlans"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched vlan. -func (c *vlans) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vlan, err error) { - result = &v1.Vlan{} - err = c.client.Patch(pt). - Resource("vlans"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpc.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpc.go deleted file mode 100644 index 788500624fd..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpc.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// VpcsGetter has a method to return a VpcInterface. -// A group's client should implement this interface. -type VpcsGetter interface { - Vpcs() VpcInterface -} - -// VpcInterface has methods to work with Vpc resources. -type VpcInterface interface { - Create(ctx context.Context, vpc *v1.Vpc, opts metav1.CreateOptions) (*v1.Vpc, error) - Update(ctx context.Context, vpc *v1.Vpc, opts metav1.UpdateOptions) (*v1.Vpc, error) - UpdateStatus(ctx context.Context, vpc *v1.Vpc, opts metav1.UpdateOptions) (*v1.Vpc, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Vpc, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VpcList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vpc, err error) - VpcExpansion -} - -// vpcs implements VpcInterface -type vpcs struct { - client rest.Interface -} - -// newVpcs returns a Vpcs -func newVpcs(c *KubeovnV1Client) *vpcs { - return &vpcs{ - client: c.RESTClient(), - } -} - -// Get takes name of the vpc, and returns the corresponding vpc object, and an error if there is any. -func (c *vpcs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Vpc, err error) { - result = &v1.Vpc{} - err = c.client.Get(). - Resource("vpcs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Vpcs that match those selectors. -func (c *vpcs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VpcList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VpcList{} - err = c.client.Get(). - Resource("vpcs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested vpcs. -func (c *vpcs) Watch(ctx context.Context, opts metav1.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("vpcs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a vpc and creates it. Returns the server's representation of the vpc, and an error, if there is any. -func (c *vpcs) Create(ctx context.Context, vpc *v1.Vpc, opts metav1.CreateOptions) (result *v1.Vpc, err error) { - result = &v1.Vpc{} - err = c.client.Post(). - Resource("vpcs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpc). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a vpc and updates it. Returns the server's representation of the vpc, and an error, if there is any. -func (c *vpcs) Update(ctx context.Context, vpc *v1.Vpc, opts metav1.UpdateOptions) (result *v1.Vpc, err error) { - result = &v1.Vpc{} - err = c.client.Put(). - Resource("vpcs"). - Name(vpc.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpc). - Do(ctx). - 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 *vpcs) UpdateStatus(ctx context.Context, vpc *v1.Vpc, opts metav1.UpdateOptions) (result *v1.Vpc, err error) { - result = &v1.Vpc{} - err = c.client.Put(). - Resource("vpcs"). - Name(vpc.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpc). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the vpc and deletes it. Returns an error if one occurs. -func (c *vpcs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("vpcs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *vpcs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("vpcs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched vpc. -func (c *vpcs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Vpc, err error) { - result = &v1.Vpc{} - err = c.client.Patch(pt). - Resource("vpcs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcdns.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcdns.go deleted file mode 100644 index a5190ce56af..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcdns.go +++ /dev/null @@ -1,184 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// VpcDnsesGetter has a method to return a VpcDnsInterface. -// A group's client should implement this interface. -type VpcDnsesGetter interface { - VpcDnses() VpcDnsInterface -} - -// VpcDnsInterface has methods to work with VpcDns resources. -type VpcDnsInterface interface { - Create(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.CreateOptions) (*v1.VpcDns, error) - Update(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.UpdateOptions) (*v1.VpcDns, error) - UpdateStatus(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.UpdateOptions) (*v1.VpcDns, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VpcDns, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VpcDnsList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VpcDns, err error) - VpcDnsExpansion -} - -// vpcDnses implements VpcDnsInterface -type vpcDnses struct { - client rest.Interface -} - -// newVpcDnses returns a VpcDnses -func newVpcDnses(c *KubeovnV1Client) *vpcDnses { - return &vpcDnses{ - client: c.RESTClient(), - } -} - -// Get takes name of the vpcDns, and returns the corresponding vpcDns object, and an error if there is any. -func (c *vpcDnses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VpcDns, err error) { - result = &v1.VpcDns{} - err = c.client.Get(). - Resource("vpc-dnses"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VpcDnses that match those selectors. -func (c *vpcDnses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VpcDnsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VpcDnsList{} - err = c.client.Get(). - Resource("vpc-dnses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested vpcDnses. -func (c *vpcDnses) Watch(ctx context.Context, opts metav1.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("vpc-dnses"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a vpcDns and creates it. Returns the server's representation of the vpcDns, and an error, if there is any. -func (c *vpcDnses) Create(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.CreateOptions) (result *v1.VpcDns, err error) { - result = &v1.VpcDns{} - err = c.client.Post(). - Resource("vpc-dnses"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpcDns). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a vpcDns and updates it. Returns the server's representation of the vpcDns, and an error, if there is any. -func (c *vpcDnses) Update(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.UpdateOptions) (result *v1.VpcDns, err error) { - result = &v1.VpcDns{} - err = c.client.Put(). - Resource("vpc-dnses"). - Name(vpcDns.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpcDns). - Do(ctx). - 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 *vpcDnses) UpdateStatus(ctx context.Context, vpcDns *v1.VpcDns, opts metav1.UpdateOptions) (result *v1.VpcDns, err error) { - result = &v1.VpcDns{} - err = c.client.Put(). - Resource("vpc-dnses"). - Name(vpcDns.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpcDns). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the vpcDns and deletes it. Returns an error if one occurs. -func (c *vpcDnses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("vpc-dnses"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *vpcDnses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("vpc-dnses"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched vpcDns. -func (c *vpcDnses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VpcDns, err error) { - result = &v1.VpcDns{} - err = c.client.Patch(pt). - Resource("vpc-dnses"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcnatgateway.go b/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcnatgateway.go deleted file mode 100644 index 03d08658f38..00000000000 --- a/pkg/client/listers/clientset/versioned/typed/kubeovn/v1/vpcnatgateway.go +++ /dev/null @@ -1,168 +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 v1 - -import ( - "context" - "time" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - scheme "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned/scheme" - metav1 "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" -) - -// VpcNatGatewaysGetter has a method to return a VpcNatGatewayInterface. -// A group's client should implement this interface. -type VpcNatGatewaysGetter interface { - VpcNatGateways() VpcNatGatewayInterface -} - -// VpcNatGatewayInterface has methods to work with VpcNatGateway resources. -type VpcNatGatewayInterface interface { - Create(ctx context.Context, vpcNatGateway *v1.VpcNatGateway, opts metav1.CreateOptions) (*v1.VpcNatGateway, error) - Update(ctx context.Context, vpcNatGateway *v1.VpcNatGateway, opts metav1.UpdateOptions) (*v1.VpcNatGateway, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VpcNatGateway, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.VpcNatGatewayList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VpcNatGateway, err error) - VpcNatGatewayExpansion -} - -// vpcNatGateways implements VpcNatGatewayInterface -type vpcNatGateways struct { - client rest.Interface -} - -// newVpcNatGateways returns a VpcNatGateways -func newVpcNatGateways(c *KubeovnV1Client) *vpcNatGateways { - return &vpcNatGateways{ - client: c.RESTClient(), - } -} - -// Get takes name of the vpcNatGateway, and returns the corresponding vpcNatGateway object, and an error if there is any. -func (c *vpcNatGateways) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.VpcNatGateway, err error) { - result = &v1.VpcNatGateway{} - err = c.client.Get(). - Resource("vpc-nat-gateways"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of VpcNatGateways that match those selectors. -func (c *vpcNatGateways) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VpcNatGatewayList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.VpcNatGatewayList{} - err = c.client.Get(). - Resource("vpc-nat-gateways"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested vpcNatGateways. -func (c *vpcNatGateways) Watch(ctx context.Context, opts metav1.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("vpc-nat-gateways"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a vpcNatGateway and creates it. Returns the server's representation of the vpcNatGateway, and an error, if there is any. -func (c *vpcNatGateways) Create(ctx context.Context, vpcNatGateway *v1.VpcNatGateway, opts metav1.CreateOptions) (result *v1.VpcNatGateway, err error) { - result = &v1.VpcNatGateway{} - err = c.client.Post(). - Resource("vpc-nat-gateways"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpcNatGateway). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a vpcNatGateway and updates it. Returns the server's representation of the vpcNatGateway, and an error, if there is any. -func (c *vpcNatGateways) Update(ctx context.Context, vpcNatGateway *v1.VpcNatGateway, opts metav1.UpdateOptions) (result *v1.VpcNatGateway, err error) { - result = &v1.VpcNatGateway{} - err = c.client.Put(). - Resource("vpc-nat-gateways"). - Name(vpcNatGateway.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(vpcNatGateway). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the vpcNatGateway and deletes it. Returns an error if one occurs. -func (c *vpcNatGateways) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("vpc-nat-gateways"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *vpcNatGateways) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("vpc-nat-gateways"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched vpcNatGateway. -func (c *vpcNatGateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VpcNatGateway, err error) { - result = &v1.VpcNatGateway{} - err = c.client.Patch(pt). - Resource("vpc-nat-gateways"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/listers/informers/externalversions/factory.go b/pkg/client/listers/informers/externalversions/factory.go deleted file mode 100644 index baba604c99f..00000000000 --- a/pkg/client/listers/informers/externalversions/factory.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 informer-gen. DO NOT EDIT. - -package externalversions - -import ( - reflect "reflect" - sync "sync" - time "time" - - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - kubeovn "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/kubeovn" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// SharedInformerOption defines the functional option type for SharedInformerFactory. -type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory - -type sharedInformerFactory struct { - client versioned.Interface - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool -} - -// WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - for k, v := range resyncConfig { - factory.customResync[reflect.TypeOf(k)] = v - } - return factory - } -} - -// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. -func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.tweakListOptions = tweakListOptions - return factory - } -} - -// WithNamespace limits the SharedInformerFactory to the specified namespace. -func WithNamespace(namespace string) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.namespace = namespace - return factory - } -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -// Deprecated: Please use NewSharedInformerFactoryWithOptions instead -func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) -} - -// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { - factory := &sharedInformerFactory{ - client: client, - namespace: v1.NamespaceAll, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - factory = opt(factory) - } - - return factory -} - -// Start initializes all requested informers. -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - go informer.Run(stopCh) - f.startedInformers[informerType] = true - } - } -} - -// WaitForCacheSync waits for all started informers' cache were synced. -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InternalInformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - Kubeovn() kubeovn.Interface -} - -func (f *sharedInformerFactory) Kubeovn() kubeovn.Interface { - return kubeovn.New(f, f.namespace, f.tweakListOptions) -} diff --git a/pkg/client/listers/informers/externalversions/generic.go b/pkg/client/listers/informers/externalversions/generic.go deleted file mode 100644 index 5a9cf825907..00000000000 --- a/pkg/client/listers/informers/externalversions/generic.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 informer-gen. DO NOT EDIT. - -package externalversions - -import ( - "fmt" - - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=kubeovn.io, Version=v1 - case v1.SchemeGroupVersion.WithResource("htbqoses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().HtbQoses().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("ips"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().IPs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("iptables-dnat-rules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().IptablesDnatRules().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("iptables-eips"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().IptablesEIPs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("iptables-fip-rules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().IptablesFIPRules().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("iptables-snat-rules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().IptablesSnatRules().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("ovn-eips"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().OvnEips().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("ovn-fips"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().OvnFips().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("ovn-snat-rules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().OvnSnatRules().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("provider-networks"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().ProviderNetworks().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("security-groups"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().SecurityGroups().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("subnets"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().Subnets().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("switch-lb-rules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().SwitchLBRules().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("vips"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().Vips().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("vlans"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().Vlans().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("vpcs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().Vpcs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("vpc-dnses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().VpcDnses().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("vpc-nat-gateways"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeovn().V1().VpcNatGateways().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/pkg/client/listers/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/listers/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index 801e5805f23..00000000000 --- a/pkg/client/listers/informers/externalversions/internalinterfaces/factory_interfaces.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 informer-gen. DO NOT EDIT. - -package internalinterfaces - -import ( - time "time" - - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" -) - -// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. -type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer -} - -// TweakListOptionsFunc is a function that transforms a v1.ListOptions. -type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/pkg/client/listers/informers/externalversions/kubeovn/interface.go b/pkg/client/listers/informers/externalversions/kubeovn/interface.go deleted file mode 100644 index 4068b949381..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/interface.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 informer-gen. DO NOT EDIT. - -package kubeovn - -import ( - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/kubeovn/v1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/htbqos.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/htbqos.go deleted file mode 100644 index 3560b8f2aa9..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/htbqos.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// HtbQosInformer provides access to a shared informer and lister for -// HtbQoses. -type HtbQosInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.HtbQosLister -} - -type htbQosInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewHtbQosInformer constructs a new informer for HtbQos type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewHtbQosInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredHtbQosInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredHtbQosInformer constructs a new informer for HtbQos type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredHtbQosInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().HtbQoses().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().HtbQoses().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.HtbQos{}, - resyncPeriod, - indexers, - ) -} - -func (f *htbQosInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredHtbQosInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *htbQosInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.HtbQos{}, f.defaultInformer) -} - -func (f *htbQosInformer) Lister() v1.HtbQosLister { - return v1.NewHtbQosLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/interface.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/interface.go deleted file mode 100644 index 14af985943c..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/interface.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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // HtbQoses returns a HtbQosInformer. - HtbQoses() HtbQosInformer - // IPs returns a IPInformer. - IPs() IPInformer - // IptablesDnatRules returns a IptablesDnatRuleInformer. - IptablesDnatRules() IptablesDnatRuleInformer - // IptablesEIPs returns a IptablesEIPInformer. - IptablesEIPs() IptablesEIPInformer - // IptablesFIPRules returns a IptablesFIPRuleInformer. - IptablesFIPRules() IptablesFIPRuleInformer - // IptablesSnatRules returns a IptablesSnatRuleInformer. - IptablesSnatRules() IptablesSnatRuleInformer - // OvnEips returns a OvnEipInformer. - OvnEips() OvnEipInformer - // OvnFips returns a OvnFipInformer. - OvnFips() OvnFipInformer - // OvnSnatRules returns a OvnSnatRuleInformer. - OvnSnatRules() OvnSnatRuleInformer - // ProviderNetworks returns a ProviderNetworkInformer. - ProviderNetworks() ProviderNetworkInformer - // SecurityGroups returns a SecurityGroupInformer. - SecurityGroups() SecurityGroupInformer - // Subnets returns a SubnetInformer. - Subnets() SubnetInformer - // SwitchLBRules returns a SwitchLBRuleInformer. - SwitchLBRules() SwitchLBRuleInformer - // Vips returns a VipInformer. - Vips() VipInformer - // Vlans returns a VlanInformer. - Vlans() VlanInformer - // Vpcs returns a VpcInformer. - Vpcs() VpcInformer - // VpcDnses returns a VpcDnsInformer. - VpcDnses() VpcDnsInformer - // VpcNatGateways returns a VpcNatGatewayInformer. - VpcNatGateways() VpcNatGatewayInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// HtbQoses returns a HtbQosInformer. -func (v *version) HtbQoses() HtbQosInformer { - return &htbQosInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// IPs returns a IPInformer. -func (v *version) IPs() IPInformer { - return &iPInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// IptablesDnatRules returns a IptablesDnatRuleInformer. -func (v *version) IptablesDnatRules() IptablesDnatRuleInformer { - return &iptablesDnatRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// IptablesEIPs returns a IptablesEIPInformer. -func (v *version) IptablesEIPs() IptablesEIPInformer { - return &iptablesEIPInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// IptablesFIPRules returns a IptablesFIPRuleInformer. -func (v *version) IptablesFIPRules() IptablesFIPRuleInformer { - return &iptablesFIPRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// IptablesSnatRules returns a IptablesSnatRuleInformer. -func (v *version) IptablesSnatRules() IptablesSnatRuleInformer { - return &iptablesSnatRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// OvnEips returns a OvnEipInformer. -func (v *version) OvnEips() OvnEipInformer { - return &ovnEipInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// OvnFips returns a OvnFipInformer. -func (v *version) OvnFips() OvnFipInformer { - return &ovnFipInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// OvnSnatRules returns a OvnSnatRuleInformer. -func (v *version) OvnSnatRules() OvnSnatRuleInformer { - return &ovnSnatRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ProviderNetworks returns a ProviderNetworkInformer. -func (v *version) ProviderNetworks() ProviderNetworkInformer { - return &providerNetworkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// SecurityGroups returns a SecurityGroupInformer. -func (v *version) SecurityGroups() SecurityGroupInformer { - return &securityGroupInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Subnets returns a SubnetInformer. -func (v *version) Subnets() SubnetInformer { - return &subnetInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// SwitchLBRules returns a SwitchLBRuleInformer. -func (v *version) SwitchLBRules() SwitchLBRuleInformer { - return &switchLBRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Vips returns a VipInformer. -func (v *version) Vips() VipInformer { - return &vipInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Vlans returns a VlanInformer. -func (v *version) Vlans() VlanInformer { - return &vlanInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Vpcs returns a VpcInformer. -func (v *version) Vpcs() VpcInformer { - return &vpcInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// VpcDnses returns a VpcDnsInformer. -func (v *version) VpcDnses() VpcDnsInformer { - return &vpcDnsInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// VpcNatGateways returns a VpcNatGatewayInformer. -func (v *version) VpcNatGateways() VpcNatGatewayInformer { - return &vpcNatGatewayInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/ip.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/ip.go deleted file mode 100644 index 37743e1390e..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/ip.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IPInformer provides access to a shared informer and lister for -// IPs. -type IPInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IPLister -} - -type iPInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIPInformer constructs a new informer for IP type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIPInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIPInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIPInformer constructs a new informer for IP type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIPInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IPs().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IPs().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.IP{}, - resyncPeriod, - indexers, - ) -} - -func (f *iPInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIPInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *iPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.IP{}, f.defaultInformer) -} - -func (f *iPInformer) Lister() v1.IPLister { - return v1.NewIPLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesdnatrule.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesdnatrule.go deleted file mode 100644 index 48bdd4e5851..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesdnatrule.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IptablesDnatRuleInformer provides access to a shared informer and lister for -// IptablesDnatRules. -type IptablesDnatRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IptablesDnatRuleLister -} - -type iptablesDnatRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIptablesDnatRuleInformer constructs a new informer for IptablesDnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIptablesDnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIptablesDnatRuleInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIptablesDnatRuleInformer constructs a new informer for IptablesDnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIptablesDnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesDnatRules().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesDnatRules().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.IptablesDnatRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *iptablesDnatRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIptablesDnatRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *iptablesDnatRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.IptablesDnatRule{}, f.defaultInformer) -} - -func (f *iptablesDnatRuleInformer) Lister() v1.IptablesDnatRuleLister { - return v1.NewIptablesDnatRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptableseip.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/iptableseip.go deleted file mode 100644 index a624ddee327..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptableseip.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IptablesEIPInformer provides access to a shared informer and lister for -// IptablesEIPs. -type IptablesEIPInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IptablesEIPLister -} - -type iptablesEIPInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIptablesEIPInformer constructs a new informer for IptablesEIP type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIptablesEIPInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIptablesEIPInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIptablesEIPInformer constructs a new informer for IptablesEIP type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIptablesEIPInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesEIPs().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesEIPs().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.IptablesEIP{}, - resyncPeriod, - indexers, - ) -} - -func (f *iptablesEIPInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIptablesEIPInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *iptablesEIPInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.IptablesEIP{}, f.defaultInformer) -} - -func (f *iptablesEIPInformer) Lister() v1.IptablesEIPLister { - return v1.NewIptablesEIPLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesfiprule.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesfiprule.go deleted file mode 100644 index 44a547fb274..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablesfiprule.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IptablesFIPRuleInformer provides access to a shared informer and lister for -// IptablesFIPRules. -type IptablesFIPRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IptablesFIPRuleLister -} - -type iptablesFIPRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIptablesFIPRuleInformer constructs a new informer for IptablesFIPRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIptablesFIPRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIptablesFIPRuleInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIptablesFIPRuleInformer constructs a new informer for IptablesFIPRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIptablesFIPRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesFIPRules().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesFIPRules().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.IptablesFIPRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *iptablesFIPRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIptablesFIPRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *iptablesFIPRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.IptablesFIPRule{}, f.defaultInformer) -} - -func (f *iptablesFIPRuleInformer) Lister() v1.IptablesFIPRuleLister { - return v1.NewIptablesFIPRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablessnatrule.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablessnatrule.go deleted file mode 100644 index 8ae4adb8b7d..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/iptablessnatrule.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IptablesSnatRuleInformer provides access to a shared informer and lister for -// IptablesSnatRules. -type IptablesSnatRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.IptablesSnatRuleLister -} - -type iptablesSnatRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIptablesSnatRuleInformer constructs a new informer for IptablesSnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIptablesSnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredIptablesSnatRuleInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIptablesSnatRuleInformer constructs a new informer for IptablesSnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIptablesSnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesSnatRules().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().IptablesSnatRules().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.IptablesSnatRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *iptablesSnatRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredIptablesSnatRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *iptablesSnatRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.IptablesSnatRule{}, f.defaultInformer) -} - -func (f *iptablesSnatRuleInformer) Lister() v1.IptablesSnatRuleLister { - return v1.NewIptablesSnatRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovneip.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/ovneip.go deleted file mode 100644 index 89d5353e2de..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovneip.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// OvnEipInformer provides access to a shared informer and lister for -// OvnEips. -type OvnEipInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.OvnEipLister -} - -type ovnEipInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewOvnEipInformer constructs a new informer for OvnEip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOvnEipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredOvnEipInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredOvnEipInformer constructs a new informer for OvnEip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredOvnEipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnEips().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnEips().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.OvnEip{}, - resyncPeriod, - indexers, - ) -} - -func (f *ovnEipInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredOvnEipInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *ovnEipInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.OvnEip{}, f.defaultInformer) -} - -func (f *ovnEipInformer) Lister() v1.OvnEipLister { - return v1.NewOvnEipLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnfip.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnfip.go deleted file mode 100644 index 8d582d92862..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnfip.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// OvnFipInformer provides access to a shared informer and lister for -// OvnFips. -type OvnFipInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.OvnFipLister -} - -type ovnFipInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewOvnFipInformer constructs a new informer for OvnFip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOvnFipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredOvnFipInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredOvnFipInformer constructs a new informer for OvnFip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredOvnFipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnFips().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnFips().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.OvnFip{}, - resyncPeriod, - indexers, - ) -} - -func (f *ovnFipInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredOvnFipInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *ovnFipInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.OvnFip{}, f.defaultInformer) -} - -func (f *ovnFipInformer) Lister() v1.OvnFipLister { - return v1.NewOvnFipLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnsnatrule.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnsnatrule.go deleted file mode 100644 index 676db376b8c..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/ovnsnatrule.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// OvnSnatRuleInformer provides access to a shared informer and lister for -// OvnSnatRules. -type OvnSnatRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.OvnSnatRuleLister -} - -type ovnSnatRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewOvnSnatRuleInformer constructs a new informer for OvnSnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOvnSnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredOvnSnatRuleInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredOvnSnatRuleInformer constructs a new informer for OvnSnatRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredOvnSnatRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnSnatRules().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().OvnSnatRules().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.OvnSnatRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *ovnSnatRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredOvnSnatRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *ovnSnatRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.OvnSnatRule{}, f.defaultInformer) -} - -func (f *ovnSnatRuleInformer) Lister() v1.OvnSnatRuleLister { - return v1.NewOvnSnatRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/providernetwork.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/providernetwork.go deleted file mode 100644 index 2a6d8bfdcd5..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/providernetwork.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ProviderNetworkInformer provides access to a shared informer and lister for -// ProviderNetworks. -type ProviderNetworkInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ProviderNetworkLister -} - -type providerNetworkInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewProviderNetworkInformer constructs a new informer for ProviderNetwork type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewProviderNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredProviderNetworkInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredProviderNetworkInformer constructs a new informer for ProviderNetwork type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredProviderNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().ProviderNetworks().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().ProviderNetworks().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.ProviderNetwork{}, - resyncPeriod, - indexers, - ) -} - -func (f *providerNetworkInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredProviderNetworkInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *providerNetworkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.ProviderNetwork{}, f.defaultInformer) -} - -func (f *providerNetworkInformer) Lister() v1.ProviderNetworkLister { - return v1.NewProviderNetworkLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/securitygroup.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/securitygroup.go deleted file mode 100644 index fc108011aa5..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/securitygroup.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// SecurityGroupInformer provides access to a shared informer and lister for -// SecurityGroups. -type SecurityGroupInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SecurityGroupLister -} - -type securityGroupInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewSecurityGroupInformer constructs a new informer for SecurityGroup type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSecurityGroupInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSecurityGroupInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredSecurityGroupInformer constructs a new informer for SecurityGroup type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSecurityGroupInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().SecurityGroups().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().SecurityGroups().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.SecurityGroup{}, - resyncPeriod, - indexers, - ) -} - -func (f *securityGroupInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSecurityGroupInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *securityGroupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.SecurityGroup{}, f.defaultInformer) -} - -func (f *securityGroupInformer) Lister() v1.SecurityGroupLister { - return v1.NewSecurityGroupLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/subnet.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/subnet.go deleted file mode 100644 index 8a185ef0d55..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/subnet.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// SubnetInformer provides access to a shared informer and lister for -// Subnets. -type SubnetInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SubnetLister -} - -type subnetInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewSubnetInformer constructs a new informer for Subnet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSubnetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSubnetInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredSubnetInformer constructs a new informer for Subnet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSubnetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Subnets().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Subnets().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.Subnet{}, - resyncPeriod, - indexers, - ) -} - -func (f *subnetInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSubnetInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *subnetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.Subnet{}, f.defaultInformer) -} - -func (f *subnetInformer) Lister() v1.SubnetLister { - return v1.NewSubnetLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/switchlbrule.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/switchlbrule.go deleted file mode 100644 index 5f2794bb246..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/switchlbrule.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// SwitchLBRuleInformer provides access to a shared informer and lister for -// SwitchLBRules. -type SwitchLBRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SwitchLBRuleLister -} - -type switchLBRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewSwitchLBRuleInformer constructs a new informer for SwitchLBRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSwitchLBRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSwitchLBRuleInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredSwitchLBRuleInformer constructs a new informer for SwitchLBRule type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSwitchLBRuleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().SwitchLBRules().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().SwitchLBRules().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.SwitchLBRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *switchLBRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSwitchLBRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *switchLBRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.SwitchLBRule{}, f.defaultInformer) -} - -func (f *switchLBRuleInformer) Lister() v1.SwitchLBRuleLister { - return v1.NewSwitchLBRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/vip.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/vip.go deleted file mode 100644 index 30932f68f31..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/vip.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// VipInformer provides access to a shared informer and lister for -// Vips. -type VipInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.VipLister -} - -type vipInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewVipInformer constructs a new informer for Vip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewVipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredVipInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredVipInformer constructs a new informer for Vip type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredVipInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vips().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vips().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.Vip{}, - resyncPeriod, - indexers, - ) -} - -func (f *vipInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredVipInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *vipInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.Vip{}, f.defaultInformer) -} - -func (f *vipInformer) Lister() v1.VipLister { - return v1.NewVipLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/vlan.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/vlan.go deleted file mode 100644 index 498bfa28f88..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/vlan.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// VlanInformer provides access to a shared informer and lister for -// Vlans. -type VlanInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.VlanLister -} - -type vlanInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewVlanInformer constructs a new informer for Vlan type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewVlanInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredVlanInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredVlanInformer constructs a new informer for Vlan type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredVlanInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vlans().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vlans().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.Vlan{}, - resyncPeriod, - indexers, - ) -} - -func (f *vlanInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredVlanInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *vlanInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.Vlan{}, f.defaultInformer) -} - -func (f *vlanInformer) Lister() v1.VlanLister { - return v1.NewVlanLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpc.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/vpc.go deleted file mode 100644 index 029578d4e7c..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpc.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// VpcInformer provides access to a shared informer and lister for -// Vpcs. -type VpcInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.VpcLister -} - -type vpcInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewVpcInformer constructs a new informer for Vpc type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewVpcInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredVpcInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredVpcInformer constructs a new informer for Vpc type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredVpcInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vpcs().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().Vpcs().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.Vpc{}, - resyncPeriod, - indexers, - ) -} - -func (f *vpcInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredVpcInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *vpcInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.Vpc{}, f.defaultInformer) -} - -func (f *vpcInformer) Lister() v1.VpcLister { - return v1.NewVpcLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcdns.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcdns.go deleted file mode 100644 index 57ec5af21e5..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcdns.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// VpcDnsInformer provides access to a shared informer and lister for -// VpcDnses. -type VpcDnsInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.VpcDnsLister -} - -type vpcDnsInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewVpcDnsInformer constructs a new informer for VpcDns type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewVpcDnsInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredVpcDnsInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredVpcDnsInformer constructs a new informer for VpcDns type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredVpcDnsInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().VpcDnses().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().VpcDnses().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.VpcDns{}, - resyncPeriod, - indexers, - ) -} - -func (f *vpcDnsInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredVpcDnsInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *vpcDnsInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.VpcDns{}, f.defaultInformer) -} - -func (f *vpcDnsInformer) Lister() v1.VpcDnsLister { - return v1.NewVpcDnsLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcnatgateway.go b/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcnatgateway.go deleted file mode 100644 index 2c9a1639c15..00000000000 --- a/pkg/client/listers/informers/externalversions/kubeovn/v1/vpcnatgateway.go +++ /dev/null @@ -1,89 +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 informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - versioned "github.com/kubeovn/kube-ovn/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeovn/kube-ovn/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeovn/kube-ovn/pkg/client/listers/kubeovn/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// VpcNatGatewayInformer provides access to a shared informer and lister for -// VpcNatGateways. -type VpcNatGatewayInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.VpcNatGatewayLister -} - -type vpcNatGatewayInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewVpcNatGatewayInformer constructs a new informer for VpcNatGateway type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewVpcNatGatewayInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredVpcNatGatewayInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredVpcNatGatewayInformer constructs a new informer for VpcNatGateway type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredVpcNatGatewayInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().VpcNatGateways().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeovnV1().VpcNatGateways().Watch(context.TODO(), options) - }, - }, - &kubeovnv1.VpcNatGateway{}, - resyncPeriod, - indexers, - ) -} - -func (f *vpcNatGatewayInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredVpcNatGatewayInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *vpcNatGatewayInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubeovnv1.VpcNatGateway{}, f.defaultInformer) -} - -func (f *vpcNatGatewayInformer) Lister() v1.VpcNatGatewayLister { - return v1.NewVpcNatGatewayLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/listers/kubeovn/v1/expansion_generated.go b/pkg/client/listers/listers/kubeovn/v1/expansion_generated.go deleted file mode 100644 index 2926ee5143d..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/expansion_generated.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 lister-gen. DO NOT EDIT. - -package v1 - -// HtbQosListerExpansion allows custom methods to be added to -// HtbQosLister. -type HtbQosListerExpansion interface{} - -// IPListerExpansion allows custom methods to be added to -// IPLister. -type IPListerExpansion interface{} - -// IptablesDnatRuleListerExpansion allows custom methods to be added to -// IptablesDnatRuleLister. -type IptablesDnatRuleListerExpansion interface{} - -// IptablesEIPListerExpansion allows custom methods to be added to -// IptablesEIPLister. -type IptablesEIPListerExpansion interface{} - -// IptablesFIPRuleListerExpansion allows custom methods to be added to -// IptablesFIPRuleLister. -type IptablesFIPRuleListerExpansion interface{} - -// IptablesSnatRuleListerExpansion allows custom methods to be added to -// IptablesSnatRuleLister. -type IptablesSnatRuleListerExpansion interface{} - -// OvnEipListerExpansion allows custom methods to be added to -// OvnEipLister. -type OvnEipListerExpansion interface{} - -// OvnFipListerExpansion allows custom methods to be added to -// OvnFipLister. -type OvnFipListerExpansion interface{} - -// OvnSnatRuleListerExpansion allows custom methods to be added to -// OvnSnatRuleLister. -type OvnSnatRuleListerExpansion interface{} - -// ProviderNetworkListerExpansion allows custom methods to be added to -// ProviderNetworkLister. -type ProviderNetworkListerExpansion interface{} - -// SecurityGroupListerExpansion allows custom methods to be added to -// SecurityGroupLister. -type SecurityGroupListerExpansion interface{} - -// SubnetListerExpansion allows custom methods to be added to -// SubnetLister. -type SubnetListerExpansion interface{} - -// SwitchLBRuleListerExpansion allows custom methods to be added to -// SwitchLBRuleLister. -type SwitchLBRuleListerExpansion interface{} - -// VipListerExpansion allows custom methods to be added to -// VipLister. -type VipListerExpansion interface{} - -// VlanListerExpansion allows custom methods to be added to -// VlanLister. -type VlanListerExpansion interface{} - -// VpcListerExpansion allows custom methods to be added to -// VpcLister. -type VpcListerExpansion interface{} - -// VpcDnsListerExpansion allows custom methods to be added to -// VpcDnsLister. -type VpcDnsListerExpansion interface{} - -// VpcNatGatewayListerExpansion allows custom methods to be added to -// VpcNatGatewayLister. -type VpcNatGatewayListerExpansion interface{} diff --git a/pkg/client/listers/listers/kubeovn/v1/htbqos.go b/pkg/client/listers/listers/kubeovn/v1/htbqos.go deleted file mode 100644 index c907b54cefc..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/htbqos.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// HtbQosLister helps list HtbQoses. -type HtbQosLister interface { - // List lists all HtbQoses in the indexer. - List(selector labels.Selector) (ret []*v1.HtbQos, err error) - // Get retrieves the HtbQos from the index for a given name. - Get(name string) (*v1.HtbQos, error) - HtbQosListerExpansion -} - -// htbQosLister implements the HtbQosLister interface. -type htbQosLister struct { - indexer cache.Indexer -} - -// NewHtbQosLister returns a new HtbQosLister. -func NewHtbQosLister(indexer cache.Indexer) HtbQosLister { - return &htbQosLister{indexer: indexer} -} - -// List lists all HtbQoses in the indexer. -func (s *htbQosLister) List(selector labels.Selector) (ret []*v1.HtbQos, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.HtbQos)) - }) - return ret, err -} - -// Get retrieves the HtbQos from the index for a given name. -func (s *htbQosLister) Get(name string) (*v1.HtbQos, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("htbqos"), name) - } - return obj.(*v1.HtbQos), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/ip.go b/pkg/client/listers/listers/kubeovn/v1/ip.go deleted file mode 100644 index 84a45174b67..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/ip.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IPLister helps list IPs. -type IPLister interface { - // List lists all IPs in the indexer. - List(selector labels.Selector) (ret []*v1.IP, err error) - // Get retrieves the IP from the index for a given name. - Get(name string) (*v1.IP, error) - IPListerExpansion -} - -// iPLister implements the IPLister interface. -type iPLister struct { - indexer cache.Indexer -} - -// NewIPLister returns a new IPLister. -func NewIPLister(indexer cache.Indexer) IPLister { - return &iPLister{indexer: indexer} -} - -// List lists all IPs in the indexer. -func (s *iPLister) List(selector labels.Selector) (ret []*v1.IP, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IP)) - }) - return ret, err -} - -// Get retrieves the IP from the index for a given name. -func (s *iPLister) Get(name string) (*v1.IP, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("ip"), name) - } - return obj.(*v1.IP), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/iptablesdnatrule.go b/pkg/client/listers/listers/kubeovn/v1/iptablesdnatrule.go deleted file mode 100644 index bb0ebe4a7d6..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/iptablesdnatrule.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IptablesDnatRuleLister helps list IptablesDnatRules. -type IptablesDnatRuleLister interface { - // List lists all IptablesDnatRules in the indexer. - List(selector labels.Selector) (ret []*v1.IptablesDnatRule, err error) - // Get retrieves the IptablesDnatRule from the index for a given name. - Get(name string) (*v1.IptablesDnatRule, error) - IptablesDnatRuleListerExpansion -} - -// iptablesDnatRuleLister implements the IptablesDnatRuleLister interface. -type iptablesDnatRuleLister struct { - indexer cache.Indexer -} - -// NewIptablesDnatRuleLister returns a new IptablesDnatRuleLister. -func NewIptablesDnatRuleLister(indexer cache.Indexer) IptablesDnatRuleLister { - return &iptablesDnatRuleLister{indexer: indexer} -} - -// List lists all IptablesDnatRules in the indexer. -func (s *iptablesDnatRuleLister) List(selector labels.Selector) (ret []*v1.IptablesDnatRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IptablesDnatRule)) - }) - return ret, err -} - -// Get retrieves the IptablesDnatRule from the index for a given name. -func (s *iptablesDnatRuleLister) Get(name string) (*v1.IptablesDnatRule, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("iptablesdnatrule"), name) - } - return obj.(*v1.IptablesDnatRule), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/iptableseip.go b/pkg/client/listers/listers/kubeovn/v1/iptableseip.go deleted file mode 100644 index 9574d92cebd..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/iptableseip.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IptablesEIPLister helps list IptablesEIPs. -type IptablesEIPLister interface { - // List lists all IptablesEIPs in the indexer. - List(selector labels.Selector) (ret []*v1.IptablesEIP, err error) - // Get retrieves the IptablesEIP from the index for a given name. - Get(name string) (*v1.IptablesEIP, error) - IptablesEIPListerExpansion -} - -// iptablesEIPLister implements the IptablesEIPLister interface. -type iptablesEIPLister struct { - indexer cache.Indexer -} - -// NewIptablesEIPLister returns a new IptablesEIPLister. -func NewIptablesEIPLister(indexer cache.Indexer) IptablesEIPLister { - return &iptablesEIPLister{indexer: indexer} -} - -// List lists all IptablesEIPs in the indexer. -func (s *iptablesEIPLister) List(selector labels.Selector) (ret []*v1.IptablesEIP, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IptablesEIP)) - }) - return ret, err -} - -// Get retrieves the IptablesEIP from the index for a given name. -func (s *iptablesEIPLister) Get(name string) (*v1.IptablesEIP, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("iptableseip"), name) - } - return obj.(*v1.IptablesEIP), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/iptablesfiprule.go b/pkg/client/listers/listers/kubeovn/v1/iptablesfiprule.go deleted file mode 100644 index 056b71eca35..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/iptablesfiprule.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IptablesFIPRuleLister helps list IptablesFIPRules. -type IptablesFIPRuleLister interface { - // List lists all IptablesFIPRules in the indexer. - List(selector labels.Selector) (ret []*v1.IptablesFIPRule, err error) - // Get retrieves the IptablesFIPRule from the index for a given name. - Get(name string) (*v1.IptablesFIPRule, error) - IptablesFIPRuleListerExpansion -} - -// iptablesFIPRuleLister implements the IptablesFIPRuleLister interface. -type iptablesFIPRuleLister struct { - indexer cache.Indexer -} - -// NewIptablesFIPRuleLister returns a new IptablesFIPRuleLister. -func NewIptablesFIPRuleLister(indexer cache.Indexer) IptablesFIPRuleLister { - return &iptablesFIPRuleLister{indexer: indexer} -} - -// List lists all IptablesFIPRules in the indexer. -func (s *iptablesFIPRuleLister) List(selector labels.Selector) (ret []*v1.IptablesFIPRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IptablesFIPRule)) - }) - return ret, err -} - -// Get retrieves the IptablesFIPRule from the index for a given name. -func (s *iptablesFIPRuleLister) Get(name string) (*v1.IptablesFIPRule, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("iptablesfiprule"), name) - } - return obj.(*v1.IptablesFIPRule), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/iptablessnatrule.go b/pkg/client/listers/listers/kubeovn/v1/iptablessnatrule.go deleted file mode 100644 index 7e5524a35fc..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/iptablessnatrule.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IptablesSnatRuleLister helps list IptablesSnatRules. -type IptablesSnatRuleLister interface { - // List lists all IptablesSnatRules in the indexer. - List(selector labels.Selector) (ret []*v1.IptablesSnatRule, err error) - // Get retrieves the IptablesSnatRule from the index for a given name. - Get(name string) (*v1.IptablesSnatRule, error) - IptablesSnatRuleListerExpansion -} - -// iptablesSnatRuleLister implements the IptablesSnatRuleLister interface. -type iptablesSnatRuleLister struct { - indexer cache.Indexer -} - -// NewIptablesSnatRuleLister returns a new IptablesSnatRuleLister. -func NewIptablesSnatRuleLister(indexer cache.Indexer) IptablesSnatRuleLister { - return &iptablesSnatRuleLister{indexer: indexer} -} - -// List lists all IptablesSnatRules in the indexer. -func (s *iptablesSnatRuleLister) List(selector labels.Selector) (ret []*v1.IptablesSnatRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.IptablesSnatRule)) - }) - return ret, err -} - -// Get retrieves the IptablesSnatRule from the index for a given name. -func (s *iptablesSnatRuleLister) Get(name string) (*v1.IptablesSnatRule, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("iptablessnatrule"), name) - } - return obj.(*v1.IptablesSnatRule), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/ovneip.go b/pkg/client/listers/listers/kubeovn/v1/ovneip.go deleted file mode 100644 index 6983c0f010a..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/ovneip.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OvnEipLister helps list OvnEips. -type OvnEipLister interface { - // List lists all OvnEips in the indexer. - List(selector labels.Selector) (ret []*v1.OvnEip, err error) - // Get retrieves the OvnEip from the index for a given name. - Get(name string) (*v1.OvnEip, error) - OvnEipListerExpansion -} - -// ovnEipLister implements the OvnEipLister interface. -type ovnEipLister struct { - indexer cache.Indexer -} - -// NewOvnEipLister returns a new OvnEipLister. -func NewOvnEipLister(indexer cache.Indexer) OvnEipLister { - return &ovnEipLister{indexer: indexer} -} - -// List lists all OvnEips in the indexer. -func (s *ovnEipLister) List(selector labels.Selector) (ret []*v1.OvnEip, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.OvnEip)) - }) - return ret, err -} - -// Get retrieves the OvnEip from the index for a given name. -func (s *ovnEipLister) Get(name string) (*v1.OvnEip, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("ovneip"), name) - } - return obj.(*v1.OvnEip), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/ovnfip.go b/pkg/client/listers/listers/kubeovn/v1/ovnfip.go deleted file mode 100644 index fdd3fe0aa4f..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/ovnfip.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OvnFipLister helps list OvnFips. -type OvnFipLister interface { - // List lists all OvnFips in the indexer. - List(selector labels.Selector) (ret []*v1.OvnFip, err error) - // Get retrieves the OvnFip from the index for a given name. - Get(name string) (*v1.OvnFip, error) - OvnFipListerExpansion -} - -// ovnFipLister implements the OvnFipLister interface. -type ovnFipLister struct { - indexer cache.Indexer -} - -// NewOvnFipLister returns a new OvnFipLister. -func NewOvnFipLister(indexer cache.Indexer) OvnFipLister { - return &ovnFipLister{indexer: indexer} -} - -// List lists all OvnFips in the indexer. -func (s *ovnFipLister) List(selector labels.Selector) (ret []*v1.OvnFip, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.OvnFip)) - }) - return ret, err -} - -// Get retrieves the OvnFip from the index for a given name. -func (s *ovnFipLister) Get(name string) (*v1.OvnFip, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("ovnfip"), name) - } - return obj.(*v1.OvnFip), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/ovnsnatrule.go b/pkg/client/listers/listers/kubeovn/v1/ovnsnatrule.go deleted file mode 100644 index ae3ce8488f7..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/ovnsnatrule.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OvnSnatRuleLister helps list OvnSnatRules. -type OvnSnatRuleLister interface { - // List lists all OvnSnatRules in the indexer. - List(selector labels.Selector) (ret []*v1.OvnSnatRule, err error) - // Get retrieves the OvnSnatRule from the index for a given name. - Get(name string) (*v1.OvnSnatRule, error) - OvnSnatRuleListerExpansion -} - -// ovnSnatRuleLister implements the OvnSnatRuleLister interface. -type ovnSnatRuleLister struct { - indexer cache.Indexer -} - -// NewOvnSnatRuleLister returns a new OvnSnatRuleLister. -func NewOvnSnatRuleLister(indexer cache.Indexer) OvnSnatRuleLister { - return &ovnSnatRuleLister{indexer: indexer} -} - -// List lists all OvnSnatRules in the indexer. -func (s *ovnSnatRuleLister) List(selector labels.Selector) (ret []*v1.OvnSnatRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.OvnSnatRule)) - }) - return ret, err -} - -// Get retrieves the OvnSnatRule from the index for a given name. -func (s *ovnSnatRuleLister) Get(name string) (*v1.OvnSnatRule, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("ovnsnatrule"), name) - } - return obj.(*v1.OvnSnatRule), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/providernetwork.go b/pkg/client/listers/listers/kubeovn/v1/providernetwork.go deleted file mode 100644 index 463f960470d..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/providernetwork.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ProviderNetworkLister helps list ProviderNetworks. -type ProviderNetworkLister interface { - // List lists all ProviderNetworks in the indexer. - List(selector labels.Selector) (ret []*v1.ProviderNetwork, err error) - // Get retrieves the ProviderNetwork from the index for a given name. - Get(name string) (*v1.ProviderNetwork, error) - ProviderNetworkListerExpansion -} - -// providerNetworkLister implements the ProviderNetworkLister interface. -type providerNetworkLister struct { - indexer cache.Indexer -} - -// NewProviderNetworkLister returns a new ProviderNetworkLister. -func NewProviderNetworkLister(indexer cache.Indexer) ProviderNetworkLister { - return &providerNetworkLister{indexer: indexer} -} - -// List lists all ProviderNetworks in the indexer. -func (s *providerNetworkLister) List(selector labels.Selector) (ret []*v1.ProviderNetwork, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ProviderNetwork)) - }) - return ret, err -} - -// Get retrieves the ProviderNetwork from the index for a given name. -func (s *providerNetworkLister) Get(name string) (*v1.ProviderNetwork, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("providernetwork"), name) - } - return obj.(*v1.ProviderNetwork), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/securitygroup.go b/pkg/client/listers/listers/kubeovn/v1/securitygroup.go deleted file mode 100644 index b4c8ace93a1..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/securitygroup.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SecurityGroupLister helps list SecurityGroups. -type SecurityGroupLister interface { - // List lists all SecurityGroups in the indexer. - List(selector labels.Selector) (ret []*v1.SecurityGroup, err error) - // Get retrieves the SecurityGroup from the index for a given name. - Get(name string) (*v1.SecurityGroup, error) - SecurityGroupListerExpansion -} - -// securityGroupLister implements the SecurityGroupLister interface. -type securityGroupLister struct { - indexer cache.Indexer -} - -// NewSecurityGroupLister returns a new SecurityGroupLister. -func NewSecurityGroupLister(indexer cache.Indexer) SecurityGroupLister { - return &securityGroupLister{indexer: indexer} -} - -// List lists all SecurityGroups in the indexer. -func (s *securityGroupLister) List(selector labels.Selector) (ret []*v1.SecurityGroup, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SecurityGroup)) - }) - return ret, err -} - -// Get retrieves the SecurityGroup from the index for a given name. -func (s *securityGroupLister) Get(name string) (*v1.SecurityGroup, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("securitygroup"), name) - } - return obj.(*v1.SecurityGroup), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/subnet.go b/pkg/client/listers/listers/kubeovn/v1/subnet.go deleted file mode 100644 index 01312c23e3a..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/subnet.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SubnetLister helps list Subnets. -type SubnetLister interface { - // List lists all Subnets in the indexer. - List(selector labels.Selector) (ret []*v1.Subnet, err error) - // Get retrieves the Subnet from the index for a given name. - Get(name string) (*v1.Subnet, error) - SubnetListerExpansion -} - -// subnetLister implements the SubnetLister interface. -type subnetLister struct { - indexer cache.Indexer -} - -// NewSubnetLister returns a new SubnetLister. -func NewSubnetLister(indexer cache.Indexer) SubnetLister { - return &subnetLister{indexer: indexer} -} - -// List lists all Subnets in the indexer. -func (s *subnetLister) List(selector labels.Selector) (ret []*v1.Subnet, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Subnet)) - }) - return ret, err -} - -// Get retrieves the Subnet from the index for a given name. -func (s *subnetLister) Get(name string) (*v1.Subnet, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("subnet"), name) - } - return obj.(*v1.Subnet), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/switchlbrule.go b/pkg/client/listers/listers/kubeovn/v1/switchlbrule.go deleted file mode 100644 index 4061f043666..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/switchlbrule.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SwitchLBRuleLister helps list SwitchLBRules. -type SwitchLBRuleLister interface { - // List lists all SwitchLBRules in the indexer. - List(selector labels.Selector) (ret []*v1.SwitchLBRule, err error) - // Get retrieves the SwitchLBRule from the index for a given name. - Get(name string) (*v1.SwitchLBRule, error) - SwitchLBRuleListerExpansion -} - -// switchLBRuleLister implements the SwitchLBRuleLister interface. -type switchLBRuleLister struct { - indexer cache.Indexer -} - -// NewSwitchLBRuleLister returns a new SwitchLBRuleLister. -func NewSwitchLBRuleLister(indexer cache.Indexer) SwitchLBRuleLister { - return &switchLBRuleLister{indexer: indexer} -} - -// List lists all SwitchLBRules in the indexer. -func (s *switchLBRuleLister) List(selector labels.Selector) (ret []*v1.SwitchLBRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SwitchLBRule)) - }) - return ret, err -} - -// Get retrieves the SwitchLBRule from the index for a given name. -func (s *switchLBRuleLister) Get(name string) (*v1.SwitchLBRule, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("switchlbrule"), name) - } - return obj.(*v1.SwitchLBRule), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/vip.go b/pkg/client/listers/listers/kubeovn/v1/vip.go deleted file mode 100644 index 3aa7151be03..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/vip.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// VipLister helps list Vips. -type VipLister interface { - // List lists all Vips in the indexer. - List(selector labels.Selector) (ret []*v1.Vip, err error) - // Get retrieves the Vip from the index for a given name. - Get(name string) (*v1.Vip, error) - VipListerExpansion -} - -// vipLister implements the VipLister interface. -type vipLister struct { - indexer cache.Indexer -} - -// NewVipLister returns a new VipLister. -func NewVipLister(indexer cache.Indexer) VipLister { - return &vipLister{indexer: indexer} -} - -// List lists all Vips in the indexer. -func (s *vipLister) List(selector labels.Selector) (ret []*v1.Vip, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Vip)) - }) - return ret, err -} - -// Get retrieves the Vip from the index for a given name. -func (s *vipLister) Get(name string) (*v1.Vip, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("vip"), name) - } - return obj.(*v1.Vip), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/vlan.go b/pkg/client/listers/listers/kubeovn/v1/vlan.go deleted file mode 100644 index 74fffd6a101..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/vlan.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// VlanLister helps list Vlans. -type VlanLister interface { - // List lists all Vlans in the indexer. - List(selector labels.Selector) (ret []*v1.Vlan, err error) - // Get retrieves the Vlan from the index for a given name. - Get(name string) (*v1.Vlan, error) - VlanListerExpansion -} - -// vlanLister implements the VlanLister interface. -type vlanLister struct { - indexer cache.Indexer -} - -// NewVlanLister returns a new VlanLister. -func NewVlanLister(indexer cache.Indexer) VlanLister { - return &vlanLister{indexer: indexer} -} - -// List lists all Vlans in the indexer. -func (s *vlanLister) List(selector labels.Selector) (ret []*v1.Vlan, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Vlan)) - }) - return ret, err -} - -// Get retrieves the Vlan from the index for a given name. -func (s *vlanLister) Get(name string) (*v1.Vlan, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("vlan"), name) - } - return obj.(*v1.Vlan), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/vpc.go b/pkg/client/listers/listers/kubeovn/v1/vpc.go deleted file mode 100644 index 522a99e775e..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/vpc.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// VpcLister helps list Vpcs. -type VpcLister interface { - // List lists all Vpcs in the indexer. - List(selector labels.Selector) (ret []*v1.Vpc, err error) - // Get retrieves the Vpc from the index for a given name. - Get(name string) (*v1.Vpc, error) - VpcListerExpansion -} - -// vpcLister implements the VpcLister interface. -type vpcLister struct { - indexer cache.Indexer -} - -// NewVpcLister returns a new VpcLister. -func NewVpcLister(indexer cache.Indexer) VpcLister { - return &vpcLister{indexer: indexer} -} - -// List lists all Vpcs in the indexer. -func (s *vpcLister) List(selector labels.Selector) (ret []*v1.Vpc, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Vpc)) - }) - return ret, err -} - -// Get retrieves the Vpc from the index for a given name. -func (s *vpcLister) Get(name string) (*v1.Vpc, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("vpc"), name) - } - return obj.(*v1.Vpc), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/vpcdns.go b/pkg/client/listers/listers/kubeovn/v1/vpcdns.go deleted file mode 100644 index 93e5f650bff..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/vpcdns.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// VpcDnsLister helps list VpcDnses. -type VpcDnsLister interface { - // List lists all VpcDnses in the indexer. - List(selector labels.Selector) (ret []*v1.VpcDns, err error) - // Get retrieves the VpcDns from the index for a given name. - Get(name string) (*v1.VpcDns, error) - VpcDnsListerExpansion -} - -// vpcDnsLister implements the VpcDnsLister interface. -type vpcDnsLister struct { - indexer cache.Indexer -} - -// NewVpcDnsLister returns a new VpcDnsLister. -func NewVpcDnsLister(indexer cache.Indexer) VpcDnsLister { - return &vpcDnsLister{indexer: indexer} -} - -// List lists all VpcDnses in the indexer. -func (s *vpcDnsLister) List(selector labels.Selector) (ret []*v1.VpcDns, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.VpcDns)) - }) - return ret, err -} - -// Get retrieves the VpcDns from the index for a given name. -func (s *vpcDnsLister) Get(name string) (*v1.VpcDns, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("vpcdns"), name) - } - return obj.(*v1.VpcDns), nil -} diff --git a/pkg/client/listers/listers/kubeovn/v1/vpcnatgateway.go b/pkg/client/listers/listers/kubeovn/v1/vpcnatgateway.go deleted file mode 100644 index 2b2bcbc9654..00000000000 --- a/pkg/client/listers/listers/kubeovn/v1/vpcnatgateway.go +++ /dev/null @@ -1,65 +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 lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// VpcNatGatewayLister helps list VpcNatGateways. -type VpcNatGatewayLister interface { - // List lists all VpcNatGateways in the indexer. - List(selector labels.Selector) (ret []*v1.VpcNatGateway, err error) - // Get retrieves the VpcNatGateway from the index for a given name. - Get(name string) (*v1.VpcNatGateway, error) - VpcNatGatewayListerExpansion -} - -// vpcNatGatewayLister implements the VpcNatGatewayLister interface. -type vpcNatGatewayLister struct { - indexer cache.Indexer -} - -// NewVpcNatGatewayLister returns a new VpcNatGatewayLister. -func NewVpcNatGatewayLister(indexer cache.Indexer) VpcNatGatewayLister { - return &vpcNatGatewayLister{indexer: indexer} -} - -// List lists all VpcNatGateways in the indexer. -func (s *vpcNatGatewayLister) List(selector labels.Selector) (ret []*v1.VpcNatGateway, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.VpcNatGateway)) - }) - return ret, err -} - -// Get retrieves the VpcNatGateway from the index for a given name. -func (s *vpcNatGatewayLister) Get(name string) (*v1.VpcNatGateway, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("vpcnatgateway"), name) - } - return obj.(*v1.VpcNatGateway), nil -} diff --git a/yamls/kind.yaml.j2 b/yamls/kind.yaml.j2 index 7e7b6c21bcf..f90679571f3 100644 --- a/yamls/kind.yaml.j2 +++ b/yamls/kind.yaml.j2 @@ -1,5 +1,5 @@ {%- if k8s_version is not defined -%} - {%- set k8s_version = "v1.24.7" -%} + {%- set k8s_version = "v1.26.0" -%} {%- endif -%} {%- if kube_proxy_mode is not defined -%} {%- set kube_proxy_mode = "ipvs" -%} From 659a06d29aadfe3d36824844256d14dde60dfbc6 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Mon, 12 Dec 2022 10:36:59 +0800 Subject: [PATCH 2/2] fix lint --- cmd/controller/controller.go | 2 +- cmd/daemon/cniserver.go | 4 +- cmd/ovn_monitor/ovn_monitor.go | 2 +- cmd/pinger/pinger.go | 2 +- cmd/speaker/speaker.go | 2 +- pkg/controller/controller.go | 146 +++++++++++++++++++++----------- pkg/controller/election.go | 2 +- pkg/daemon/controller.go | 18 ++-- pkg/daemon/server.go | 5 +- pkg/util/pod_exec.go | 3 +- test/e2e/framework/framework.go | 2 +- 11 files changed, 122 insertions(+), 66 deletions(-) diff --git a/cmd/controller/controller.go b/cmd/controller/controller.go index adf5cd7c5d4..976cd8d344e 100644 --- a/cmd/controller/controller.go +++ b/cmd/controller/controller.go @@ -57,7 +57,7 @@ func CmdMain() { ReadHeaderTimeout: 3 * time.Second, Handler: mux, } - klog.Fatal(server.ListenAndServe()) + util.LogFatalAndExit(server.ListenAndServe(), "failed to listen and server on %s", server.Addr) }() ctl := controller.NewController(config) diff --git a/cmd/daemon/cniserver.go b/cmd/daemon/cniserver.go index 0b747fe9c88..0203e9d7a35 100644 --- a/cmd/daemon/cniserver.go +++ b/cmd/daemon/cniserver.go @@ -34,7 +34,7 @@ func CmdMain() { klog.Infof(versions.String()) if err := initForOS(); err != nil { - klog.Fatal(err) + util.LogFatalAndExit(err, "failed to do the OS initialization") } nicBridgeMappings, err := daemon.InitOVSBridges() @@ -102,7 +102,7 @@ func CmdMain() { ReadHeaderTimeout: 3 * time.Second, Handler: mux, } - klog.Fatal(server.ListenAndServe()) + util.LogFatalAndExit(server.ListenAndServe(), "failed to listen and serve on %s", server.Addr) } func mvCNIConf(configDir, configFile, confName string) error { diff --git a/cmd/ovn_monitor/ovn_monitor.go b/cmd/ovn_monitor/ovn_monitor.go index 9d0e9c0c068..b919f584d72 100644 --- a/cmd/ovn_monitor/ovn_monitor.go +++ b/cmd/ovn_monitor/ovn_monitor.go @@ -37,5 +37,5 @@ func CmdMain() { Addr: config.ListenAddress, ReadHeaderTimeout: 3 * time.Second, } - klog.Fatal(server.ListenAndServe()) + util.LogFatalAndExit(server.ListenAndServe(), "failed to listen and server on %s", config.ListenAddress) } diff --git a/cmd/pinger/pinger.go b/cmd/pinger/pinger.go index 72d591215a5..b43b183d784 100644 --- a/cmd/pinger/pinger.go +++ b/cmd/pinger/pinger.go @@ -33,7 +33,7 @@ func CmdMain() { Addr: fmt.Sprintf("0.0.0.0:%d", config.Port), ReadHeaderTimeout: 3 * time.Second, } - klog.Fatal(server.ListenAndServe()) + util.LogFatalAndExit(server.ListenAndServe(), "failed to listen and serve on %s", server.Addr) }() } e := pinger.NewExporter(config) diff --git a/cmd/speaker/speaker.go b/cmd/speaker/speaker.go index d61cb9e5f31..5114c32864b 100644 --- a/cmd/speaker/speaker.go +++ b/cmd/speaker/speaker.go @@ -35,7 +35,7 @@ func CmdMain() { Addr: fmt.Sprintf("0.0.0.0:%d", config.PprofPort), ReadHeaderTimeout: 3 * time.Second, } - klog.Fatal(server.ListenAndServe()) + util.LogFatalAndExit(server.ListenAndServe(), "failed to listen and serve on %s", server.Addr) }() ctl.Run(stopCh) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index a0e1be4223e..757772565f7 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -391,49 +391,63 @@ func NewController(config *Configuration) *Controller { var err error if controller.ovnClient, err = ovs.NewOvnClient(config.OvnNbAddr, config.OvnTimeout); err != nil { - klog.Fatal(err) + util.LogFatalAndExit(err, "failed to create ovn client") } - podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddPod, DeleteFunc: controller.enqueueDeletePod, UpdateFunc: controller.enqueueUpdatePod, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add pod event handler") + } - namespaceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = namespaceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddNamespace, UpdateFunc: controller.enqueueUpdateNamespace, DeleteFunc: controller.enqueueDeleteNamespace, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add namespace event handler") + } - nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddNode, UpdateFunc: controller.enqueueUpdateNode, DeleteFunc: controller.enqueueDeleteNode, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add node event handler") + } - serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddService, DeleteFunc: controller.enqueueDeleteService, UpdateFunc: controller.enqueueUpdateService, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add service event handler") + } - endpointInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = endpointInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddEndpoint, UpdateFunc: controller.enqueueUpdateEndpoint, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add endpoint event handler") + } - vpcInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = vpcInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddVpc, UpdateFunc: controller.enqueueUpdateVpc, DeleteFunc: controller.enqueueDelVpc, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add vpc event handler") + } - vpcNatGatewayInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = vpcNatGatewayInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddVpcNatGw, UpdateFunc: controller.enqueueUpdateVpcNatGw, DeleteFunc: controller.enqueueDeleteVpcNatGw, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add vpc nat gateway event handler") + } if config.EnableLb { switchLBRuleInformer := kubeovnInformerFactory.Kubeovn().V1().SwitchLBRules() @@ -443,41 +457,51 @@ func NewController(config *Configuration) *Controller { controller.delSwitchLBRuleQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "delSwitchLBRule") controller.UpdateSwitchLBRuleQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "updateSwitchLBRule") - switchLBRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = switchLBRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddSwitchLBRule, UpdateFunc: controller.enqueueUpdateSwitchLBRule, DeleteFunc: controller.enqueueDeleteSwitchLBRule, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add switch lb rule event handler") + } vpcDnsInformer := kubeovnInformerFactory.Kubeovn().V1().VpcDnses() controller.vpcDnsLister = vpcDnsInformer.Lister() controller.vpcDnsSynced = vpcDnsInformer.Informer().HasSynced controller.addOrUpdateVpcDnsQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "AddOrUpdateVpcDns") controller.delVpcDnsQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "DeleteVpcDns") - vpcDnsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = vpcDnsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddVpcDns, UpdateFunc: controller.enqueueUpdateVpcDns, DeleteFunc: controller.enqueueDeleteVpcDns, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add vpc dns event handler") + } } - subnetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = subnetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddSubnet, UpdateFunc: controller.enqueueUpdateSubnet, DeleteFunc: controller.enqueueDeleteSubnet, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add subnet event handler") + } - ipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = ipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddOrDelIP, UpdateFunc: controller.enqueueUpdateIP, DeleteFunc: controller.enqueueAddOrDelIP, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add ips event handler") + } - vlanInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = vlanInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddVlan, DeleteFunc: controller.enqueueDelVlan, UpdateFunc: controller.enqueueUpdateVlan, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add vlan event handler") + } if config.EnableNP { npInformer := informerFactory.Networking().V1().NetworkPolicies() @@ -485,47 +509,61 @@ func NewController(config *Configuration) *Controller { controller.npsSynced = npInformer.Informer().HasSynced controller.updateNpQueue = workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "UpdateNp") controller.deleteNpQueue = workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DeleteNp") - npInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = npInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddNp, UpdateFunc: controller.enqueueUpdateNp, DeleteFunc: controller.enqueueDeleteNp, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add network policy event handler") + } } - sgInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = sgInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddSg, DeleteFunc: controller.enqueueDeleteSg, UpdateFunc: controller.enqueueUpdateSg, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add security group event handler") + } - virtualIpInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = virtualIpInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddVirtualIp, UpdateFunc: controller.enqueueUpdateVirtualIp, DeleteFunc: controller.enqueueDelVirtualIp, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add virtual ip event handler") + } - iptablesEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = iptablesEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddIptablesEip, UpdateFunc: controller.enqueueUpdateIptablesEip, DeleteFunc: controller.enqueueDelIptablesEip, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add iptables eip event handler") + } - iptablesFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = iptablesFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddIptablesFip, UpdateFunc: controller.enqueueUpdateIptablesFip, DeleteFunc: controller.enqueueDelIptablesFip, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add iptables fip event handler") + } - iptablesDnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = iptablesDnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddIptablesDnatRule, UpdateFunc: controller.enqueueUpdateIptablesDnatRule, DeleteFunc: controller.enqueueDelIptablesDnatRule, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add iptables dnat event handler") + } - iptablesSnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = iptablesSnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddIptablesSnatRule, UpdateFunc: controller.enqueueUpdateIptablesSnatRule, DeleteFunc: controller.enqueueDelIptablesSnatRule, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add iptables snat rule event handler") + } if config.EnableEipSnat { ovnEipInformer := kubeovnInformerFactory.Kubeovn().V1().OvnEips() controller.ovnEipsLister = ovnEipInformer.Lister() @@ -535,11 +573,13 @@ func NewController(config *Configuration) *Controller { controller.resetOvnEipQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "resetOvnEip") controller.delOvnEipQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "delOvnEip") - ovnEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = ovnEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddOvnEip, UpdateFunc: controller.enqueueUpdateOvnEip, DeleteFunc: controller.enqueueDelOvnEip, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add eip event handler") + } ovnFipInformer := kubeovnInformerFactory.Kubeovn().V1().OvnFips() controller.ovnFipsLister = ovnFipInformer.Lister() @@ -547,11 +587,13 @@ func NewController(config *Configuration) *Controller { controller.addOvnFipQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "addOvnFip") controller.updateOvnFipQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "updateOvnFip") controller.delOvnFipQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "delOvnFip") - ovnFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = ovnFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddOvnFip, UpdateFunc: controller.enqueueUpdateOvnFip, DeleteFunc: controller.enqueueDelOvnFip, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add ovn fip event handler") + } ovnSnatRuleInformer := kubeovnInformerFactory.Kubeovn().V1().OvnSnatRules() controller.ovnSnatRulesLister = ovnSnatRuleInformer.Lister() @@ -559,23 +601,29 @@ func NewController(config *Configuration) *Controller { controller.addOvnSnatRuleQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "addOvnSnatRule") controller.updateOvnSnatRuleQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "updateOvnSnatRule") controller.delOvnSnatRuleQueue = workqueue.NewNamedRateLimitingQueue(custCrdRateLimiter, "delOvnSnatRule") - ovnSnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = ovnSnatRuleInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddOvnSnatRule, UpdateFunc: controller.enqueueUpdateOvnSnatRule, DeleteFunc: controller.enqueueDelOvnSnatRule, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add ovn snat rule event handler") + } } - podAnnotatedIptablesEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = podAnnotatedIptablesEipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddPodAnnotatedIptablesEip, UpdateFunc: controller.enqueueUpdatePodAnnotatedIptablesEip, DeleteFunc: controller.enqueueDeletePodAnnotatedIptablesEip, - }) - podAnnotatedIptablesFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + }); err != nil { + util.LogFatalAndExit(err, "failed to add pod iptables eip event handler") + } + if _, err = podAnnotatedIptablesFipInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddPodAnnotatedIptablesFip, UpdateFunc: controller.enqueueUpdatePodAnnotatedIptablesFip, DeleteFunc: controller.enqueueDeletePodAnnotatedIptablesFip, - }) + }); err != nil { + util.LogFatalAndExit(err, "failed to add pod iptables fip event handler") + } return controller } diff --git a/pkg/controller/election.go b/pkg/controller/election.go index 7fbd05f37d9..f00685a6561 100644 --- a/pkg/controller/election.go +++ b/pkg/controller/election.go @@ -84,7 +84,7 @@ func setupLeaderElection(config *leaderElectionConfig) *leaderelection.LeaderEle OnNewLeader: func(identity string) { klog.Infof("new leader elected: %v", identity) if config.WasLeader && identity != config.PodName { - klog.Fatal("I am not leader anymore") + util.LogFatalAndExit(nil, "I am not leader anymore") } if config.OnNewLeader != nil { config.OnNewLeader(identity) diff --git a/pkg/daemon/controller.go b/pkg/daemon/controller.go index 7c8cf819998..a9d4250aefb 100644 --- a/pkg/daemon/controller.go +++ b/pkg/daemon/controller.go @@ -111,19 +111,25 @@ func NewController(config *Configuration, podInformerFactory informers.SharedInf return nil, err } - providerNetworkInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + if _, err = providerNetworkInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddProviderNetwork, UpdateFunc: controller.enqueueUpdateProviderNetwork, DeleteFunc: controller.enqueueDeleteProviderNetwork, - }) - subnetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + }); err != nil { + return nil, err + } + if _, err = subnetInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: controller.enqueueAddSubnet, UpdateFunc: controller.enqueueUpdateSubnet, DeleteFunc: controller.enqueueDeleteSubnet, - }) - podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + }); err != nil { + return nil, err + } + if _, err = podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ UpdateFunc: controller.enqueuePod, - }) + }); err != nil { + return nil, err + } return controller, nil } diff --git a/pkg/daemon/server.go b/pkg/daemon/server.go index 9141630f3a9..f3d5d79d7b6 100644 --- a/pkg/daemon/server.go +++ b/pkg/daemon/server.go @@ -9,6 +9,7 @@ import ( "k8s.io/klog/v2" "github.com/kubeovn/kube-ovn/pkg/request" + "github.com/kubeovn/kube-ovn/pkg/util" ) const ( @@ -26,11 +27,11 @@ func RunServer(config *Configuration, controller *Controller) { } listener, cleanFunc, err := listen(config.BindSocket) if err != nil { - return + util.LogFatalAndExit(err, "failed to listen on %s", config.BindSocket) } defer cleanFunc() klog.Infof("start listen on %s", config.BindSocket) - klog.Fatal(server.Serve(listener)) + util.LogFatalAndExit(server.Serve(listener), "failed to serve on %s", config.BindSocket) } func createHandler(csh *cniServerHandler) http.Handler { diff --git a/pkg/util/pod_exec.go b/pkg/util/pod_exec.go index 7dca80afa49..7f362131c72 100644 --- a/pkg/util/pod_exec.go +++ b/pkg/util/pod_exec.go @@ -2,6 +2,7 @@ package util import ( "bytes" + "context" "io" "net/url" "strings" @@ -71,7 +72,7 @@ func execute(method string, url *url.URL, cfg *rest.Config, stdin io.Reader, std klog.Errorf("remotecommand.NewSPDYExecutor error: %v", err) return err } - return exec.Stream(remotecommand.StreamOptions{ + return exec.StreamWithContext(context.TODO(), remotecommand.StreamOptions{ Stdin: stdin, Stdout: stdout, Stderr: stderr, diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index f8787539bbf..bb919ce476b 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -275,7 +275,7 @@ func (f *Framework) ExecToPodThroughAPI(command, containerName, podName, namespa } var stdout, stderr bytes.Buffer - err = exec.Stream(remotecommand.StreamOptions{ + err = exec.StreamWithContext(context.TODO(), remotecommand.StreamOptions{ Stdin: stdin, Stdout: &stdout, Stderr: &stderr,