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 (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
@ -32,6 +31,7 @@ import (
|
|||||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &autoscalingv1.Scale{}
|
result = &autoscalingv1.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
Name(deploymentName).
|
Name(deploymentName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
@ -20,7 +20,6 @@ package v1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
@ -32,6 +31,7 @@ import (
|
|||||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &autoscalingv1.Scale{}
|
result = &autoscalingv1.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
Name(replicaSetName).
|
Name(replicaSetName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
@ -20,7 +20,6 @@ package v1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
@ -32,6 +31,7 @@ import (
|
|||||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &autoscalingv1.Scale{}
|
result = &autoscalingv1.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
Name(statefulSetName).
|
Name(statefulSetName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
@ -20,7 +20,6 @@ package v1beta2
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||||
@ -30,6 +29,7 @@ import (
|
|||||||
applyconfigurationsappsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
applyconfigurationsappsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &appsv1beta2.Scale{}
|
result = &appsv1beta2.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("statefulsets").
|
Resource("statefulsets").
|
||||||
Name(statefulSetName).
|
Name(statefulSetName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
@ -20,7 +20,6 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
@ -30,6 +29,7 @@ import (
|
|||||||
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &extensionsv1beta1.Scale{}
|
result = &extensionsv1beta1.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("deployments").
|
Resource("deployments").
|
||||||
Name(deploymentName).
|
Name(deploymentName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
@ -20,7 +20,6 @@ package v1beta1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
@ -30,6 +29,7 @@ import (
|
|||||||
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||||
gentype "k8s.io/client-go/gentype"
|
gentype "k8s.io/client-go/gentype"
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
apply "k8s.io/client-go/util/apply"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
// 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")
|
return nil, fmt.Errorf("scale provided to ApplyScale must not be nil")
|
||||||
}
|
}
|
||||||
patchOpts := opts.ToPatchOptions()
|
patchOpts := opts.ToPatchOptions()
|
||||||
data, err := json.Marshal(scale)
|
request, err := apply.NewRequest(c.GetClient(), scale)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result = &extensionsv1beta1.Scale{}
|
result = &extensionsv1beta1.Scale{}
|
||||||
err = c.GetClient().Patch(types.ApplyPatchType).
|
err = request.
|
||||||
UseProtobufAsDefault().
|
UseProtobufAsDefault().
|
||||||
Namespace(c.GetNamespace()).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("replicasets").
|
Resource("replicasets").
|
||||||
Name(replicaSetName).
|
Name(replicaSetName).
|
||||||
SubResource("scale").
|
SubResource("scale").
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
Do(ctx).
|
||||||
Into(result)
|
Into(result)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user