diff --git a/go.mod b/go.mod index 05fd2616..2b951d71 100644 --- a/go.mod +++ b/go.mod @@ -19,10 +19,10 @@ require ( google.golang.org/grpc v1.57.0 google.golang.org/protobuf v1.31.0 gopkg.in/h2non/gock.v1 v1.1.2 - k8s.io/api v0.26.1 - k8s.io/apimachinery v0.26.1 - k8s.io/client-go v0.26.1 - k8s.io/code-generator v0.26.1 + k8s.io/api v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 + k8s.io/code-generator v0.27.4 k8s.io/klog/v2 v2.90.1 ) @@ -63,7 +63,6 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect @@ -84,7 +83,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4 // indirect - k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect diff --git a/go.sum b/go.sum index 111f45c5..1dee2891 100644 --- a/go.sum +++ b/go.sum @@ -67,6 +67,7 @@ github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2Kv github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -106,6 +107,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/s2a-go v0.1.5 h1:8IYp3w9nysqv3JH+NJgXJzGbDHzLOTj43BmSkp+O7qg= github.com/google/s2a-go v0.1.5/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -156,8 +158,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -174,7 +176,6 @@ github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+Pymzi github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -373,21 +374,21 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= -k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= -k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= -k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= -k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= -k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= -k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= -k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/code-generator v0.27.4 h1:bw2xFEBnthhCSC7Bt6FFHhPTfWX21IJ30GXxOzywsFE= +k8s.io/code-generator v0.27.4/go.mod h1:DPung1sI5vBgn4AGKtlPRQAyagj/ir/4jI55ipZHVww= k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4 h1:aClvVG6GbX10ISHcc24J+tqbr0S7fEe1MWkFJ7cWWCI= k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c h1:EFfsozyzZ/pggw5qNx7ftTVZdp7WZl+3ih89GEjYEK8= -k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 001255b4..d39c51ae 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -27,8 +27,9 @@ echo ">> Temporary output directory ${TEMP_DIR}" # Ensure we can execute. chmod +x ${CODEGEN_PKG}/generate-groups.sh +chmod +x ${CODEGEN_PKG}/generate-internal-groups.sh -${CODEGEN_PKG}/generate-groups.sh all \ +${CODEGEN_PKG}/generate-groups.sh client,deepcopy,informer,lister \ github.com/fluxcd/flagger/pkg/client github.com/fluxcd/flagger/pkg/apis \ "flagger:v1beta1 appmesh:v1beta2 appmesh:v1beta1 istio:v1alpha3 smi:v1alpha1 smi:v1alpha2 smi:v1alpha3 gloo/gloo:v1 gloo/gateway:v1 projectcontour:v1 traefik:v1alpha1 kuma:v1alpha1 gatewayapi:v1alpha2 gatewayapi:v1beta1 keda:v1alpha1 apisix:v2" \ --output-base "${TEMP_DIR}" \ diff --git a/pkg/client/clientset/versioned/typed/apisix/v2/fake/fake_apisixroute.go b/pkg/client/clientset/versioned/typed/apisix/v2/fake/fake_apisixroute.go index ba55e7b3..0689e3fc 100644 --- a/pkg/client/clientset/versioned/typed/apisix/v2/fake/fake_apisixroute.go +++ b/pkg/client/clientset/versioned/typed/apisix/v2/fake/fake_apisixroute.go @@ -24,7 +24,6 @@ import ( v2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2" 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" @@ -36,9 +35,9 @@ type FakeApisixRoutes struct { ns string } -var apisixroutesResource = schema.GroupVersionResource{Group: "apisix.apache.org", Version: "v2", Resource: "apisixroutes"} +var apisixroutesResource = v2.SchemeGroupVersion.WithResource("apisixroutes") -var apisixroutesKind = schema.GroupVersionKind{Group: "apisix.apache.org", Version: "v2", Kind: "ApisixRoute"} +var apisixroutesKind = v2.SchemeGroupVersion.WithKind("ApisixRoute") // Get takes name of the apisixRoute, and returns the corresponding apisixRoute object, and an error if there is any. func (c *FakeApisixRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.ApisixRoute, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_mesh.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_mesh.go index 5a692987..82bb676b 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_mesh.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_mesh.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1" 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" @@ -35,9 +34,9 @@ type FakeMeshes struct { Fake *FakeAppmeshV1beta1 } -var meshesResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta1", Resource: "meshes"} +var meshesResource = v1beta1.SchemeGroupVersion.WithResource("meshes") -var meshesKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta1", Kind: "Mesh"} +var meshesKind = v1beta1.SchemeGroupVersion.WithKind("Mesh") // Get takes name of the mesh, and returns the corresponding mesh object, and an error if there is any. func (c *FakeMeshes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Mesh, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualnode.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualnode.go index e3d8d1ab..54cf584a 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualnode.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualnode.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeVirtualNodes struct { ns string } -var virtualnodesResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta1", Resource: "virtualnodes"} +var virtualnodesResource = v1beta1.SchemeGroupVersion.WithResource("virtualnodes") -var virtualnodesKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta1", Kind: "VirtualNode"} +var virtualnodesKind = v1beta1.SchemeGroupVersion.WithKind("VirtualNode") // Get takes name of the virtualNode, and returns the corresponding virtualNode object, and an error if there is any. func (c *FakeVirtualNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualNode, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualservice.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualservice.go index 8626b5c6..47668b01 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualservice.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta1/fake/fake_virtualservice.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeVirtualServices struct { ns string } -var virtualservicesResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta1", Resource: "virtualservices"} +var virtualservicesResource = v1beta1.SchemeGroupVersion.WithResource("virtualservices") -var virtualservicesKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta1", Kind: "VirtualService"} +var virtualservicesKind = v1beta1.SchemeGroupVersion.WithKind("VirtualService") // Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any. func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualService, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualnode.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualnode.go index bb3b67f9..202fc035 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualnode.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualnode.go @@ -24,7 +24,6 @@ import ( v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2" 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" @@ -36,9 +35,9 @@ type FakeVirtualNodes struct { ns string } -var virtualnodesResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta2", Resource: "virtualnodes"} +var virtualnodesResource = v1beta2.SchemeGroupVersion.WithResource("virtualnodes") -var virtualnodesKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta2", Kind: "VirtualNode"} +var virtualnodesKind = v1beta2.SchemeGroupVersion.WithKind("VirtualNode") // Get takes name of the virtualNode, and returns the corresponding virtualNode object, and an error if there is any. func (c *FakeVirtualNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualNode, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualrouter.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualrouter.go index 8363fc82..5a5092a9 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualrouter.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualrouter.go @@ -24,7 +24,6 @@ import ( v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2" 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" @@ -36,9 +35,9 @@ type FakeVirtualRouters struct { ns string } -var virtualroutersResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta2", Resource: "virtualrouters"} +var virtualroutersResource = v1beta2.SchemeGroupVersion.WithResource("virtualrouters") -var virtualroutersKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta2", Kind: "VirtualRouter"} +var virtualroutersKind = v1beta2.SchemeGroupVersion.WithKind("VirtualRouter") // Get takes name of the virtualRouter, and returns the corresponding virtualRouter object, and an error if there is any. func (c *FakeVirtualRouters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualRouter, err error) { diff --git a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualservice.go b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualservice.go index 34dd7b8c..167dafe0 100644 --- a/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualservice.go +++ b/pkg/client/clientset/versioned/typed/appmesh/v1beta2/fake/fake_virtualservice.go @@ -24,7 +24,6 @@ import ( v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2" 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" @@ -36,9 +35,9 @@ type FakeVirtualServices struct { ns string } -var virtualservicesResource = schema.GroupVersionResource{Group: "appmesh.k8s.aws", Version: "v1beta2", Resource: "virtualservices"} +var virtualservicesResource = v1beta2.SchemeGroupVersion.WithResource("virtualservices") -var virtualservicesKind = schema.GroupVersionKind{Group: "appmesh.k8s.aws", Version: "v1beta2", Kind: "VirtualService"} +var virtualservicesKind = v1beta2.SchemeGroupVersion.WithKind("VirtualService") // Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any. func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualService, err error) { diff --git a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_alertprovider.go b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_alertprovider.go index ba182e61..70132943 100644 --- a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_alertprovider.go +++ b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_alertprovider.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeAlertProviders struct { ns string } -var alertprovidersResource = schema.GroupVersionResource{Group: "flagger.app", Version: "v1beta1", Resource: "alertproviders"} +var alertprovidersResource = v1beta1.SchemeGroupVersion.WithResource("alertproviders") -var alertprovidersKind = schema.GroupVersionKind{Group: "flagger.app", Version: "v1beta1", Kind: "AlertProvider"} +var alertprovidersKind = v1beta1.SchemeGroupVersion.WithKind("AlertProvider") // Get takes name of the alertProvider, and returns the corresponding alertProvider object, and an error if there is any. func (c *FakeAlertProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.AlertProvider, err error) { diff --git a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_canary.go b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_canary.go index 36b8b7a0..7f66ee02 100644 --- a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_canary.go +++ b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_canary.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeCanaries struct { ns string } -var canariesResource = schema.GroupVersionResource{Group: "flagger.app", Version: "v1beta1", Resource: "canaries"} +var canariesResource = v1beta1.SchemeGroupVersion.WithResource("canaries") -var canariesKind = schema.GroupVersionKind{Group: "flagger.app", Version: "v1beta1", Kind: "Canary"} +var canariesKind = v1beta1.SchemeGroupVersion.WithKind("Canary") // Get takes name of the canary, and returns the corresponding canary object, and an error if there is any. func (c *FakeCanaries) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Canary, err error) { diff --git a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_metrictemplate.go b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_metrictemplate.go index 36cc1aea..33e417e2 100644 --- a/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_metrictemplate.go +++ b/pkg/client/clientset/versioned/typed/flagger/v1beta1/fake/fake_metrictemplate.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeMetricTemplates struct { ns string } -var metrictemplatesResource = schema.GroupVersionResource{Group: "flagger.app", Version: "v1beta1", Resource: "metrictemplates"} +var metrictemplatesResource = v1beta1.SchemeGroupVersion.WithResource("metrictemplates") -var metrictemplatesKind = schema.GroupVersionKind{Group: "flagger.app", Version: "v1beta1", Kind: "MetricTemplate"} +var metrictemplatesKind = v1beta1.SchemeGroupVersion.WithKind("MetricTemplate") // Get takes name of the metricTemplate, and returns the corresponding metricTemplate object, and an error if there is any. func (c *FakeMetricTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MetricTemplate, err error) { diff --git a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go b/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go index 611499d3..3b9090ac 100644 --- a/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go +++ b/pkg/client/clientset/versioned/typed/gateway/v1/fake/fake_routetable.go @@ -21,10 +21,9 @@ package fake import ( "context" - gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" + metav1 "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" @@ -36,25 +35,25 @@ type FakeRouteTables struct { ns string } -var routetablesResource = schema.GroupVersionResource{Group: "gateway.solo.io", Version: "v1", Resource: "routetables"} +var routetablesResource = v1.SchemeGroupVersion.WithResource("routetables") -var routetablesKind = schema.GroupVersionKind{Group: "gateway.solo.io", Version: "v1", Kind: "RouteTable"} +var routetablesKind = v1.SchemeGroupVersion.WithKind("RouteTable") // Get takes name of the routeTable, and returns the corresponding routeTable object, and an error if there is any. -func (c *FakeRouteTables) Get(ctx context.Context, name string, options v1.GetOptions) (result *gatewayv1.RouteTable, err error) { +func (c *FakeRouteTables) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RouteTable, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(routetablesResource, c.ns, name), &gatewayv1.RouteTable{}) + Invokes(testing.NewGetAction(routetablesResource, c.ns, name), &v1.RouteTable{}) if obj == nil { return nil, err } - return obj.(*gatewayv1.RouteTable), err + return obj.(*v1.RouteTable), err } // List takes label and field selectors, and returns the list of RouteTables that match those selectors. -func (c *FakeRouteTables) List(ctx context.Context, opts v1.ListOptions) (result *gatewayv1.RouteTableList, err error) { +func (c *FakeRouteTables) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RouteTableList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(routetablesResource, routetablesKind, c.ns, opts), &gatewayv1.RouteTableList{}) + Invokes(testing.NewListAction(routetablesResource, routetablesKind, c.ns, opts), &v1.RouteTableList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeRouteTables) List(ctx context.Context, opts v1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &gatewayv1.RouteTableList{ListMeta: obj.(*gatewayv1.RouteTableList).ListMeta} - for _, item := range obj.(*gatewayv1.RouteTableList).Items { + list := &v1.RouteTableList{ListMeta: obj.(*v1.RouteTableList).ListMeta} + for _, item := range obj.(*v1.RouteTableList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,57 +73,57 @@ func (c *FakeRouteTables) List(ctx context.Context, opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested routeTables. -func (c *FakeRouteTables) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRouteTables) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(routetablesResource, c.ns, opts)) } // Create takes the representation of a routeTable and creates it. Returns the server's representation of the routeTable, and an error, if there is any. -func (c *FakeRouteTables) Create(ctx context.Context, routeTable *gatewayv1.RouteTable, opts v1.CreateOptions) (result *gatewayv1.RouteTable, err error) { +func (c *FakeRouteTables) Create(ctx context.Context, routeTable *v1.RouteTable, opts metav1.CreateOptions) (result *v1.RouteTable, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(routetablesResource, c.ns, routeTable), &gatewayv1.RouteTable{}) + Invokes(testing.NewCreateAction(routetablesResource, c.ns, routeTable), &v1.RouteTable{}) if obj == nil { return nil, err } - return obj.(*gatewayv1.RouteTable), err + return obj.(*v1.RouteTable), err } // Update takes the representation of a routeTable and updates it. Returns the server's representation of the routeTable, and an error, if there is any. -func (c *FakeRouteTables) Update(ctx context.Context, routeTable *gatewayv1.RouteTable, opts v1.UpdateOptions) (result *gatewayv1.RouteTable, err error) { +func (c *FakeRouteTables) Update(ctx context.Context, routeTable *v1.RouteTable, opts metav1.UpdateOptions) (result *v1.RouteTable, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(routetablesResource, c.ns, routeTable), &gatewayv1.RouteTable{}) + Invokes(testing.NewUpdateAction(routetablesResource, c.ns, routeTable), &v1.RouteTable{}) if obj == nil { return nil, err } - return obj.(*gatewayv1.RouteTable), err + return obj.(*v1.RouteTable), err } // Delete takes name of the routeTable and deletes it. Returns an error if one occurs. -func (c *FakeRouteTables) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeRouteTables) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(routetablesResource, c.ns, name, opts), &gatewayv1.RouteTable{}) + Invokes(testing.NewDeleteActionWithOptions(routetablesResource, c.ns, name, opts), &v1.RouteTable{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeRouteTables) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeRouteTables) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(routetablesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &gatewayv1.RouteTableList{}) + _, err := c.Fake.Invokes(action, &v1.RouteTableList{}) return err } // Patch applies the patch and returns the patched routeTable. -func (c *FakeRouteTables) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *gatewayv1.RouteTable, err error) { +func (c *FakeRouteTables) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RouteTable, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(routetablesResource, c.ns, name, pt, data, subresources...), &gatewayv1.RouteTable{}) + Invokes(testing.NewPatchSubresourceAction(routetablesResource, c.ns, name, pt, data, subresources...), &v1.RouteTable{}) if obj == nil { return nil, err } - return obj.(*gatewayv1.RouteTable), err + return obj.(*v1.RouteTable), err } diff --git a/pkg/client/clientset/versioned/typed/gatewayapi/v1alpha2/fake/fake_httproute.go b/pkg/client/clientset/versioned/typed/gatewayapi/v1alpha2/fake/fake_httproute.go index 32a89c9a..b7f37bcf 100644 --- a/pkg/client/clientset/versioned/typed/gatewayapi/v1alpha2/fake/fake_httproute.go +++ b/pkg/client/clientset/versioned/typed/gatewayapi/v1alpha2/fake/fake_httproute.go @@ -24,7 +24,6 @@ import ( v1alpha2 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1alpha2" 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" @@ -36,9 +35,9 @@ type FakeHTTPRoutes struct { ns string } -var httproutesResource = schema.GroupVersionResource{Group: "gatewayapi", Version: "v1alpha2", Resource: "httproutes"} +var httproutesResource = v1alpha2.SchemeGroupVersion.WithResource("httproutes") -var httproutesKind = schema.GroupVersionKind{Group: "gatewayapi", Version: "v1alpha2", Kind: "HTTPRoute"} +var httproutesKind = v1alpha2.SchemeGroupVersion.WithKind("HTTPRoute") // Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any. func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.HTTPRoute, err error) { diff --git a/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1/fake/fake_httproute.go b/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1/fake/fake_httproute.go index 29f83c7c..89108e2b 100644 --- a/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1/fake/fake_httproute.go +++ b/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1/fake/fake_httproute.go @@ -24,7 +24,6 @@ import ( v1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1" 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" @@ -36,9 +35,9 @@ type FakeHTTPRoutes struct { ns string } -var httproutesResource = schema.GroupVersionResource{Group: "gatewayapi", Version: "v1beta1", Resource: "httproutes"} +var httproutesResource = v1beta1.SchemeGroupVersion.WithResource("httproutes") -var httproutesKind = schema.GroupVersionKind{Group: "gatewayapi", Version: "v1beta1", Kind: "HTTPRoute"} +var httproutesKind = v1beta1.SchemeGroupVersion.WithKind("HTTPRoute") // Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any. func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.HTTPRoute, err error) { diff --git a/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go b/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go index 5012d20c..29674081 100644 --- a/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go +++ b/pkg/client/clientset/versioned/typed/gloo/v1/fake/fake_upstream.go @@ -21,10 +21,9 @@ package fake import ( "context" - gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" + metav1 "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" @@ -36,25 +35,25 @@ type FakeUpstreams struct { ns string } -var upstreamsResource = schema.GroupVersionResource{Group: "gloo.solo.io", Version: "v1", Resource: "upstreams"} +var upstreamsResource = v1.SchemeGroupVersion.WithResource("upstreams") -var upstreamsKind = schema.GroupVersionKind{Group: "gloo.solo.io", Version: "v1", Kind: "Upstream"} +var upstreamsKind = v1.SchemeGroupVersion.WithKind("Upstream") // Get takes name of the upstream, and returns the corresponding upstream object, and an error if there is any. -func (c *FakeUpstreams) Get(ctx context.Context, name string, options v1.GetOptions) (result *gloov1.Upstream, err error) { +func (c *FakeUpstreams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Upstream, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(upstreamsResource, c.ns, name), &gloov1.Upstream{}) + Invokes(testing.NewGetAction(upstreamsResource, c.ns, name), &v1.Upstream{}) if obj == nil { return nil, err } - return obj.(*gloov1.Upstream), err + return obj.(*v1.Upstream), err } // List takes label and field selectors, and returns the list of Upstreams that match those selectors. -func (c *FakeUpstreams) List(ctx context.Context, opts v1.ListOptions) (result *gloov1.UpstreamList, err error) { +func (c *FakeUpstreams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UpstreamList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(upstreamsResource, upstreamsKind, c.ns, opts), &gloov1.UpstreamList{}) + Invokes(testing.NewListAction(upstreamsResource, upstreamsKind, c.ns, opts), &v1.UpstreamList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeUpstreams) List(ctx context.Context, opts v1.ListOptions) (result * if label == nil { label = labels.Everything() } - list := &gloov1.UpstreamList{ListMeta: obj.(*gloov1.UpstreamList).ListMeta} - for _, item := range obj.(*gloov1.UpstreamList).Items { + list := &v1.UpstreamList{ListMeta: obj.(*v1.UpstreamList).ListMeta} + for _, item := range obj.(*v1.UpstreamList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,57 +73,57 @@ func (c *FakeUpstreams) List(ctx context.Context, opts v1.ListOptions) (result * } // Watch returns a watch.Interface that watches the requested upstreams. -func (c *FakeUpstreams) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeUpstreams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(upstreamsResource, c.ns, opts)) } // Create takes the representation of a upstream and creates it. Returns the server's representation of the upstream, and an error, if there is any. -func (c *FakeUpstreams) Create(ctx context.Context, upstream *gloov1.Upstream, opts v1.CreateOptions) (result *gloov1.Upstream, err error) { +func (c *FakeUpstreams) Create(ctx context.Context, upstream *v1.Upstream, opts metav1.CreateOptions) (result *v1.Upstream, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(upstreamsResource, c.ns, upstream), &gloov1.Upstream{}) + Invokes(testing.NewCreateAction(upstreamsResource, c.ns, upstream), &v1.Upstream{}) if obj == nil { return nil, err } - return obj.(*gloov1.Upstream), err + return obj.(*v1.Upstream), err } // Update takes the representation of a upstream and updates it. Returns the server's representation of the upstream, and an error, if there is any. -func (c *FakeUpstreams) Update(ctx context.Context, upstream *gloov1.Upstream, opts v1.UpdateOptions) (result *gloov1.Upstream, err error) { +func (c *FakeUpstreams) Update(ctx context.Context, upstream *v1.Upstream, opts metav1.UpdateOptions) (result *v1.Upstream, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(upstreamsResource, c.ns, upstream), &gloov1.Upstream{}) + Invokes(testing.NewUpdateAction(upstreamsResource, c.ns, upstream), &v1.Upstream{}) if obj == nil { return nil, err } - return obj.(*gloov1.Upstream), err + return obj.(*v1.Upstream), err } // Delete takes name of the upstream and deletes it. Returns an error if one occurs. -func (c *FakeUpstreams) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeUpstreams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(upstreamsResource, c.ns, name, opts), &gloov1.Upstream{}) + Invokes(testing.NewDeleteActionWithOptions(upstreamsResource, c.ns, name, opts), &v1.Upstream{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeUpstreams) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeUpstreams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(upstreamsResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &gloov1.UpstreamList{}) + _, err := c.Fake.Invokes(action, &v1.UpstreamList{}) return err } // Patch applies the patch and returns the patched upstream. -func (c *FakeUpstreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *gloov1.Upstream, err error) { +func (c *FakeUpstreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Upstream, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(upstreamsResource, c.ns, name, pt, data, subresources...), &gloov1.Upstream{}) + Invokes(testing.NewPatchSubresourceAction(upstreamsResource, c.ns, name, pt, data, subresources...), &v1.Upstream{}) if obj == nil { return nil, err } - return obj.(*gloov1.Upstream), err + return obj.(*v1.Upstream), err } diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_destinationrule.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_destinationrule.go index 198bcbe1..7468d689 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_destinationrule.go +++ b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_destinationrule.go @@ -24,7 +24,6 @@ import ( v1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3" 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" @@ -36,9 +35,9 @@ type FakeDestinationRules struct { ns string } -var destinationrulesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "destinationrules"} +var destinationrulesResource = v1alpha3.SchemeGroupVersion.WithResource("destinationrules") -var destinationrulesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "DestinationRule"} +var destinationrulesKind = v1alpha3.SchemeGroupVersion.WithKind("DestinationRule") // Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any. func (c *FakeDestinationRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.DestinationRule, err error) { diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go index 06341005..604f8ff8 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go +++ b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go @@ -24,7 +24,6 @@ import ( v1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3" 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" @@ -36,9 +35,9 @@ type FakeVirtualServices struct { ns string } -var virtualservicesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "virtualservices"} +var virtualservicesResource = v1alpha3.SchemeGroupVersion.WithResource("virtualservices") -var virtualservicesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "VirtualService"} +var virtualservicesKind = v1alpha3.SchemeGroupVersion.WithKind("VirtualService") // Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any. func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) { diff --git a/pkg/client/clientset/versioned/typed/keda/v1alpha1/fake/fake_scaledobject.go b/pkg/client/clientset/versioned/typed/keda/v1alpha1/fake/fake_scaledobject.go index d1e4317b..a008e056 100644 --- a/pkg/client/clientset/versioned/typed/keda/v1alpha1/fake/fake_scaledobject.go +++ b/pkg/client/clientset/versioned/typed/keda/v1alpha1/fake/fake_scaledobject.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1" 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" @@ -36,9 +35,9 @@ type FakeScaledObjects struct { ns string } -var scaledobjectsResource = schema.GroupVersionResource{Group: "keda.sh", Version: "v1alpha1", Resource: "scaledobjects"} +var scaledobjectsResource = v1alpha1.SchemeGroupVersion.WithResource("scaledobjects") -var scaledobjectsKind = schema.GroupVersionKind{Group: "keda.sh", Version: "v1alpha1", Kind: "ScaledObject"} +var scaledobjectsKind = v1alpha1.SchemeGroupVersion.WithKind("ScaledObject") // Get takes name of the scaledObject, and returns the corresponding scaledObject object, and an error if there is any. func (c *FakeScaledObjects) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ScaledObject, err error) { diff --git a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_trafficroute.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_trafficroute.go index 51d2e154..f200b6c3 100644 --- a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_trafficroute.go +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_trafficroute.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" 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" @@ -35,9 +34,9 @@ type FakeTrafficRoutes struct { Fake *FakeKumaV1alpha1 } -var trafficroutesResource = schema.GroupVersionResource{Group: "kuma.io", Version: "v1alpha1", Resource: "trafficroutes"} +var trafficroutesResource = v1alpha1.SchemeGroupVersion.WithResource("trafficroutes") -var trafficroutesKind = schema.GroupVersionKind{Group: "kuma.io", Version: "v1alpha1", Kind: "TrafficRoute"} +var trafficroutesKind = v1alpha1.SchemeGroupVersion.WithKind("TrafficRoute") // Get takes name of the trafficRoute, and returns the corresponding trafficRoute object, and an error if there is any. func (c *FakeTrafficRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficRoute, err error) { diff --git a/pkg/client/clientset/versioned/typed/projectcontour/v1/fake/fake_httpproxy.go b/pkg/client/clientset/versioned/typed/projectcontour/v1/fake/fake_httpproxy.go index 55689f40..e1037eae 100644 --- a/pkg/client/clientset/versioned/typed/projectcontour/v1/fake/fake_httpproxy.go +++ b/pkg/client/clientset/versioned/typed/projectcontour/v1/fake/fake_httpproxy.go @@ -21,10 +21,9 @@ package fake import ( "context" - projectcontourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1" + metav1 "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" @@ -36,25 +35,25 @@ type FakeHTTPProxies struct { ns string } -var httpproxiesResource = schema.GroupVersionResource{Group: "projectcontour.io", Version: "v1", Resource: "httpproxies"} +var httpproxiesResource = v1.SchemeGroupVersion.WithResource("httpproxies") -var httpproxiesKind = schema.GroupVersionKind{Group: "projectcontour.io", Version: "v1", Kind: "HTTPProxy"} +var httpproxiesKind = v1.SchemeGroupVersion.WithKind("HTTPProxy") // Get takes name of the hTTPProxy, and returns the corresponding hTTPProxy object, and an error if there is any. -func (c *FakeHTTPProxies) Get(ctx context.Context, name string, options v1.GetOptions) (result *projectcontourv1.HTTPProxy, err error) { +func (c *FakeHTTPProxies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPProxy, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(httpproxiesResource, c.ns, name), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewGetAction(httpproxiesResource, c.ns, name), &v1.HTTPProxy{}) if obj == nil { return nil, err } - return obj.(*projectcontourv1.HTTPProxy), err + return obj.(*v1.HTTPProxy), err } // List takes label and field selectors, and returns the list of HTTPProxies that match those selectors. -func (c *FakeHTTPProxies) List(ctx context.Context, opts v1.ListOptions) (result *projectcontourv1.HTTPProxyList, err error) { +func (c *FakeHTTPProxies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPProxyList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(httpproxiesResource, httpproxiesKind, c.ns, opts), &projectcontourv1.HTTPProxyList{}) + Invokes(testing.NewListAction(httpproxiesResource, httpproxiesKind, c.ns, opts), &v1.HTTPProxyList{}) if obj == nil { return nil, err @@ -64,8 +63,8 @@ func (c *FakeHTTPProxies) List(ctx context.Context, opts v1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &projectcontourv1.HTTPProxyList{ListMeta: obj.(*projectcontourv1.HTTPProxyList).ListMeta} - for _, item := range obj.(*projectcontourv1.HTTPProxyList).Items { + list := &v1.HTTPProxyList{ListMeta: obj.(*v1.HTTPProxyList).ListMeta} + for _, item := range obj.(*v1.HTTPProxyList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -74,69 +73,69 @@ func (c *FakeHTTPProxies) List(ctx context.Context, opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested hTTPProxies. -func (c *FakeHTTPProxies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeHTTPProxies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(httpproxiesResource, c.ns, opts)) } // Create takes the representation of a hTTPProxy and creates it. Returns the server's representation of the hTTPProxy, and an error, if there is any. -func (c *FakeHTTPProxies) Create(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts v1.CreateOptions) (result *projectcontourv1.HTTPProxy, err error) { +func (c *FakeHTTPProxies) Create(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.CreateOptions) (result *v1.HTTPProxy, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(httpproxiesResource, c.ns, hTTPProxy), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewCreateAction(httpproxiesResource, c.ns, hTTPProxy), &v1.HTTPProxy{}) if obj == nil { return nil, err } - return obj.(*projectcontourv1.HTTPProxy), err + return obj.(*v1.HTTPProxy), err } // Update takes the representation of a hTTPProxy and updates it. Returns the server's representation of the hTTPProxy, and an error, if there is any. -func (c *FakeHTTPProxies) Update(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts v1.UpdateOptions) (result *projectcontourv1.HTTPProxy, err error) { +func (c *FakeHTTPProxies) Update(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (result *v1.HTTPProxy, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(httpproxiesResource, c.ns, hTTPProxy), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewUpdateAction(httpproxiesResource, c.ns, hTTPProxy), &v1.HTTPProxy{}) if obj == nil { return nil, err } - return obj.(*projectcontourv1.HTTPProxy), err + return obj.(*v1.HTTPProxy), 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 *FakeHTTPProxies) UpdateStatus(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts v1.UpdateOptions) (*projectcontourv1.HTTPProxy, error) { +func (c *FakeHTTPProxies) UpdateStatus(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (*v1.HTTPProxy, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(httpproxiesResource, "status", c.ns, hTTPProxy), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewUpdateSubresourceAction(httpproxiesResource, "status", c.ns, hTTPProxy), &v1.HTTPProxy{}) if obj == nil { return nil, err } - return obj.(*projectcontourv1.HTTPProxy), err + return obj.(*v1.HTTPProxy), err } // Delete takes name of the hTTPProxy and deletes it. Returns an error if one occurs. -func (c *FakeHTTPProxies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeHTTPProxies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(httpproxiesResource, c.ns, name, opts), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewDeleteActionWithOptions(httpproxiesResource, c.ns, name, opts), &v1.HTTPProxy{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeHTTPProxies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeHTTPProxies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(httpproxiesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &projectcontourv1.HTTPProxyList{}) + _, err := c.Fake.Invokes(action, &v1.HTTPProxyList{}) return err } // Patch applies the patch and returns the patched hTTPProxy. -func (c *FakeHTTPProxies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *projectcontourv1.HTTPProxy, err error) { +func (c *FakeHTTPProxies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPProxy, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(httpproxiesResource, c.ns, name, pt, data, subresources...), &projectcontourv1.HTTPProxy{}) + Invokes(testing.NewPatchSubresourceAction(httpproxiesResource, c.ns, name, pt, data, subresources...), &v1.HTTPProxy{}) if obj == nil { return nil, err } - return obj.(*projectcontourv1.HTTPProxy), err + return obj.(*v1.HTTPProxy), err } diff --git a/pkg/client/clientset/versioned/typed/smi/v1alpha1/fake/fake_trafficsplit.go b/pkg/client/clientset/versioned/typed/smi/v1alpha1/fake/fake_trafficsplit.go index 392fc53b..3d2df000 100644 --- a/pkg/client/clientset/versioned/typed/smi/v1alpha1/fake/fake_trafficsplit.go +++ b/pkg/client/clientset/versioned/typed/smi/v1alpha1/fake/fake_trafficsplit.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1" 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" @@ -36,9 +35,9 @@ type FakeTrafficSplits struct { ns string } -var trafficsplitsResource = schema.GroupVersionResource{Group: "split.smi-spec.io", Version: "v1alpha1", Resource: "trafficsplits"} +var trafficsplitsResource = v1alpha1.SchemeGroupVersion.WithResource("trafficsplits") -var trafficsplitsKind = schema.GroupVersionKind{Group: "split.smi-spec.io", Version: "v1alpha1", Kind: "TrafficSplit"} +var trafficsplitsKind = v1alpha1.SchemeGroupVersion.WithKind("TrafficSplit") // Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any. func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficSplit, err error) { diff --git a/pkg/client/clientset/versioned/typed/smi/v1alpha2/fake/fake_trafficsplit.go b/pkg/client/clientset/versioned/typed/smi/v1alpha2/fake/fake_trafficsplit.go index 1f5b616f..b7f93ecf 100644 --- a/pkg/client/clientset/versioned/typed/smi/v1alpha2/fake/fake_trafficsplit.go +++ b/pkg/client/clientset/versioned/typed/smi/v1alpha2/fake/fake_trafficsplit.go @@ -24,7 +24,6 @@ import ( v1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2" 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" @@ -36,9 +35,9 @@ type FakeTrafficSplits struct { ns string } -var trafficsplitsResource = schema.GroupVersionResource{Group: "split.smi-spec.io", Version: "v1alpha2", Resource: "trafficsplits"} +var trafficsplitsResource = v1alpha2.SchemeGroupVersion.WithResource("trafficsplits") -var trafficsplitsKind = schema.GroupVersionKind{Group: "split.smi-spec.io", Version: "v1alpha2", Kind: "TrafficSplit"} +var trafficsplitsKind = v1alpha2.SchemeGroupVersion.WithKind("TrafficSplit") // Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any. func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TrafficSplit, err error) { diff --git a/pkg/client/clientset/versioned/typed/smi/v1alpha3/fake/fake_trafficsplit.go b/pkg/client/clientset/versioned/typed/smi/v1alpha3/fake/fake_trafficsplit.go index f7434b13..746842dc 100644 --- a/pkg/client/clientset/versioned/typed/smi/v1alpha3/fake/fake_trafficsplit.go +++ b/pkg/client/clientset/versioned/typed/smi/v1alpha3/fake/fake_trafficsplit.go @@ -24,7 +24,6 @@ import ( v1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3" 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" @@ -36,9 +35,9 @@ type FakeTrafficSplits struct { ns string } -var trafficsplitsResource = schema.GroupVersionResource{Group: "split.smi-spec.io", Version: "v1alpha3", Resource: "trafficsplits"} +var trafficsplitsResource = v1alpha3.SchemeGroupVersion.WithResource("trafficsplits") -var trafficsplitsKind = schema.GroupVersionKind{Group: "split.smi-spec.io", Version: "v1alpha3", Kind: "TrafficSplit"} +var trafficsplitsKind = v1alpha3.SchemeGroupVersion.WithKind("TrafficSplit") // Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any. func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.TrafficSplit, err error) { diff --git a/pkg/client/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go b/pkg/client/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go index aba0b14d..ee43ee2f 100644 --- a/pkg/client/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go +++ b/pkg/client/clientset/versioned/typed/traefik/v1alpha1/fake/fake_traefikservice.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1" 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" @@ -36,9 +35,9 @@ type FakeTraefikServices struct { ns string } -var traefikservicesResource = schema.GroupVersionResource{Group: "traefik.containo.us", Version: "v1alpha1", Resource: "traefikservices"} +var traefikservicesResource = v1alpha1.SchemeGroupVersion.WithResource("traefikservices") -var traefikservicesKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TraefikService"} +var traefikservicesKind = v1alpha1.SchemeGroupVersion.WithKind("TraefikService") // Get takes name of the traefikService, and returns the corresponding traefikService object, and an error if there is any. func (c *FakeTraefikServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {