Skip to content

Commit 584d314

Browse files
committed
kubernetes/typed: manually switch custom methods to logicalcluster.v3
1 parent 773049e commit 584d314

File tree

10 files changed

+28
-28
lines changed

10 files changed

+28
-28
lines changed

kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
func (c *certificateSigningRequestsClient) UpdateApproval(ctx context.Context, certificateSigningRequest *certificates.CertificateSigningRequest, opts metav1.UpdateOptions) (result *certificates.CertificateSigningRequest, err error) {
30-
obj, err := c.Fake.Invokes(core.NewRootUpdateSubresourceAction(certificateSigningRequestsResource, c.Cluster, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{})
30+
obj, err := c.Fake.Invokes(core.NewRootUpdateSubresourceAction(certificateSigningRequestsResource, c.ClusterPath, "approval", certificateSigningRequest), &certificates.CertificateSigningRequest{})
3131
if obj == nil {
3232
return nil, err
3333
}

kubernetes/typed/core/v1/fake/fake_event_expansion.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
)
2929

3030
func (c *eventsClient) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
31-
action := core.NewRootCreateAction(eventsResource, c.Cluster, event)
31+
action := core.NewRootCreateAction(eventsResource, c.ClusterPath, event)
3232
if c.Namespace != "" {
33-
action = core.NewCreateAction(eventsResource, c.Cluster, c.Namespace, event)
33+
action = core.NewCreateAction(eventsResource, c.ClusterPath, c.Namespace, event)
3434
}
3535
obj, err := c.Fake.Invokes(action, event)
3636
if obj == nil {
@@ -42,9 +42,9 @@ func (c *eventsClient) CreateWithEventNamespace(event *v1.Event) (*v1.Event, err
4242

4343
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
4444
func (c *eventsClient) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
45-
action := core.NewRootUpdateAction(eventsResource, c.Cluster, event)
45+
action := core.NewRootUpdateAction(eventsResource, c.ClusterPath, event)
4646
if c.Namespace != "" {
47-
action = core.NewUpdateAction(eventsResource, c.Cluster, c.Namespace, event)
47+
action = core.NewUpdateAction(eventsResource, c.ClusterPath, c.Namespace, event)
4848
}
4949
obj, err := c.Fake.Invokes(action, event)
5050
if obj == nil {
@@ -59,9 +59,9 @@ func (c *eventsClient) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, err
5959
func (c *eventsClient) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) {
6060
// TODO: Should be configurable to support additional patch strategies.
6161
pt := types.StrategicMergePatchType
62-
action := core.NewRootPatchAction(eventsResource, c.Cluster, event.Name, pt, data)
62+
action := core.NewRootPatchAction(eventsResource, c.ClusterPath, event.Name, pt, data)
6363
if c.Namespace != "" {
64-
action = core.NewPatchAction(eventsResource, c.Cluster, c.Namespace, event.Name, pt, data)
64+
action = core.NewPatchAction(eventsResource, c.ClusterPath, c.Namespace, event.Name, pt, data)
6565
}
6666
obj, err := c.Fake.Invokes(action, event)
6767
if obj == nil {
@@ -73,9 +73,9 @@ func (c *eventsClient) PatchWithEventNamespace(event *v1.Event, data []byte) (*v
7373

7474
// Search returns a list of events matching the specified object.
7575
func (c *eventsClient) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
76-
action := core.NewRootListAction(eventsResource, eventsKind, c.Cluster, metav1.ListOptions{})
76+
action := core.NewRootListAction(eventsResource, eventsKind, c.ClusterPath, metav1.ListOptions{})
7777
if c.Namespace != "" {
78-
action = core.NewListAction(eventsResource, eventsKind, c.Cluster, c.Namespace, metav1.ListOptions{})
78+
action = core.NewListAction(eventsResource, eventsKind, c.ClusterPath, c.Namespace, metav1.ListOptions{})
7979
}
8080
obj, err := c.Fake.Invokes(action, &v1.EventList{})
8181
if obj == nil {
@@ -89,7 +89,7 @@ func (c *eventsClient) GetFieldSelector(involvedObjectName, involvedObjectNamesp
8989
action := core.GenericActionImpl{}
9090
action.Verb = "get-field-selector"
9191
action.Resource = eventsResource
92-
action.ClusterPath = c.Cluster
92+
action.ClusterPath = c.ClusterPath
9393

9494
_, _ = c.Fake.Invokes(action, nil)
9595
return fields.Everything()

kubernetes/typed/core/v1/fake/fake_namespace_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (c *namespacesClient) Finalize(ctx context.Context, namespace *v1.Namespace
3232
action.Resource = namespacesResource
3333
action.Subresource = "finalize"
3434
action.Object = namespace
35-
action.ClusterPath = c.Cluster
35+
action.ClusterPath = c.ClusterPath
3636

3737
obj, err := c.Fake.Invokes(action, namespace)
3838
if obj == nil {

kubernetes/typed/core/v1/fake/fake_node_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
func (c *nodesClient) PatchStatus(_ context.Context, nodeName string, data []byte) (*v1.Node, error) {
3131
// TODO: Should be configurable to support additional patch strategies.
3232
pt := types.StrategicMergePatchType
33-
obj, err := c.Fake.Invokes(core.NewRootPatchSubresourceAction(nodesResource, c.Cluster, nodeName, pt, data, "status"), &v1.Node{})
33+
obj, err := c.Fake.Invokes(core.NewRootPatchSubresourceAction(nodesResource, c.ClusterPath, nodeName, pt, data, "status"), &v1.Node{})
3434
if obj == nil {
3535
return nil, err
3636
}

kubernetes/typed/core/v1/fake/fake_pod_expansion.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ func (c *podsClient) Bind(ctx context.Context, binding *v1.Binding, opts metav1.
4242
action.Resource = podsResource
4343
action.Subresource = "binding"
4444
action.Object = binding
45-
action.ClusterPath = c.Cluster
45+
action.ClusterPath = c.ClusterPath
4646

4747
_, err := c.Fake.Invokes(action, binding)
4848
return err
4949
}
5050

5151
func (c *podsClient) GetBinding(name string) (result *v1.Binding, err error) {
5252
obj, err := c.Fake.
53-
Invokes(core.NewGetSubresourceAction(podsResource, c.Cluster, c.Namespace, "binding", name), &v1.Binding{})
53+
Invokes(core.NewGetSubresourceAction(podsResource, c.ClusterPath, c.Namespace, "binding", name), &v1.Binding{})
5454

5555
if obj == nil {
5656
return nil, err
@@ -65,7 +65,7 @@ func (c *podsClient) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Re
6565
action.Resource = podsResource
6666
action.Subresource = "log"
6767
action.Value = opts
68-
action.ClusterPath = c.Cluster
68+
action.ClusterPath = c.ClusterPath
6969

7070
_, _ = c.Fake.Invokes(action, &v1.Pod{})
7171
fakeClient := &fakerest.RESTClient{
@@ -94,7 +94,7 @@ func (c *podsClient) EvictV1(ctx context.Context, eviction *policyv1.Eviction) e
9494
action.Resource = podsResource
9595
action.Subresource = "eviction"
9696
action.Object = eviction
97-
action.ClusterPath = c.Cluster
97+
action.ClusterPath = c.ClusterPath
9898

9999
_, err := c.Fake.Invokes(action, eviction)
100100
return err
@@ -107,12 +107,12 @@ func (c *podsClient) EvictV1beta1(ctx context.Context, eviction *policyv1beta1.E
107107
action.Resource = podsResource
108108
action.Subresource = "eviction"
109109
action.Object = eviction
110-
action.ClusterPath = c.Cluster
110+
action.ClusterPath = c.ClusterPath
111111

112112
_, err := c.Fake.Invokes(action, eviction)
113113
return err
114114
}
115115

116116
func (c *podsClient) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
117-
return c.Fake.InvokesProxy(core.NewProxyGetAction(podsResource, c.Cluster, c.Namespace, scheme, name, port, path, params))
117+
return c.Fake.InvokesProxy(core.NewProxyGetAction(podsResource, c.ClusterPath, c.Namespace, scheme, name, port, path, params))
118118
}

kubernetes/typed/core/v1/fake/fake_service_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ import (
2424
)
2525

2626
func (c *servicesClient) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
27-
return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.Cluster, c.Namespace, scheme, name, port, path, params))
27+
return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ClusterPath, c.Namespace, scheme, name, port, path, params))
2828
}

kubernetes/typed/events/v1beta1/fake/fake_event_expansion.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626

2727
// CreateWithEventNamespace creats a new event. Returns the copy of the event the server returns, or an error.
2828
func (c *eventsClient) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) {
29-
action := core.NewRootCreateAction(eventsResource, c.Cluster, event)
29+
action := core.NewRootCreateAction(eventsResource, c.ClusterPath, event)
3030
if c.Namespace != "" {
31-
action = core.NewCreateAction(eventsResource, c.Cluster, c.Namespace, event)
31+
action = core.NewCreateAction(eventsResource, c.ClusterPath, c.Namespace, event)
3232
}
3333
obj, err := c.Fake.Invokes(action, event)
3434
if obj == nil {
@@ -40,9 +40,9 @@ func (c *eventsClient) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.
4040

4141
// UpdateWithEventNamespace replaces an existing event. Returns the copy of the event the server returns, or an error.
4242
func (c *eventsClient) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) {
43-
action := core.NewRootUpdateAction(eventsResource, c.Cluster, event)
43+
action := core.NewRootUpdateAction(eventsResource, c.ClusterPath, event)
4444
if c.Namespace != "" {
45-
action = core.NewUpdateAction(eventsResource, c.Cluster, c.Namespace, event)
45+
action = core.NewUpdateAction(eventsResource, c.ClusterPath, c.Namespace, event)
4646
}
4747
obj, err := c.Fake.Invokes(action, event)
4848
if obj == nil {
@@ -55,9 +55,9 @@ func (c *eventsClient) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.
5555
// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error.
5656
func (c *eventsClient) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) {
5757
pt := types.StrategicMergePatchType
58-
action := core.NewRootPatchAction(eventsResource, c.Cluster, event.Name, pt, data)
58+
action := core.NewRootPatchAction(eventsResource, c.ClusterPath, event.Name, pt, data)
5959
if c.Namespace != "" {
60-
action = core.NewPatchAction(eventsResource, c.Cluster, c.Namespace, event.Name, pt, data)
60+
action = core.NewPatchAction(eventsResource, c.ClusterPath, c.Namespace, event.Name, pt, data)
6161
}
6262
obj, err := c.Fake.Invokes(action, event)
6363
if obj == nil {

kubernetes/typed/extensions/v1beta1/fake/fake_deployment_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (c *deploymentsClient) Rollback(ctx context.Context, deploymentRollback *v1
3232
action.Resource = deploymentsResource
3333
action.Subresource = "rollback"
3434
action.Object = deploymentRollback
35-
action.ClusterPath = c.Cluster
35+
action.ClusterPath = c.ClusterPath
3636

3737
_, err := c.Fake.Invokes(action, deploymentRollback)
3838
return err

kubernetes/typed/policy/v1/fake/fake_eviction_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (c *evictionsClient) Evict(ctx context.Context, eviction *policy.Eviction)
3030
action := core.CreateActionImpl{}
3131
action.Verb = "create"
3232
action.Namespace = c.Namespace
33-
action.ClusterPath = c.Cluster
33+
action.ClusterPath = c.ClusterPath
3434
action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
3535
action.Subresource = "eviction"
3636
action.Object = eviction

kubernetes/typed/policy/v1beta1/fake/fake_eviction_expansion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (c *evictionsClient) Evict(ctx context.Context, eviction *policy.Eviction)
3030
action := core.CreateActionImpl{}
3131
action.Verb = "create"
3232
action.Namespace = c.Namespace
33-
action.ClusterPath = c.Cluster
33+
action.ClusterPath = c.ClusterPath
3434
action.Resource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
3535
action.Subresource = "eviction"
3636
action.Object = eviction

0 commit comments

Comments
 (0)