mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-04 18:56:21 +00:00
Regenerate clients to support application/apply-patch+cbor.
Kubernetes-commit: 41f55d711781c48d8b1365bce087009ceef2f1e9
This commit is contained in:
parent
cff56219d9
commit
b0bd1f5b29
@ -20,7 +20,6 @@ package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
@ -32,6 +31,7 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||
@ -120,20 +120,19 @@ func (c *deployments) ApplyScale(ctx context.Context, deploymentName string, sca
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &autoscalingv1.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("deployments").
|
||||
Name(deploymentName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
@ -20,7 +20,6 @@ package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
@ -32,6 +31,7 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
||||
@ -120,20 +120,19 @@ func (c *replicaSets) ApplyScale(ctx context.Context, replicaSetName string, sca
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &autoscalingv1.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("replicasets").
|
||||
Name(replicaSetName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
@ -20,7 +20,6 @@ package v1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
@ -32,6 +31,7 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
@ -120,20 +120,19 @@ func (c *statefulSets) ApplyScale(ctx context.Context, statefulSetName string, s
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &autoscalingv1.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("statefulsets").
|
||||
Name(statefulSetName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
@ -20,7 +20,6 @@ package v1beta2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||
@ -30,6 +29,7 @@ import (
|
||||
applyconfigurationsappsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
@ -118,20 +118,19 @@ func (c *statefulSets) ApplyScale(ctx context.Context, statefulSetName string, s
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &appsv1beta2.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("statefulsets").
|
||||
Name(statefulSetName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
@ -20,7 +20,6 @@ package v1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
@ -30,6 +29,7 @@ import (
|
||||
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||
@ -118,20 +118,19 @@ func (c *deployments) ApplyScale(ctx context.Context, deploymentName string, sca
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &extensionsv1beta1.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("deployments").
|
||||
Name(deploymentName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
@ -20,7 +20,6 @@ package v1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
@ -30,6 +29,7 @@ import (
|
||||
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
apply "k8s.io/client-go/util/apply"
|
||||
)
|
||||
|
||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
||||
@ -118,20 +118,19 @@ func (c *replicaSets) ApplyScale(ctx context.Context, replicaSetName string, sca
|
||||
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(scale)
|
||||
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result = &extensionsv1beta1.Scale{}
|
||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
||||
err = request.
|
||||
UseProtobufAsDefault().
|
||||
Namespace(c.GetNamespace()).
|
||||
Resource("replicasets").
|
||||
Name(replicaSetName).
|
||||
SubResource("scale").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user