mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
update kubernetes to v1.27
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user