From 9c1be33ee1b4fa04e6940669716319eac6cfa97a Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 9 Nov 2017 12:13:08 -0500 Subject: [PATCH 1/4] Switch to autoscaling.Scale internally --- pkg/apis/apps/register.go | 3 +- pkg/apis/apps/types.go | 4 +- pkg/apis/apps/v1beta1/conversion.go | 49 ++++++-------- pkg/apis/apps/v1beta1/doc.go | 1 + pkg/apis/apps/v1beta2/conversion.go | 45 ++++++------- pkg/apis/apps/v1beta2/conversion_test.go | 23 +++---- pkg/apis/apps/v1beta2/doc.go | 1 + pkg/apis/autoscaling/fuzzer/fuzzer.go | 11 ++++ pkg/apis/core/types.go | 4 +- pkg/apis/extensions/register.go | 3 +- pkg/apis/extensions/types.go | 46 ++----------- pkg/apis/extensions/v1beta1/conversion.go | 49 ++++++-------- pkg/apis/extensions/v1beta1/doc.go | 1 + pkg/apis/extensions/validation/validation.go | 11 ---- .../extensions/validation/validation_test.go | 64 ------------------- .../apps/statefulset/storage/storage.go | 23 ++++--- .../apps/statefulset/storage/storage_test.go | 22 ++++--- .../extensions/controller/storage/storage.go | 22 +++---- .../controller/storage/storage_test.go | 20 +++--- .../extensions/deployment/storage/storage.go | 22 ++++--- .../deployment/storage/storage_test.go | 21 +++--- .../extensions/replicaset/storage/storage.go | 23 ++++--- .../replicaset/storage/storage_test.go | 22 ++++--- 23 files changed, 197 insertions(+), 293 deletions(-) diff --git a/pkg/apis/apps/register.go b/pkg/apis/apps/register.go index aae53d169ef..8b7591807cb 100644 --- a/pkg/apis/apps/register.go +++ b/pkg/apis/apps/register.go @@ -19,6 +19,7 @@ package apps import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -52,7 +53,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &extensions.Deployment{}, &extensions.DeploymentList{}, &extensions.DeploymentRollback{}, - &extensions.Scale{}, + &autoscaling.Scale{}, &StatefulSet{}, &StatefulSetList{}, &ControllerRevision{}, diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index 1f0bae8f5bd..77af74eecbd 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -23,8 +23,8 @@ import ( ) // +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/extensions.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/extensions.Scale,result=k8s.io/kubernetes/pkg/apis/extensions.Scale +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/autoscaling.Scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // StatefulSet represents a set of pods with consistent identities. diff --git a/pkg/apis/apps/v1beta1/conversion.go b/pkg/apis/apps/v1beta1/conversion.go index 62024692a69..6f4d27cf905 100644 --- a/pkg/apis/apps/v1beta1/conversion.go +++ b/pkg/apis/apps/v1beta1/conversion.go @@ -23,9 +23,11 @@ import ( "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/kubernetes/pkg/apis/apps" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/extensions" @@ -44,8 +46,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { // extensions // TODO: below conversions should be dropped in favor of auto-generated // ones, see https://github.com/kubernetes/kubernetes/issues/39865 - Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, - Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, + Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus, Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec, Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec, Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy, @@ -178,48 +180,35 @@ func Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy return nil } -func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *appsv1beta1.ScaleStatus, s conversion.Scope) error { +func Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(in *autoscaling.ScaleStatus, out *appsv1beta1.ScaleStatus, s conversion.Scope) error { out.Replicas = int32(in.Replicas) + out.TargetSelector = in.Selector out.Selector = nil - out.TargetSelector = "" - if in.Selector != nil { - if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 { - out.Selector = in.Selector.MatchLabels - } - - selector, err := metav1.LabelSelectorAsSelector(in.Selector) - if err != nil { - return fmt.Errorf("invalid label selector: %v", err) - } - out.TargetSelector = selector.String() + selector, err := metav1.ParseToLabelSelector(in.Selector) + if err != nil { + return fmt.Errorf("failed to parse selector: %v", err) } + if len(selector.MatchExpressions) == 0 { + out.Selector = selector.MatchLabels + } + return nil } -func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *appsv1beta1.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(in *appsv1beta1.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // Normally when 2 fields map to the same internal value we favor the old field, since - // old clients can't be expected to know about new fields but clients that know about the - // new field can be expected to know about the old field (though that's not quite true, due - // to kubectl apply). However, these fields are readonly, so any non-nil value should work. if in.TargetSelector != "" { - labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector) - if err != nil { - out.Selector = nil - return fmt.Errorf("failed to parse target selector: %v", err) - } - out.Selector = labelSelector + out.Selector = in.TargetSelector } else if in.Selector != nil { - out.Selector = new(metav1.LabelSelector) - selector := make(map[string]string) + set := labels.Set{} for key, val := range in.Selector { - selector[key] = val + set[key] = val } - out.Selector.MatchLabels = selector + out.Selector = labels.SelectorFromSet(set).String() } else { - out.Selector = nil + out.Selector = "" } return nil } diff --git a/pkg/apis/apps/v1beta1/doc.go b/pkg/apis/apps/v1beta1/doc.go index 058dce37f1d..4a11a5834d3 100644 --- a/pkg/apis/apps/v1beta1/doc.go +++ b/pkg/apis/apps/v1beta1/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions // +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/apps/v1beta1 // +k8s:defaulter-gen=TypeMeta diff --git a/pkg/apis/apps/v1beta2/conversion.go b/pkg/apis/apps/v1beta2/conversion.go index f6292cb96bf..f2457e7e376 100644 --- a/pkg/apis/apps/v1beta2/conversion.go +++ b/pkg/apis/apps/v1beta2/conversion.go @@ -24,9 +24,11 @@ import ( "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/kubernetes/pkg/apis/apps" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/extensions" @@ -57,8 +59,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { // extensions // TODO: below conversions should be dropped in favor of auto-generated // ones, see https://github.com/kubernetes/kubernetes/issues/39865 - Convert_v1beta2_ScaleStatus_To_extensions_ScaleStatus, - Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus, + Convert_v1beta2_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta2_ScaleStatus, Convert_v1beta2_DeploymentSpec_To_extensions_DeploymentSpec, Convert_extensions_DeploymentSpec_To_v1beta2_DeploymentSpec, Convert_v1beta2_DeploymentStrategy_To_extensions_DeploymentStrategy, @@ -243,26 +245,23 @@ func Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus(in *apps.Statef return nil } -func Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus(in *extensions.ScaleStatus, out *appsv1beta2.ScaleStatus, s conversion.Scope) error { +func Convert_autoscaling_ScaleStatus_To_v1beta2_ScaleStatus(in *autoscaling.ScaleStatus, out *appsv1beta2.ScaleStatus, s conversion.Scope) error { out.Replicas = int32(in.Replicas) + out.TargetSelector = in.Selector out.Selector = nil - out.TargetSelector = "" - if in.Selector != nil { - if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 { - out.Selector = in.Selector.MatchLabels - } - - selector, err := metav1.LabelSelectorAsSelector(in.Selector) - if err != nil { - return fmt.Errorf("invalid label selector: %v", err) - } - out.TargetSelector = selector.String() + selector, err := metav1.ParseToLabelSelector(in.Selector) + if err != nil { + return fmt.Errorf("failed to parse selector: %v", err) } + if len(selector.MatchExpressions) == 0 { + out.Selector = selector.MatchLabels + } + return nil } -func Convert_v1beta2_ScaleStatus_To_extensions_ScaleStatus(in *appsv1beta2.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func Convert_v1beta2_ScaleStatus_To_autoscaling_ScaleStatus(in *appsv1beta2.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas // Normally when 2 fields map to the same internal value we favor the old field, since @@ -270,21 +269,15 @@ func Convert_v1beta2_ScaleStatus_To_extensions_ScaleStatus(in *appsv1beta2.Scale // new field can be expected to know about the old field (though that's not quite true, due // to kubectl apply). However, these fields are readonly, so any non-nil value should work. if in.TargetSelector != "" { - labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector) - if err != nil { - out.Selector = nil - return fmt.Errorf("failed to parse target selector: %v", err) - } - out.Selector = labelSelector + out.Selector = in.TargetSelector } else if in.Selector != nil { - out.Selector = new(metav1.LabelSelector) - selector := make(map[string]string) + set := labels.Set{} for key, val := range in.Selector { - selector[key] = val + set[key] = val } - out.Selector.MatchLabels = selector + out.Selector = labels.SelectorFromSet(set).String() } else { - out.Selector = nil + out.Selector = "" } return nil } diff --git a/pkg/apis/apps/v1beta2/conversion_test.go b/pkg/apis/apps/v1beta2/conversion_test.go index c5f44687cae..7cf4d11a2f6 100644 --- a/pkg/apis/apps/v1beta2/conversion_test.go +++ b/pkg/apis/apps/v1beta2/conversion_test.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/apps" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/extensions" @@ -349,41 +350,41 @@ func TestV1beta2ScaleStatusConversion(t *testing.T) { labelsSelector2, _ := metav1.LabelSelectorAsSelector(selector2) testcases := map[string]struct { - scaleStatus1 *extensions.ScaleStatus + scaleStatus1 *autoscaling.ScaleStatus scaleStatus2 *v1beta2.ScaleStatus }{ "ScaleStatus Conversion 1": { - scaleStatus1: &extensions.ScaleStatus{Replicas: 2}, + scaleStatus1: &autoscaling.ScaleStatus{Replicas: 2}, scaleStatus2: &v1beta2.ScaleStatus{Replicas: 2}, }, "ScaleStatus Conversion 2": { - scaleStatus1: &extensions.ScaleStatus{Replicas: 2, Selector: selector1}, + scaleStatus1: &autoscaling.ScaleStatus{Replicas: 2, Selector: labelsSelector1.String()}, scaleStatus2: &v1beta2.ScaleStatus{Replicas: 2, Selector: matchLabels, TargetSelector: labelsSelector1.String()}, }, "ScaleStatus Conversion 3": { - scaleStatus1: &extensions.ScaleStatus{Replicas: 2, Selector: selector2}, + scaleStatus1: &autoscaling.ScaleStatus{Replicas: 2, Selector: labelsSelector2.String()}, scaleStatus2: &v1beta2.ScaleStatus{Replicas: 2, Selector: map[string]string{}, TargetSelector: labelsSelector2.String()}, }, } for k, tc := range testcases { - // extensions -> v1beta2 + // autoscaling -> v1beta2 internal1 := &v1beta2.ScaleStatus{} if err := legacyscheme.Scheme.Convert(tc.scaleStatus1, internal1, nil); err != nil { - t.Errorf("%q - %q: unexpected error: %v", k, "extensions -> v1beta2", err) + t.Errorf("%q - %q: unexpected error: %v", k, "autoscaling -> v1beta2", err) } if !apiequality.Semantic.DeepEqual(internal1, tc.scaleStatus2) { - t.Errorf("%q - %q: expected\n\t%#v, got \n\t%#v", k, "extensions -> v1beta2", tc.scaleStatus2, internal1) + t.Errorf("%q - %q: expected\n\t%#v, got \n\t%#v", k, "autoscaling -> v1beta2", tc.scaleStatus2, internal1) } - // v1beta2 -> extensions - internal2 := &extensions.ScaleStatus{} + // v1beta2 -> autoscaling + internal2 := &autoscaling.ScaleStatus{} if err := legacyscheme.Scheme.Convert(tc.scaleStatus2, internal2, nil); err != nil { - t.Errorf("%q - %q: unexpected error: %v", k, "v1beta2 -> extensions", err) + t.Errorf("%q - %q: unexpected error: %v", k, "v1beta2 -> autoscaling", err) } if !apiequality.Semantic.DeepEqual(internal2, tc.scaleStatus1) { - t.Errorf("%q - %q: expected\n\t%+v, got \n\t%+v", k, "v1beta2 -> extensions", tc.scaleStatus1, internal2) + t.Errorf("%q - %q: expected\n\t%+v, got \n\t%+v", k, "v1beta2 -> autoscaling", tc.scaleStatus1, internal2) } } } diff --git a/pkg/apis/apps/v1beta2/doc.go b/pkg/apis/apps/v1beta2/doc.go index 9a0bb581994..6c8f7c3bc01 100644 --- a/pkg/apis/apps/v1beta2/doc.go +++ b/pkg/apis/apps/v1beta2/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions // +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/apps/v1beta2 // +k8s:defaulter-gen=TypeMeta diff --git a/pkg/apis/autoscaling/fuzzer/fuzzer.go b/pkg/apis/autoscaling/fuzzer/fuzzer.go index 9915f8092c2..2c1ea0608ca 100644 --- a/pkg/apis/autoscaling/fuzzer/fuzzer.go +++ b/pkg/apis/autoscaling/fuzzer/fuzzer.go @@ -18,7 +18,9 @@ package fuzzer import ( fuzz "github.com/google/gofuzz" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" @@ -27,6 +29,15 @@ import ( // Funcs returns the fuzzer functions for the autoscaling api group. var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { return []interface{}{ + func(s *autoscaling.ScaleStatus, c fuzz.Continue) { + c.FuzzNoCustom(s) // fuzz self without calling this function again + + // ensure we have a valid selector + metaSelector := &metav1.LabelSelector{} + c.Fuzz(metaSelector) + labelSelector, _ := metav1.LabelSelectorAsSelector(metaSelector) + s.Selector = labelSelector.String() + }, func(s *autoscaling.HorizontalPodAutoscalerSpec, c fuzz.Continue) { c.FuzzNoCustom(s) // fuzz self without calling this function again minReplicas := int32(c.Rand.Int31()) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 0bba0bca2dd..6a127485b4e 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -2725,8 +2725,8 @@ type ReplicationControllerCondition struct { } // +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/extensions.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/extensions.Scale,result=k8s.io/kubernetes/pkg/apis/extensions.Scale +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/autoscaling.Scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ReplicationController represents the configuration of a replication controller. diff --git a/pkg/apis/extensions/register.go b/pkg/apis/extensions/register.go index 717662f48e4..48137fc6962 100644 --- a/pkg/apis/extensions/register.go +++ b/pkg/apis/extensions/register.go @@ -19,6 +19,7 @@ package extensions import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/networking" ) @@ -51,7 +52,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &DeploymentList{}, &DeploymentRollback{}, &ReplicationControllerDummy{}, - &Scale{}, &DaemonSetList{}, &DaemonSet{}, &Ingress{}, @@ -60,6 +60,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ReplicaSetList{}, &PodSecurityPolicy{}, &PodSecurityPolicyList{}, + &autoscaling.Scale{}, &networking.NetworkPolicy{}, &networking.NetworkPolicyList{}, ) diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index 1867fe099be..5e3f43688c5 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -42,44 +42,6 @@ const ( SysctlsPodSecurityPolicyAnnotationKey string = "security.alpha.kubernetes.io/sysctls" ) -// describes the attributes of a scale subresource -type ScaleSpec struct { - // desired number of instances for the scaled object. - // +optional - Replicas int32 -} - -// represents the current status of a scale subresource. -type ScaleStatus struct { - // actual number of observed instances of the scaled object. - Replicas int32 - - // label query over pods that should match the replicas count. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - // +optional - Selector *metav1.LabelSelector -} - -// +genclient -// +genclient:noVerbs -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// represents a scaling request for a resource. -type Scale struct { - metav1.TypeMeta - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - // +optional - metav1.ObjectMeta - - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - Spec ScaleSpec - - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. - // +optional - Status ScaleStatus -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Dummy definition @@ -111,8 +73,8 @@ type CustomMetricCurrentStatusList struct { } // +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/autoscaling.Scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type Deployment struct { @@ -709,8 +671,8 @@ type IngressBackend struct { } // +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/autoscaling.Scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ReplicaSet ensures that a specified number of pod replicas are running at any given time. diff --git a/pkg/apis/extensions/v1beta1/conversion.go b/pkg/apis/extensions/v1beta1/conversion.go index 073aabe4737..d236a415e13 100644 --- a/pkg/apis/extensions/v1beta1/conversion.go +++ b/pkg/apis/extensions/v1beta1/conversion.go @@ -24,8 +24,10 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/kubernetes/pkg/apis/extensions" @@ -35,8 +37,8 @@ import ( func addConversionFuncs(scheme *runtime.Scheme) error { // Add non-generated conversion functions err := scheme.AddConversionFuncs( - Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, - Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus, + Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus, Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec, Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec, Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy, @@ -72,48 +74,35 @@ func addConversionFuncs(scheme *runtime.Scheme) error { return nil } -func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *extensionsv1beta1.ScaleStatus, s conversion.Scope) error { +func Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(in *autoscaling.ScaleStatus, out *extensionsv1beta1.ScaleStatus, s conversion.Scope) error { out.Replicas = int32(in.Replicas) + out.TargetSelector = in.Selector out.Selector = nil - out.TargetSelector = "" - if in.Selector != nil { - if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 { - out.Selector = in.Selector.MatchLabels - } - - selector, err := metav1.LabelSelectorAsSelector(in.Selector) - if err != nil { - return fmt.Errorf("invalid label selector: %v", err) - } - out.TargetSelector = selector.String() + selector, err := metav1.ParseToLabelSelector(in.Selector) + if err != nil { + return fmt.Errorf("failed to parse selector: %v", err) } + if len(selector.MatchExpressions) == 0 { + out.Selector = selector.MatchLabels + } + return nil } -func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *extensionsv1beta1.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(in *extensionsv1beta1.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // Normally when 2 fields map to the same internal value we favor the old field, since - // old clients can't be expected to know about new fields but clients that know about the - // new field can be expected to know about the old field (though that's not quite true, due - // to kubectl apply). However, these fields are readonly, so any non-nil value should work. if in.TargetSelector != "" { - labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector) - if err != nil { - out.Selector = nil - return fmt.Errorf("failed to parse target selector: %v", err) - } - out.Selector = labelSelector + out.Selector = in.TargetSelector } else if in.Selector != nil { - out.Selector = new(metav1.LabelSelector) - selector := make(map[string]string) + set := labels.Set{} for key, val := range in.Selector { - selector[key] = val + set[key] = val } - out.Selector.MatchLabels = selector + out.Selector = labels.SelectorFromSet(set).String() } else { - out.Selector = nil + out.Selector = "" } return nil } diff --git a/pkg/apis/extensions/v1beta1/doc.go b/pkg/apis/extensions/v1beta1/doc.go index fb27eae221a..0d778368f1b 100644 --- a/pkg/apis/extensions/v1beta1/doc.go +++ b/pkg/apis/extensions/v1beta1/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/extensions/v1beta1 // +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/extensions/v1beta1 diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index d97e7bc93c9..1da47041a21 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -522,17 +522,6 @@ func validateIngressBackend(backend *extensions.IngressBackend, fldPath *field.P return allErrs } -func ValidateScale(scale *extensions.Scale) field.ErrorList { - allErrs := field.ErrorList{} - allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&scale.ObjectMeta, true, apivalidation.NameIsDNSSubdomain, field.NewPath("metadata"))...) - - if scale.Spec.Replicas < 0 { - allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "replicas"), scale.Spec.Replicas, "must be greater than or equal to 0")) - } - - return allErrs -} - // ValidateReplicaSetName can be used to check whether the given ReplicaSet // name is valid. // Prefix indicates this name will be used as part of generation, in which case diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index eb514945ce8..55b03c65cba 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -1750,70 +1750,6 @@ func TestValidateIngressStatusUpdate(t *testing.T) { } } -func TestValidateScale(t *testing.T) { - successCases := []extensions.Scale{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "frontend", - Namespace: metav1.NamespaceDefault, - }, - Spec: extensions.ScaleSpec{ - Replicas: 1, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "frontend", - Namespace: metav1.NamespaceDefault, - }, - Spec: extensions.ScaleSpec{ - Replicas: 10, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "frontend", - Namespace: metav1.NamespaceDefault, - }, - Spec: extensions.ScaleSpec{ - Replicas: 0, - }, - }, - } - - for _, successCase := range successCases { - if errs := ValidateScale(&successCase); len(errs) != 0 { - t.Errorf("expected success: %v", errs) - } - } - - errorCases := []struct { - scale extensions.Scale - msg string - }{ - { - scale: extensions.Scale{ - ObjectMeta: metav1.ObjectMeta{ - Name: "frontend", - Namespace: metav1.NamespaceDefault, - }, - Spec: extensions.ScaleSpec{ - Replicas: -1, - }, - }, - msg: "must be greater than or equal to 0", - }, - } - - for _, c := range errorCases { - if errs := ValidateScale(&c.scale); len(errs) == 0 { - t.Errorf("expected failure for %s", c.msg) - } else if !strings.Contains(errs[0].Error(), c.msg) { - t.Errorf("unexpected error: %v, expected: %s", errs[0], c.msg) - } - } -} - func TestValidateReplicaSetStatus(t *testing.T) { tests := []struct { name string diff --git a/pkg/registry/apps/statefulset/storage/storage.go b/pkg/registry/apps/statefulset/storage/storage.go index 6adce290dc4..d97f17270e5 100644 --- a/pkg/registry/apps/statefulset/storage/storage.go +++ b/pkg/registry/apps/statefulset/storage/storage.go @@ -30,9 +30,10 @@ import ( "k8s.io/kubernetes/pkg/apis/apps" appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" appsv1beta2 "k8s.io/kubernetes/pkg/apis/apps/v1beta2" + "k8s.io/kubernetes/pkg/apis/autoscaling" autoscalingv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" + autoscalingvalidation "k8s.io/kubernetes/pkg/apis/autoscaling/validation" "k8s.io/kubernetes/pkg/apis/extensions" - extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/printers" printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" printerstorage "k8s.io/kubernetes/pkg/printers/storage" @@ -141,7 +142,7 @@ func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.Gr // New creates a new Scale object func (r *ScaleREST) New() runtime.Object { - return &extensions.Scale{} + return &autoscaling.Scale{} } func (r *ScaleREST) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { @@ -174,12 +175,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r if obj == nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) } - scale, ok := obj.(*extensions.Scale) + scale, ok := obj.(*autoscaling.Scale) if !ok { return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) } - if errs := extvalidation.ValidateScale(scale); len(errs) > 0 { + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { return nil, false, errors.NewInvalid(extensions.Kind("Scale"), scale.Name, errs) } @@ -197,8 +198,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r } // scaleFromStatefulSet returns a scale subresource for a statefulset. -func scaleFromStatefulSet(ss *apps.StatefulSet) (*extensions.Scale, error) { - return &extensions.Scale{ +func scaleFromStatefulSet(ss *apps.StatefulSet) (*autoscaling.Scale, error) { + selector, err := metav1.LabelSelectorAsSelector(ss.Spec.Selector) + if err != nil { + return nil, err + } + return &autoscaling.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. ObjectMeta: metav1.ObjectMeta{ Name: ss.Name, @@ -207,12 +212,12 @@ func scaleFromStatefulSet(ss *apps.StatefulSet) (*extensions.Scale, error) { ResourceVersion: ss.ResourceVersion, CreationTimestamp: ss.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: ss.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: ss.Status.Replicas, - Selector: ss.Spec.Selector, + Selector: selector.String(), }, }, nil } diff --git a/pkg/registry/apps/statefulset/storage/storage_test.go b/pkg/registry/apps/statefulset/storage/storage_test.go index 50d2f8e35c5..1adaa444805 100644 --- a/pkg/registry/apps/statefulset/storage/storage_test.go +++ b/pkg/registry/apps/statefulset/storage/storage_test.go @@ -30,8 +30,8 @@ import ( "k8s.io/apiserver/pkg/registry/rest" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/apis/apps" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/registrytest" ) @@ -224,7 +224,11 @@ func TestScaleGet(t *testing.T) { t.Fatalf("error setting new statefulset (key: %s) %v: %v", key, validStatefulSet, err) } - want := &extensions.Scale{ + selector, err := metav1.LabelSelectorAsSelector(validStatefulSet.Spec.Selector) + if err != nil { + t.Fatal(err) + } + want := &autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceDefault, @@ -232,16 +236,16 @@ func TestScaleGet(t *testing.T) { ResourceVersion: sts.ResourceVersion, CreationTimestamp: sts.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: validStatefulSet.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: validStatefulSet.Status.Replicas, - Selector: validStatefulSet.Spec.Selector, + Selector: selector.String(), }, } obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) - got := obj.(*extensions.Scale) + got := obj.(*autoscaling.Scale) if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } @@ -264,12 +268,12 @@ func TestScaleUpdate(t *testing.T) { t.Fatalf("error setting new statefulset (key: %s) %v: %v", key, validStatefulSet, err) } replicas := 12 - update := extensions.Scale{ + update := autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceDefault, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: int32(replicas), }, } @@ -282,7 +286,7 @@ func TestScaleUpdate(t *testing.T) { if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } - scale := obj.(*extensions.Scale) + scale := obj.(*autoscaling.Scale) if scale.Spec.Replicas != int32(replicas) { t.Errorf("wrong replicas count expected: %d got: %d", replicas, scale.Spec.Replicas) } diff --git a/pkg/registry/extensions/controller/storage/storage.go b/pkg/registry/extensions/controller/storage/storage.go index dcc97671349..774a78911f0 100644 --- a/pkg/registry/extensions/controller/storage/storage.go +++ b/pkg/registry/extensions/controller/storage/storage.go @@ -21,13 +21,15 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/kubernetes/pkg/apis/autoscaling" + autoscalingvalidation "k8s.io/kubernetes/pkg/apis/autoscaling/validation" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/extensions" - extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/registry/core/replicationcontroller" controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage" ) @@ -58,7 +60,7 @@ var _ = rest.Patcher(&ScaleREST{}) // New creates a new Scale object func (r *ScaleREST) New() runtime.Object { - return &extensions.Scale{} + return &autoscaling.Scale{} } func (r *ScaleREST) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { @@ -81,12 +83,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r if obj == nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) } - scale, ok := obj.(*extensions.Scale) + scale, ok := obj.(*autoscaling.Scale) if !ok { return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) } - if errs := extvalidation.ValidateScale(scale); len(errs) > 0 { + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { return nil, false, errors.NewInvalid(extensions.Kind("Scale"), scale.Name, errs) } @@ -100,8 +102,8 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r } // scaleFromRC returns a scale subresource for a replication controller. -func scaleFromRC(rc *api.ReplicationController) *extensions.Scale { - return &extensions.Scale{ +func scaleFromRC(rc *api.ReplicationController) *autoscaling.Scale { + return &autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: rc.Name, Namespace: rc.Namespace, @@ -109,14 +111,12 @@ func scaleFromRC(rc *api.ReplicationController) *extensions.Scale { ResourceVersion: rc.ResourceVersion, CreationTimestamp: rc.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: rc.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: rc.Status.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: rc.Spec.Selector, - }, + Selector: labels.SelectorFromSet(labels.Set(rc.Spec.Selector)).String(), }, } } diff --git a/pkg/registry/extensions/controller/storage/storage_test.go b/pkg/registry/extensions/controller/storage/storage_test.go index c224e424956..62689035fb4 100644 --- a/pkg/registry/extensions/controller/storage/storage_test.go +++ b/pkg/registry/extensions/controller/storage/storage_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/apiserver/pkg/storage" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" "k8s.io/apiserver/pkg/storage/storagebackend/factory" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/registrytest" ) @@ -74,16 +74,14 @@ var validController = api.ReplicationController{ Spec: validControllerSpec, } -var validScale = extensions.Scale{ +var validScale = autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: validReplicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: 0, - Selector: &metav1.LabelSelector{ - MatchLabels: validPodTemplate.Template.Labels, - }, + Selector: "a=b", }, } @@ -100,7 +98,7 @@ func TestGet(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - scale := obj.(*extensions.Scale) + scale := obj.(*autoscaling.Scale) if scale.Spec.Replicas != validReplicas { t.Errorf("wrong replicas count expected: %d got: %d", validReplicas, scale.Spec.Replicas) } @@ -116,9 +114,9 @@ func TestUpdate(t *testing.T) { t.Fatalf("unexpected error: %v", err) } replicas := int32(12) - update := extensions.Scale{ + update := autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: replicas, }, } @@ -131,7 +129,7 @@ func TestUpdate(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - updated := obj.(*extensions.Scale) + updated := obj.(*autoscaling.Scale) if updated.Spec.Replicas != replicas { t.Errorf("wrong replicas count expected: %d got: %d", replicas, updated.Spec.Replicas) } diff --git a/pkg/registry/extensions/deployment/storage/storage.go b/pkg/registry/extensions/deployment/storage/storage.go index aedccc58bf1..6cf80f8dcc7 100644 --- a/pkg/registry/extensions/deployment/storage/storage.go +++ b/pkg/registry/extensions/deployment/storage/storage.go @@ -32,7 +32,9 @@ import ( storeerr "k8s.io/apiserver/pkg/storage/errors" appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" appsv1beta2 "k8s.io/kubernetes/pkg/apis/apps/v1beta2" + "k8s.io/kubernetes/pkg/apis/autoscaling" autoscalingv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" + autoscalingvalidation "k8s.io/kubernetes/pkg/apis/autoscaling/validation" "k8s.io/kubernetes/pkg/apis/extensions" extensionsv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" @@ -212,7 +214,7 @@ func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.Gr // New creates a new Scale object func (r *ScaleREST) New() runtime.Object { - return &extensions.Scale{} + return &autoscaling.Scale{} } func (r *ScaleREST) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { @@ -245,12 +247,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r if obj == nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) } - scale, ok := obj.(*extensions.Scale) + scale, ok := obj.(*autoscaling.Scale) if !ok { return nil, false, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", obj)) } - if errs := extvalidation.ValidateScale(scale); len(errs) > 0 { + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { return nil, false, errors.NewInvalid(extensions.Kind("Scale"), name, errs) } @@ -268,8 +270,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r } // scaleFromDeployment returns a scale subresource for a deployment. -func scaleFromDeployment(deployment *extensions.Deployment) (*extensions.Scale, error) { - return &extensions.Scale{ +func scaleFromDeployment(deployment *extensions.Deployment) (*autoscaling.Scale, error) { + selector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector) + if err != nil { + return nil, err + } + return &autoscaling.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. ObjectMeta: metav1.ObjectMeta{ Name: deployment.Name, @@ -278,12 +284,12 @@ func scaleFromDeployment(deployment *extensions.Deployment) (*extensions.Scale, ResourceVersion: deployment.ResourceVersion, CreationTimestamp: deployment.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: deployment.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: deployment.Status.Replicas, - Selector: deployment.Spec.Selector, + Selector: selector.String(), }, }, nil } diff --git a/pkg/registry/extensions/deployment/storage/storage_test.go b/pkg/registry/extensions/deployment/storage/storage_test.go index 3bb2d3cb7cc..aa7764b16fd 100644 --- a/pkg/registry/extensions/deployment/storage/storage_test.go +++ b/pkg/registry/extensions/deployment/storage/storage_test.go @@ -34,6 +34,7 @@ import ( "k8s.io/apiserver/pkg/registry/rest" storeerr "k8s.io/apiserver/pkg/storage/errors" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/registrytest" @@ -207,7 +208,11 @@ func TestScaleGet(t *testing.T) { t.Fatalf("error setting new deployment (key: %s) %v: %v", key, validDeployment, err) } - want := &extensions.Scale{ + selector, err := metav1.LabelSelectorAsSelector(validDeployment.Spec.Selector) + if err != nil { + t.Fatal(err) + } + want := &autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -215,19 +220,19 @@ func TestScaleGet(t *testing.T) { ResourceVersion: deployment.ResourceVersion, CreationTimestamp: deployment.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: validDeployment.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: validDeployment.Status.Replicas, - Selector: validDeployment.Spec.Selector, + Selector: selector.String(), }, } obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } - got := obj.(*extensions.Scale) + got := obj.(*autoscaling.Scale) if !apiequality.Semantic.DeepEqual(want, got) { t.Errorf("unexpected scale: %s", diff.ObjectDiff(want, got)) } @@ -244,9 +249,9 @@ func TestScaleUpdate(t *testing.T) { t.Fatalf("error setting new deployment (key: %s) %v: %v", key, validDeployment, err) } replicas := int32(12) - update := extensions.Scale{ + update := autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: replicas, }, } @@ -258,7 +263,7 @@ func TestScaleUpdate(t *testing.T) { if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } - scale := obj.(*extensions.Scale) + scale := obj.(*autoscaling.Scale) if scale.Spec.Replicas != replicas { t.Errorf("wrong replicas count expected: %d got: %d", replicas, deployment.Spec.Replicas) } diff --git a/pkg/registry/extensions/replicaset/storage/storage.go b/pkg/registry/extensions/replicaset/storage/storage.go index de513a337a9..893e66390da 100644 --- a/pkg/registry/extensions/replicaset/storage/storage.go +++ b/pkg/registry/extensions/replicaset/storage/storage.go @@ -31,10 +31,11 @@ import ( "k8s.io/apiserver/pkg/registry/rest" appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" appsv1beta2 "k8s.io/kubernetes/pkg/apis/apps/v1beta2" + "k8s.io/kubernetes/pkg/apis/autoscaling" autoscalingv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" + autoscalingvalidation "k8s.io/kubernetes/pkg/apis/autoscaling/validation" "k8s.io/kubernetes/pkg/apis/extensions" extensionsv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/printers" printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" printerstorage "k8s.io/kubernetes/pkg/printers/storage" @@ -146,7 +147,7 @@ func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.Gr // New creates a new Scale object func (r *ScaleREST) New() runtime.Object { - return &extensions.Scale{} + return &autoscaling.Scale{} } func (r *ScaleREST) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { @@ -180,12 +181,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r if obj == nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) } - scale, ok := obj.(*extensions.Scale) + scale, ok := obj.(*autoscaling.Scale) if !ok { return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) } - if errs := extvalidation.ValidateScale(scale); len(errs) > 0 { + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { return nil, false, errors.NewInvalid(extensions.Kind("Scale"), scale.Name, errs) } @@ -203,8 +204,12 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r } // scaleFromReplicaSet returns a scale subresource for a replica set. -func scaleFromReplicaSet(rs *extensions.ReplicaSet) (*extensions.Scale, error) { - return &extensions.Scale{ +func scaleFromReplicaSet(rs *extensions.ReplicaSet) (*autoscaling.Scale, error) { + selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) + if err != nil { + return nil, err + } + return &autoscaling.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. ObjectMeta: metav1.ObjectMeta{ Name: rs.Name, @@ -213,12 +218,12 @@ func scaleFromReplicaSet(rs *extensions.ReplicaSet) (*extensions.Scale, error) { ResourceVersion: rs.ResourceVersion, CreationTimestamp: rs.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: rs.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: rs.Status.Replicas, - Selector: rs.Spec.Selector, + Selector: selector.String(), }, }, nil } diff --git a/pkg/registry/extensions/replicaset/storage/storage_test.go b/pkg/registry/extensions/replicaset/storage/storage_test.go index 96fcfd664fa..a501099c5a1 100644 --- a/pkg/registry/extensions/replicaset/storage/storage_test.go +++ b/pkg/registry/extensions/replicaset/storage/storage_test.go @@ -30,6 +30,7 @@ import ( "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" + "k8s.io/kubernetes/pkg/apis/autoscaling" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/registrytest" @@ -261,7 +262,12 @@ func TestScaleGet(t *testing.T) { t.Fatalf("error setting new replica set (key: %s) %v: %v", key, validReplicaSet, err) } - want := &extensions.Scale{ + selector, err := metav1.LabelSelectorAsSelector(validReplicaSet.Spec.Selector) + if err != nil { + t.Fatal(err) + } + + want := &autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceDefault, @@ -269,16 +275,16 @@ func TestScaleGet(t *testing.T) { ResourceVersion: rs.ResourceVersion, CreationTimestamp: rs.CreationTimestamp, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: validReplicaSet.Spec.Replicas, }, - Status: extensions.ScaleStatus{ + Status: autoscaling.ScaleStatus{ Replicas: validReplicaSet.Status.Replicas, - Selector: validReplicaSet.Spec.Selector, + Selector: selector.String(), }, } obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) - got := obj.(*extensions.Scale) + got := obj.(*autoscaling.Scale) if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } @@ -301,12 +307,12 @@ func TestScaleUpdate(t *testing.T) { t.Fatalf("error setting new replica set (key: %s) %v: %v", key, validReplicaSet, err) } replicas := 12 - update := extensions.Scale{ + update := autoscaling.Scale{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceDefault, }, - Spec: extensions.ScaleSpec{ + Spec: autoscaling.ScaleSpec{ Replicas: int32(replicas), }, } @@ -319,7 +325,7 @@ func TestScaleUpdate(t *testing.T) { if err != nil { t.Fatalf("error fetching scale for %s: %v", name, err) } - scale := obj.(*extensions.Scale) + scale := obj.(*autoscaling.Scale) if scale.Spec.Replicas != int32(replicas) { t.Errorf("wrong replicas count expected: %d got: %d", replicas, scale.Spec.Replicas) } From f927f2ab895cd8f4855f4f21949d737e747a3aec Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 9 Nov 2017 12:13:25 -0500 Subject: [PATCH 2/4] generated files --- pkg/apis/apps/BUILD | 1 + pkg/apis/apps/v1beta1/BUILD | 2 + .../apps/v1beta1/zz_generated.conversion.go | 61 ++++++------ pkg/apis/apps/v1beta2/BUILD | 3 + .../apps/v1beta2/zz_generated.conversion.go | 61 ++++++------ pkg/apis/autoscaling/fuzzer/BUILD | 1 + pkg/apis/extensions/BUILD | 1 + pkg/apis/extensions/v1beta1/BUILD | 2 + .../v1beta1/zz_generated.conversion.go | 61 ++++++------ pkg/apis/extensions/zz_generated.deepcopy.go | 82 ---------------- .../typed/apps/internalversion/BUILD | 2 +- .../typed/apps/internalversion/fake/BUILD | 2 +- .../internalversion/fake/fake_statefulset.go | 14 +-- .../typed/apps/internalversion/statefulset.go | 16 ++-- .../typed/core/internalversion/BUILD | 2 +- .../typed/core/internalversion/fake/BUILD | 2 +- .../fake/fake_replicationcontroller.go | 14 +-- .../internalversion/replicationcontroller.go | 16 ++-- .../typed/extensions/internalversion/BUILD | 5 +- .../extensions/internalversion/deployment.go | 15 +-- .../internalversion/extensions_client.go | 5 - .../extensions/internalversion/fake/BUILD | 3 +- .../internalversion/fake/fake_deployment.go | 13 +-- .../fake/fake_extensions_client.go | 4 - .../internalversion/fake/fake_replicaset.go | 13 +-- .../internalversion/fake/fake_scale.go | 23 ----- .../fake/fake_scale_expansion.go | 47 ---------- .../extensions/internalversion/replicaset.go | 15 +-- .../typed/extensions/internalversion/scale.go | 46 --------- .../internalversion/scale_expansion.go | 65 ------------- .../listers/extensions/internalversion/BUILD | 1 - .../internalversion/expansion_generated.go | 8 -- .../extensions/internalversion/scale.go | 94 ------------------- pkg/registry/apps/statefulset/storage/BUILD | 5 +- .../extensions/controller/storage/BUILD | 6 +- .../extensions/deployment/storage/BUILD | 3 + .../extensions/replicaset/storage/BUILD | 4 +- 37 files changed, 182 insertions(+), 536 deletions(-) delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale.go delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale_expansion.go delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go delete mode 100644 pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale_expansion.go delete mode 100644 pkg/client/listers/extensions/internalversion/scale.go diff --git a/pkg/apis/apps/BUILD b/pkg/apis/apps/BUILD index c22d0acc395..2b3c1bbe962 100644 --- a/pkg/apis/apps/BUILD +++ b/pkg/apis/apps/BUILD @@ -15,6 +15,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/apis/apps", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/extensions:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/pkg/apis/apps/v1beta1/BUILD b/pkg/apis/apps/v1beta1/BUILD index be95b063df3..920dcdc49a7 100644 --- a/pkg/apis/apps/v1beta1/BUILD +++ b/pkg/apis/apps/v1beta1/BUILD @@ -19,6 +19,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/apps/v1beta1", deps = [ "//pkg/apis/apps:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1:go_default_library", "//pkg/apis/extensions:go_default_library", @@ -26,6 +27,7 @@ go_library( "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", diff --git a/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 365a03c93cd..bc7257f9c9d 100644 --- a/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -27,6 +27,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apps "k8s.io/kubernetes/pkg/apis/apps" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/apis/core" core_v1 "k8s.io/kubernetes/pkg/apis/core/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" @@ -65,12 +66,12 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment, Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy, Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy, - Convert_v1beta1_Scale_To_extensions_Scale, - Convert_extensions_Scale_To_v1beta1_Scale, - Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec, - Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec, - Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, - Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, + Convert_v1beta1_Scale_To_autoscaling_Scale, + Convert_autoscaling_Scale_To_v1beta1_Scale, + Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec, + Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec, + Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus, Convert_v1beta1_StatefulSet_To_apps_StatefulSet, Convert_apps_StatefulSet_To_v1beta1_StatefulSet, Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList, @@ -442,68 +443,68 @@ func Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateState return autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in, out, s) } -func autoConvert_v1beta1_Scale_To_extensions_Scale(in *v1beta1.Scale, out *extensions.Scale, s conversion.Scope) error { +func autoConvert_v1beta1_Scale_To_autoscaling_Scale(in *v1beta1.Scale, out *autoscaling.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1beta1_Scale_To_extensions_Scale is an autogenerated conversion function. -func Convert_v1beta1_Scale_To_extensions_Scale(in *v1beta1.Scale, out *extensions.Scale, s conversion.Scope) error { - return autoConvert_v1beta1_Scale_To_extensions_Scale(in, out, s) +// Convert_v1beta1_Scale_To_autoscaling_Scale is an autogenerated conversion function. +func Convert_v1beta1_Scale_To_autoscaling_Scale(in *v1beta1.Scale, out *autoscaling.Scale, s conversion.Scope) error { + return autoConvert_v1beta1_Scale_To_autoscaling_Scale(in, out, s) } -func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *v1beta1.Scale, s conversion.Scope) error { +func autoConvert_autoscaling_Scale_To_v1beta1_Scale(in *autoscaling.Scale, out *v1beta1.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_extensions_Scale_To_v1beta1_Scale is an autogenerated conversion function. -func Convert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *v1beta1.Scale, s conversion.Scope) error { - return autoConvert_extensions_Scale_To_v1beta1_Scale(in, out, s) +// Convert_autoscaling_Scale_To_v1beta1_Scale is an autogenerated conversion function. +func Convert_autoscaling_Scale_To_v1beta1_Scale(in *autoscaling.Scale, out *v1beta1.Scale, s conversion.Scope) error { + return autoConvert_autoscaling_Scale_To_v1beta1_Scale(in, out, s) } -func autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *v1beta1.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { +func autoConvert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta1.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec is an autogenerated conversion function. -func Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *v1beta1.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { - return autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in, out, s) +// Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec is an autogenerated conversion function. +func Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta1.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s) } -func autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function. -func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { - return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s) +// Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function. +func Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { + return autoConvert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s) } -func autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *v1beta1.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func autoConvert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(in *v1beta1.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector) + // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs string) // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type return nil } -func autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *v1beta1.ScaleStatus, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(in *autoscaling.ScaleStatus, out *v1beta1.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string) + // WARNING: in.Selector requires manual conversion: inconvertible types (string vs map[string]string) return nil } diff --git a/pkg/apis/apps/v1beta2/BUILD b/pkg/apis/apps/v1beta2/BUILD index a7ae04fb657..b27e6f362ce 100644 --- a/pkg/apis/apps/v1beta2/BUILD +++ b/pkg/apis/apps/v1beta2/BUILD @@ -19,6 +19,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/apps/v1beta2", deps = [ "//pkg/apis/apps:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1:go_default_library", "//pkg/apis/extensions:go_default_library", @@ -26,6 +27,7 @@ go_library( "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", @@ -57,6 +59,7 @@ go_test( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/install:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/install:go_default_library", "//pkg/apis/extensions:go_default_library", diff --git a/pkg/apis/apps/v1beta2/zz_generated.conversion.go b/pkg/apis/apps/v1beta2/zz_generated.conversion.go index 84b68f3c7d9..3320ae198de 100644 --- a/pkg/apis/apps/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/apps/v1beta2/zz_generated.conversion.go @@ -27,6 +27,7 @@ import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" apps "k8s.io/kubernetes/pkg/apis/apps" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/apis/core" core_v1 "k8s.io/kubernetes/pkg/apis/core/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" @@ -85,12 +86,12 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_RollingUpdateDeployment_To_v1beta2_RollingUpdateDeployment, Convert_v1beta2_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy, Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta2_RollingUpdateStatefulSetStrategy, - Convert_v1beta2_Scale_To_extensions_Scale, - Convert_extensions_Scale_To_v1beta2_Scale, - Convert_v1beta2_ScaleSpec_To_extensions_ScaleSpec, - Convert_extensions_ScaleSpec_To_v1beta2_ScaleSpec, - Convert_v1beta2_ScaleStatus_To_extensions_ScaleStatus, - Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus, + Convert_v1beta2_Scale_To_autoscaling_Scale, + Convert_autoscaling_Scale_To_v1beta2_Scale, + Convert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec, + Convert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec, + Convert_v1beta2_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta2_ScaleStatus, Convert_v1beta2_StatefulSet_To_apps_StatefulSet, Convert_apps_StatefulSet_To_v1beta2_StatefulSet, Convert_v1beta2_StatefulSetList_To_apps_StatefulSetList, @@ -754,68 +755,68 @@ func Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta2_RollingUpdateState return autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta2_RollingUpdateStatefulSetStrategy(in, out, s) } -func autoConvert_v1beta2_Scale_To_extensions_Scale(in *v1beta2.Scale, out *extensions.Scale, s conversion.Scope) error { +func autoConvert_v1beta2_Scale_To_autoscaling_Scale(in *v1beta2.Scale, out *autoscaling.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta2_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1beta2_ScaleStatus_To_extensions_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta2_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1beta2_Scale_To_extensions_Scale is an autogenerated conversion function. -func Convert_v1beta2_Scale_To_extensions_Scale(in *v1beta2.Scale, out *extensions.Scale, s conversion.Scope) error { - return autoConvert_v1beta2_Scale_To_extensions_Scale(in, out, s) +// Convert_v1beta2_Scale_To_autoscaling_Scale is an autogenerated conversion function. +func Convert_v1beta2_Scale_To_autoscaling_Scale(in *v1beta2.Scale, out *autoscaling.Scale, s conversion.Scope) error { + return autoConvert_v1beta2_Scale_To_autoscaling_Scale(in, out, s) } -func autoConvert_extensions_Scale_To_v1beta2_Scale(in *extensions.Scale, out *v1beta2.Scale, s conversion.Scope) error { +func autoConvert_autoscaling_Scale_To_v1beta2_Scale(in *autoscaling.Scale, out *v1beta2.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_extensions_ScaleSpec_To_v1beta2_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_autoscaling_ScaleStatus_To_v1beta2_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_extensions_Scale_To_v1beta2_Scale is an autogenerated conversion function. -func Convert_extensions_Scale_To_v1beta2_Scale(in *extensions.Scale, out *v1beta2.Scale, s conversion.Scope) error { - return autoConvert_extensions_Scale_To_v1beta2_Scale(in, out, s) +// Convert_autoscaling_Scale_To_v1beta2_Scale is an autogenerated conversion function. +func Convert_autoscaling_Scale_To_v1beta2_Scale(in *autoscaling.Scale, out *v1beta2.Scale, s conversion.Scope) error { + return autoConvert_autoscaling_Scale_To_v1beta2_Scale(in, out, s) } -func autoConvert_v1beta2_ScaleSpec_To_extensions_ScaleSpec(in *v1beta2.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { +func autoConvert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta2.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_v1beta2_ScaleSpec_To_extensions_ScaleSpec is an autogenerated conversion function. -func Convert_v1beta2_ScaleSpec_To_extensions_ScaleSpec(in *v1beta2.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { - return autoConvert_v1beta2_ScaleSpec_To_extensions_ScaleSpec(in, out, s) +// Convert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec is an autogenerated conversion function. +func Convert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta2.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { + return autoConvert_v1beta2_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s) } -func autoConvert_extensions_ScaleSpec_To_v1beta2_ScaleSpec(in *extensions.ScaleSpec, out *v1beta2.ScaleSpec, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta2.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_extensions_ScaleSpec_To_v1beta2_ScaleSpec is an autogenerated conversion function. -func Convert_extensions_ScaleSpec_To_v1beta2_ScaleSpec(in *extensions.ScaleSpec, out *v1beta2.ScaleSpec, s conversion.Scope) error { - return autoConvert_extensions_ScaleSpec_To_v1beta2_ScaleSpec(in, out, s) +// Convert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec is an autogenerated conversion function. +func Convert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta2.ScaleSpec, s conversion.Scope) error { + return autoConvert_autoscaling_ScaleSpec_To_v1beta2_ScaleSpec(in, out, s) } -func autoConvert_v1beta2_ScaleStatus_To_extensions_ScaleStatus(in *v1beta2.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func autoConvert_v1beta2_ScaleStatus_To_autoscaling_ScaleStatus(in *v1beta2.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector) + // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs string) // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type return nil } -func autoConvert_extensions_ScaleStatus_To_v1beta2_ScaleStatus(in *extensions.ScaleStatus, out *v1beta2.ScaleStatus, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleStatus_To_v1beta2_ScaleStatus(in *autoscaling.ScaleStatus, out *v1beta2.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string) + // WARNING: in.Selector requires manual conversion: inconvertible types (string vs map[string]string) return nil } diff --git a/pkg/apis/autoscaling/fuzzer/BUILD b/pkg/apis/autoscaling/fuzzer/BUILD index e2da9eea761..ae20853a342 100644 --- a/pkg/apis/autoscaling/fuzzer/BUILD +++ b/pkg/apis/autoscaling/fuzzer/BUILD @@ -14,6 +14,7 @@ go_library( "//pkg/apis/core:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", ], ) diff --git a/pkg/apis/extensions/BUILD b/pkg/apis/extensions/BUILD index 4a42a641792..4150050b3ce 100644 --- a/pkg/apis/extensions/BUILD +++ b/pkg/apis/extensions/BUILD @@ -24,6 +24,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/apis/extensions", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/networking:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/pkg/apis/extensions/v1beta1/BUILD b/pkg/apis/extensions/v1beta1/BUILD index 8d70b3b2ce1..51d6bf1c77a 100644 --- a/pkg/apis/extensions/v1beta1/BUILD +++ b/pkg/apis/extensions/v1beta1/BUILD @@ -18,6 +18,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/apis/extensions/v1beta1", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1:go_default_library", "//pkg/apis/extensions:go_default_library", @@ -26,6 +27,7 @@ go_library( "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", diff --git a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index 845e7bbf9bf..0f948a696c7 100644 --- a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -26,6 +26,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/apis/core" core_v1 "k8s.io/kubernetes/pkg/apis/core/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" @@ -128,12 +129,12 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions, Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions, Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions, - Convert_v1beta1_Scale_To_extensions_Scale, - Convert_extensions_Scale_To_v1beta1_Scale, - Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec, - Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec, - Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, - Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, + Convert_v1beta1_Scale_To_autoscaling_Scale, + Convert_autoscaling_Scale_To_v1beta1_Scale, + Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec, + Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec, + Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus, + Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus, Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions, Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions, ) @@ -1390,68 +1391,68 @@ func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions return autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in, out, s) } -func autoConvert_v1beta1_Scale_To_extensions_Scale(in *v1beta1.Scale, out *extensions.Scale, s conversion.Scope) error { +func autoConvert_v1beta1_Scale_To_autoscaling_Scale(in *v1beta1.Scale, out *autoscaling.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1beta1_Scale_To_extensions_Scale is an autogenerated conversion function. -func Convert_v1beta1_Scale_To_extensions_Scale(in *v1beta1.Scale, out *extensions.Scale, s conversion.Scope) error { - return autoConvert_v1beta1_Scale_To_extensions_Scale(in, out, s) +// Convert_v1beta1_Scale_To_autoscaling_Scale is an autogenerated conversion function. +func Convert_v1beta1_Scale_To_autoscaling_Scale(in *v1beta1.Scale, out *autoscaling.Scale, s conversion.Scope) error { + return autoConvert_v1beta1_Scale_To_autoscaling_Scale(in, out, s) } -func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *v1beta1.Scale, s conversion.Scope) error { +func autoConvert_autoscaling_Scale_To_v1beta1_Scale(in *autoscaling.Scale, out *v1beta1.Scale, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_extensions_Scale_To_v1beta1_Scale is an autogenerated conversion function. -func Convert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *v1beta1.Scale, s conversion.Scope) error { - return autoConvert_extensions_Scale_To_v1beta1_Scale(in, out, s) +// Convert_autoscaling_Scale_To_v1beta1_Scale is an autogenerated conversion function. +func Convert_autoscaling_Scale_To_v1beta1_Scale(in *autoscaling.Scale, out *v1beta1.Scale, s conversion.Scope) error { + return autoConvert_autoscaling_Scale_To_v1beta1_Scale(in, out, s) } -func autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *v1beta1.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { +func autoConvert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta1.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec is an autogenerated conversion function. -func Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *v1beta1.ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error { - return autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in, out, s) +// Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec is an autogenerated conversion function. +func Convert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in *v1beta1.ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s) } -func autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { out.Replicas = in.Replicas return nil } -// Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function. -func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { - return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s) +// Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function. +func Convert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in *autoscaling.ScaleSpec, out *v1beta1.ScaleSpec, s conversion.Scope) error { + return autoConvert_autoscaling_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s) } -func autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *v1beta1.ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error { +func autoConvert_v1beta1_ScaleStatus_To_autoscaling_ScaleStatus(in *v1beta1.ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector) + // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs string) // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type return nil } -func autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *v1beta1.ScaleStatus, s conversion.Scope) error { +func autoConvert_autoscaling_ScaleStatus_To_v1beta1_ScaleStatus(in *autoscaling.ScaleStatus, out *v1beta1.ScaleStatus, s conversion.Scope) error { out.Replicas = in.Replicas - // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string) + // WARNING: in.Selector requires manual conversion: inconvertible types (string vs map[string]string) return nil } diff --git a/pkg/apis/extensions/zz_generated.deepcopy.go b/pkg/apis/extensions/zz_generated.deepcopy.go index 99c53b41376..755318ab707 100644 --- a/pkg/apis/extensions/zz_generated.deepcopy.go +++ b/pkg/apis/extensions/zz_generated.deepcopy.go @@ -218,18 +218,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { in.(*SELinuxStrategyOptions).DeepCopyInto(out.(*SELinuxStrategyOptions)) return nil }, InType: reflect.TypeOf(&SELinuxStrategyOptions{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*Scale).DeepCopyInto(out.(*Scale)) - return nil - }, InType: reflect.TypeOf(&Scale{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ScaleSpec).DeepCopyInto(out.(*ScaleSpec)) - return nil - }, InType: reflect.TypeOf(&ScaleSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ScaleStatus).DeepCopyInto(out.(*ScaleStatus)) - return nil - }, InType: reflect.TypeOf(&ScaleStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { in.(*SupplementalGroupsStrategyOptions).DeepCopyInto(out.(*SupplementalGroupsStrategyOptions)) return nil @@ -1399,76 +1387,6 @@ func (in *SELinuxStrategyOptions) DeepCopy() *SELinuxStrategyOptions { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Scale) DeepCopyInto(out *Scale) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale. -func (in *Scale) DeepCopy() *Scale { - if in == nil { - return nil - } - out := new(Scale) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Scale) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec. -func (in *ScaleSpec) DeepCopy() *ScaleSpec { - if in == nil { - return nil - } - out := new(ScaleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleStatus. -func (in *ScaleStatus) DeepCopy() *ScaleStatus { - if in == nil { - return nil - } - out := new(ScaleStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SupplementalGroupsStrategyOptions) DeepCopyInto(out *SupplementalGroupsStrategyOptions) { *out = *in diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD index 9435fcd5131..e3fad87bee9 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD @@ -17,7 +17,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion", deps = [ "//pkg/apis/apps:go_default_library", - "//pkg/apis/extensions:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD index b124ea57859..ecee8ae0d4a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD @@ -16,7 +16,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake", deps = [ "//pkg/apis/apps:go_default_library", - "//pkg/apis/extensions:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go index df41c42aa99..680142275d4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go @@ -24,7 +24,7 @@ import ( watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" apps "k8s.io/kubernetes/pkg/apis/apps" - extensions "k8s.io/kubernetes/pkg/apis/extensions" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" ) // FakeStatefulSets implements StatefulSetInterface @@ -139,23 +139,23 @@ func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, s } // GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *extensions.Scale, err error) { +func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &extensions.Scale{}) + Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *extensions.Scale) (result *extensions.Scale, err error) { +func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &extensions.Scale{}) + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } diff --git a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go index 85ee4bd86aa..ae64cc00881 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go @@ -22,7 +22,7 @@ import ( watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" apps "k8s.io/kubernetes/pkg/apis/apps" - extensions "k8s.io/kubernetes/pkg/apis/extensions" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" ) @@ -43,8 +43,8 @@ type StatefulSetInterface interface { List(opts v1.ListOptions) (*apps.StatefulSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) - GetScale(statefulSetName string, options v1.GetOptions) (*extensions.Scale, error) - UpdateScale(statefulSetName string, scale *extensions.Scale) (*extensions.Scale, error) + GetScale(statefulSetName string, options v1.GetOptions) (*autoscaling.Scale, error) + UpdateScale(statefulSetName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) StatefulSetExpansion } @@ -175,9 +175,9 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre return } -// GetScale takes name of the statefulSet, and returns the corresponding extensions.Scale object, and an error if there is any. -func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +// GetScale takes name of the statefulSet, and returns the corresponding autoscaling.Scale object, and an error if there is any. +func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Get(). Namespace(c.ns). Resource("statefulsets"). @@ -190,8 +190,8 @@ func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) ( } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *statefulSets) UpdateScale(statefulSetName string, scale *extensions.Scale) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +func (c *statefulSets) UpdateScale(statefulSetName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD index 09ae4505512..ad0e9695a54 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD @@ -37,9 +37,9 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/api/ref:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1:go_default_library", - "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD index 44f814cd30c..e1c87b0aa70 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD @@ -34,8 +34,8 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", - "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go index 38570fbb1e6..9e14923e84d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go @@ -23,8 +23,8 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/apis/core" - extensions "k8s.io/kubernetes/pkg/apis/extensions" ) // FakeReplicationControllers implements ReplicationControllerInterface @@ -139,23 +139,23 @@ func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data } // GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *extensions.Scale, err error) { +func (c *FakeReplicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &extensions.Scale{}) + Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicationControllers) UpdateScale(replicationControllerName string, scale *extensions.Scale) (result *extensions.Scale, err error) { +func (c *FakeReplicationControllers) UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &extensions.Scale{}) + Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go index 0b4acff12c2..5c787f7764c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go @@ -21,8 +21,8 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/apis/core" - extensions "k8s.io/kubernetes/pkg/apis/extensions" scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" ) @@ -43,8 +43,8 @@ type ReplicationControllerInterface interface { List(opts v1.ListOptions) (*core.ReplicationControllerList, error) Watch(opts v1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core.ReplicationController, err error) - GetScale(replicationControllerName string, options v1.GetOptions) (*extensions.Scale, error) - UpdateScale(replicationControllerName string, scale *extensions.Scale) (*extensions.Scale, error) + GetScale(replicationControllerName string, options v1.GetOptions) (*autoscaling.Scale, error) + UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) ReplicationControllerExpansion } @@ -175,9 +175,9 @@ func (c *replicationControllers) Patch(name string, pt types.PatchType, data []b return } -// GetScale takes name of the replicationController, and returns the corresponding extensions.Scale object, and an error if there is any. -func (c *replicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +// GetScale takes name of the replicationController, and returns the corresponding autoscaling.Scale object, and an error if there is any. +func (c *replicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Get(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -190,8 +190,8 @@ func (c *replicationControllers) GetScale(replicationControllerName string, opti } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicationControllers) UpdateScale(replicationControllerName string, scale *extensions.Scale) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +func (c *replicationControllers) UpdateScale(replicationControllerName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD index d48b7d46993..85d27b16516 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD @@ -17,16 +17,13 @@ go_library( "ingress.go", "podsecuritypolicy.go", "replicaset.go", - "scale.go", - "scale_expansion.go", ], importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/scheme:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go index 32213751782..919ab32e2ae 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go @@ -21,6 +21,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" extensions "k8s.io/kubernetes/pkg/apis/extensions" scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" ) @@ -42,8 +43,8 @@ type DeploymentInterface interface { List(opts v1.ListOptions) (*extensions.DeploymentList, error) Watch(opts v1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) - GetScale(deploymentName string, options v1.GetOptions) (*extensions.Scale, error) - UpdateScale(deploymentName string, scale *extensions.Scale) (*extensions.Scale, error) + GetScale(deploymentName string, options v1.GetOptions) (*autoscaling.Scale, error) + UpdateScale(deploymentName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) DeploymentExpansion } @@ -174,9 +175,9 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres return } -// GetScale takes name of the deployment, and returns the corresponding extensions.Scale object, and an error if there is any. -func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +// GetScale takes name of the deployment, and returns the corresponding autoscaling.Scale object, and an error if there is any. +func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Get(). Namespace(c.ns). Resource("deployments"). @@ -189,8 +190,8 @@ func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (re } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *deployments) UpdateScale(deploymentName string, scale *extensions.Scale) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +func (c *deployments) UpdateScale(deploymentName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go index f3bbaf4fc13..1a26d5d3028 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go @@ -28,7 +28,6 @@ type ExtensionsInterface interface { IngressesGetter PodSecurityPoliciesGetter ReplicaSetsGetter - ScalesGetter } // ExtensionsClient is used to interact with features provided by the extensions group. @@ -56,10 +55,6 @@ func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface { return newReplicaSets(c, namespace) } -func (c *ExtensionsClient) Scales(namespace string) ScaleInterface { - return newScales(c, namespace) -} - // NewForConfig creates a new ExtensionsClient for the given config. func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { config := *c diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD index 0fcaf57240e..91755daa631 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD @@ -16,11 +16,10 @@ go_library( "fake_ingress.go", "fake_podsecuritypolicy.go", "fake_replicaset.go", - "fake_scale.go", - "fake_scale_expansion.go", ], importpath = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go index be65113bbaf..73d8730c16f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go @@ -23,6 +23,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" extensions "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -138,23 +139,23 @@ func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any. -func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) (result *extensions.Scale, err error) { +func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &extensions.Scale{}) + Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeDeployments) UpdateScale(deploymentName string, scale *extensions.Scale) (result *extensions.Scale, err error) { +func (c *FakeDeployments) UpdateScale(deploymentName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &extensions.Scale{}) + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go index edbce063e98..1032452a79e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go @@ -46,10 +46,6 @@ func (c *FakeExtensions) ReplicaSets(namespace string) internalversion.ReplicaSe return &FakeReplicaSets{c, namespace} } -func (c *FakeExtensions) Scales(namespace string) internalversion.ScaleInterface { - return &FakeScales{c, namespace} -} - // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeExtensions) RESTClient() rest.Interface { diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go index 37ed3661ad7..3a5a59f1160 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go @@ -23,6 +23,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" extensions "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -138,23 +139,23 @@ func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, su } // GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any. -func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *extensions.Scale, err error) { +func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &extensions.Scale{}) + Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeReplicaSets) UpdateScale(replicaSetName string, scale *extensions.Scale) (result *extensions.Scale, err error) { +func (c *FakeReplicaSets) UpdateScale(replicaSetName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &extensions.Scale{}) + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscaling.Scale{}) if obj == nil { return nil, err } - return obj.(*extensions.Scale), err + return obj.(*autoscaling.Scale), err } diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale.go deleted file mode 100644 index 2d2eb4f6e43..00000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -// FakeScales implements ScaleInterface -type FakeScales struct { - Fake *FakeExtensions - ns string -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale_expansion.go deleted file mode 100644 index 4b9413322a0..00000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_scale_expansion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - core "k8s.io/client-go/testing" - "k8s.io/kubernetes/pkg/apis/extensions" -) - -func (c *FakeScales) Get(kind string, name string) (result *extensions.Scale, err error) { - action := core.GetActionImpl{} - action.Verb = "get" - action.Namespace = c.ns - action.Resource = schema.GroupVersionResource{Resource: kind} - action.Subresource = "scale" - action.Name = name - obj, err := c.Fake.Invokes(action, &extensions.Scale{}) - result = obj.(*extensions.Scale) - return -} - -func (c *FakeScales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) { - action := core.UpdateActionImpl{} - action.Verb = "update" - action.Namespace = c.ns - action.Resource = schema.GroupVersionResource{Resource: kind} - action.Subresource = "scale" - action.Object = scale - obj, err := c.Fake.Invokes(action, scale) - result = obj.(*extensions.Scale) - return -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go index d6debe65fc2..5da973b7168 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go @@ -21,6 +21,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" extensions "k8s.io/kubernetes/pkg/apis/extensions" scheme "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/scheme" ) @@ -42,8 +43,8 @@ type ReplicaSetInterface interface { List(opts v1.ListOptions) (*extensions.ReplicaSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) - GetScale(replicaSetName string, options v1.GetOptions) (*extensions.Scale, error) - UpdateScale(replicaSetName string, scale *extensions.Scale) (*extensions.Scale, error) + GetScale(replicaSetName string, options v1.GetOptions) (*autoscaling.Scale, error) + UpdateScale(replicaSetName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) ReplicaSetExpansion } @@ -174,9 +175,9 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres return } -// GetScale takes name of the replicaSet, and returns the corresponding extensions.Scale object, and an error if there is any. -func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +// GetScale takes name of the replicaSet, and returns the corresponding autoscaling.Scale object, and an error if there is any. +func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Get(). Namespace(c.ns). Resource("replicasets"). @@ -189,8 +190,8 @@ func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (re } // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *replicaSets) UpdateScale(replicaSetName string, scale *extensions.Scale) (result *extensions.Scale, err error) { - result = &extensions.Scale{} +func (c *replicaSets) UpdateScale(replicaSetName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go deleted file mode 100644 index ad1d91b015b..00000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package internalversion - -import ( - rest "k8s.io/client-go/rest" -) - -// ScalesGetter has a method to return a ScaleInterface. -// A group's client should implement this interface. -type ScalesGetter interface { - Scales(namespace string) ScaleInterface -} - -// ScaleInterface has methods to work with Scale resources. -type ScaleInterface interface { - ScaleExpansion -} - -// scales implements ScaleInterface -type scales struct { - client rest.Interface - ns string -} - -// newScales returns a Scales -func newScales(c *ExtensionsClient, namespace string) *scales { - return &scales{ - client: c.RESTClient(), - ns: namespace, - } -} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale_expansion.go deleted file mode 100644 index e5f2242a8d5..00000000000 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale_expansion.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package internalversion - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/apis/extensions" -) - -// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface. -type ScaleExpansion interface { - Get(kind string, name string) (*extensions.Scale, error) - Update(kind string, scale *extensions.Scale) (*extensions.Scale, error) -} - -// Get takes the reference to scale subresource and returns the subresource or error, if one occurs. -func (c *scales) Get(kind string, name string) (result *extensions.Scale, err error) { - result = &extensions.Scale{} - - // TODO this method needs to take a proper unambiguous kind - fullyQualifiedKind := schema.GroupVersionKind{Kind: kind} - resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind) - - err = c.client.Get(). - Namespace(c.ns). - Resource(resource.Resource). - Name(name). - SubResource("scale"). - Do(). - Into(result) - return -} - -func (c *scales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) { - result = &extensions.Scale{} - - // TODO this method needs to take a proper unambiguous kind - fullyQualifiedKind := schema.GroupVersionKind{Kind: kind} - resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind) - - err = c.client.Put(). - Namespace(scale.Namespace). - Resource(resource.Resource). - Name(scale.Name). - SubResource("scale"). - Body(scale). - Do(). - Into(result) - return -} diff --git a/pkg/client/listers/extensions/internalversion/BUILD b/pkg/client/listers/extensions/internalversion/BUILD index d8102a74e42..2e76730a7c3 100644 --- a/pkg/client/listers/extensions/internalversion/BUILD +++ b/pkg/client/listers/extensions/internalversion/BUILD @@ -18,7 +18,6 @@ go_library( "podsecuritypolicy.go", "replicaset.go", "replicaset_expansion.go", - "scale.go", ], importpath = "k8s.io/kubernetes/pkg/client/listers/extensions/internalversion", deps = [ diff --git a/pkg/client/listers/extensions/internalversion/expansion_generated.go b/pkg/client/listers/extensions/internalversion/expansion_generated.go index 41b4c2b07c8..1872c99f048 100644 --- a/pkg/client/listers/extensions/internalversion/expansion_generated.go +++ b/pkg/client/listers/extensions/internalversion/expansion_generated.go @@ -29,11 +29,3 @@ type IngressNamespaceListerExpansion interface{} // PodSecurityPolicyListerExpansion allows custom methods to be added to // PodSecurityPolicyLister. type PodSecurityPolicyListerExpansion interface{} - -// ScaleListerExpansion allows custom methods to be added to -// ScaleLister. -type ScaleListerExpansion interface{} - -// ScaleNamespaceListerExpansion allows custom methods to be added to -// ScaleNamespaceLister. -type ScaleNamespaceListerExpansion interface{} diff --git a/pkg/client/listers/extensions/internalversion/scale.go b/pkg/client/listers/extensions/internalversion/scale.go deleted file mode 100644 index b33c2a156f0..00000000000 --- a/pkg/client/listers/extensions/internalversion/scale.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package internalversion - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - extensions "k8s.io/kubernetes/pkg/apis/extensions" -) - -// ScaleLister helps list Scales. -type ScaleLister interface { - // List lists all Scales in the indexer. - List(selector labels.Selector) (ret []*extensions.Scale, err error) - // Scales returns an object that can list and get Scales. - Scales(namespace string) ScaleNamespaceLister - ScaleListerExpansion -} - -// scaleLister implements the ScaleLister interface. -type scaleLister struct { - indexer cache.Indexer -} - -// NewScaleLister returns a new ScaleLister. -func NewScaleLister(indexer cache.Indexer) ScaleLister { - return &scaleLister{indexer: indexer} -} - -// List lists all Scales in the indexer. -func (s *scaleLister) List(selector labels.Selector) (ret []*extensions.Scale, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.Scale)) - }) - return ret, err -} - -// Scales returns an object that can list and get Scales. -func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister { - return scaleNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ScaleNamespaceLister helps list and get Scales. -type ScaleNamespaceLister interface { - // List lists all Scales in the indexer for a given namespace. - List(selector labels.Selector) (ret []*extensions.Scale, err error) - // Get retrieves the Scale from the indexer for a given namespace and name. - Get(name string) (*extensions.Scale, error) - ScaleNamespaceListerExpansion -} - -// scaleNamespaceLister implements the ScaleNamespaceLister -// interface. -type scaleNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Scales in the indexer for a given namespace. -func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*extensions.Scale, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.Scale)) - }) - return ret, err -} - -// Get retrieves the Scale from the indexer for a given namespace and name. -func (s scaleNamespaceLister) Get(name string) (*extensions.Scale, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(extensions.Resource("scale"), name) - } - return obj.(*extensions.Scale), nil -} diff --git a/pkg/registry/apps/statefulset/storage/BUILD b/pkg/registry/apps/statefulset/storage/BUILD index ff0405af097..e9699e91199 100644 --- a/pkg/registry/apps/statefulset/storage/BUILD +++ b/pkg/registry/apps/statefulset/storage/BUILD @@ -13,8 +13,8 @@ go_test( library = ":go_default_library", deps = [ "//pkg/apis/apps:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", - "//pkg/apis/extensions:go_default_library", "//pkg/registry/registrytest:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", @@ -37,9 +37,10 @@ go_library( "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/apis/apps/v1beta2:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", + "//pkg/apis/autoscaling/validation:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/apis/extensions/validation:go_default_library", "//pkg/printers:go_default_library", "//pkg/printers/internalversion:go_default_library", "//pkg/printers/storage:go_default_library", diff --git a/pkg/registry/extensions/controller/storage/BUILD b/pkg/registry/extensions/controller/storage/BUILD index b58249119ae..8f4cf02eec6 100644 --- a/pkg/registry/extensions/controller/storage/BUILD +++ b/pkg/registry/extensions/controller/storage/BUILD @@ -12,8 +12,8 @@ go_test( importpath = "k8s.io/kubernetes/pkg/registry/extensions/controller/storage", library = ":go_default_library", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", - "//pkg/apis/extensions:go_default_library", "//pkg/registry/registrytest:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", @@ -30,13 +30,15 @@ go_library( srcs = ["storage.go"], importpath = "k8s.io/kubernetes/pkg/registry/extensions/controller/storage", deps = [ + "//pkg/apis/autoscaling:go_default_library", + "//pkg/apis/autoscaling/validation:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/apis/extensions/validation:go_default_library", "//pkg/registry/core/replicationcontroller:go_default_library", "//pkg/registry/core/replicationcontroller/storage:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", diff --git a/pkg/registry/extensions/deployment/storage/BUILD b/pkg/registry/extensions/deployment/storage/BUILD index 091d03065ed..3276c7105bf 100644 --- a/pkg/registry/extensions/deployment/storage/BUILD +++ b/pkg/registry/extensions/deployment/storage/BUILD @@ -12,6 +12,7 @@ go_test( importpath = "k8s.io/kubernetes/pkg/registry/extensions/deployment/storage", library = ":go_default_library", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/registry/registrytest:go_default_library", @@ -38,7 +39,9 @@ go_library( deps = [ "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/apis/apps/v1beta2:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", + "//pkg/apis/autoscaling/validation:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/extensions/validation:go_default_library", diff --git a/pkg/registry/extensions/replicaset/storage/BUILD b/pkg/registry/extensions/replicaset/storage/BUILD index 218d17bacce..cb477227792 100644 --- a/pkg/registry/extensions/replicaset/storage/BUILD +++ b/pkg/registry/extensions/replicaset/storage/BUILD @@ -12,6 +12,7 @@ go_test( importpath = "k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage", library = ":go_default_library", deps = [ + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/registry/registrytest:go_default_library", @@ -36,10 +37,11 @@ go_library( deps = [ "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/apis/apps/v1beta2:go_default_library", + "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", + "//pkg/apis/autoscaling/validation:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/apis/extensions/validation:go_default_library", "//pkg/printers:go_default_library", "//pkg/printers/internalversion:go_default_library", "//pkg/printers/storage:go_default_library", From f9e2e406baa37444c4508c69fd73de75f3b870d7 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 9 Nov 2017 12:49:28 -0500 Subject: [PATCH 3/4] Enable scale subresources for apps/v1 --- pkg/registry/apps/rest/storage_apps.go | 3 +++ test/integration/scale/scale_test.go | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/registry/apps/rest/storage_apps.go b/pkg/registry/apps/rest/storage_apps.go index 10b1c8a0bf5..f77900e8813 100644 --- a/pkg/registry/apps/rest/storage_apps.go +++ b/pkg/registry/apps/rest/storage_apps.go @@ -122,11 +122,13 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API deploymentStorage := deploymentstore.NewStorage(restOptionsGetter) storage["deployments"] = deploymentStorage.Deployment storage["deployments/status"] = deploymentStorage.Status + storage["deployments/scale"] = deploymentStorage.Scale } if apiResourceConfigSource.ResourceEnabled(version.WithResource("statefulsets")) { statefulSetStorage := statefulsetstore.NewStorage(restOptionsGetter) storage["statefulsets"] = statefulSetStorage.StatefulSet storage["statefulsets/status"] = statefulSetStorage.Status + storage["statefulsets/scale"] = statefulSetStorage.Scale } if apiResourceConfigSource.ResourceEnabled(version.WithResource("daemonsets")) { daemonSetStorage, daemonSetStatusStorage := daemonsetstore.NewREST(restOptionsGetter) @@ -137,6 +139,7 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API replicaSetStorage := replicasetstore.NewStorage(restOptionsGetter) storage["replicasets"] = replicaSetStorage.ReplicaSet storage["replicasets/status"] = replicaSetStorage.Status + storage["replicasets/scale"] = replicaSetStorage.Scale } if apiResourceConfigSource.ResourceEnabled(version.WithResource("controllerrevisions")) { historyStorage := controllerrevisionsstore.NewREST(restOptionsGetter) diff --git a/test/integration/scale/scale_test.go b/test/integration/scale/scale_test.go index c08c1575fe3..8e6f30c44c8 100644 --- a/test/integration/scale/scale_test.go +++ b/test/integration/scale/scale_test.go @@ -68,9 +68,9 @@ func TestScaleSubresources(t *testing.T) { makeGVR("apps", "v1beta2", "replicasets/scale"): makeGVK("apps", "v1beta2", "Scale"), makeGVR("apps", "v1beta2", "statefulsets/scale"): makeGVK("apps", "v1beta2", "Scale"), - // makeGVR("apps", "v1", "deployments/scale"): makeGVK("autoscaling", "v1", "Scale"), - // makeGVR("apps", "v1", "replicasets/scale"): makeGVK("autoscaling", "v1", "Scale"), - // makeGVR("apps", "v1", "statefulsets/scale"): makeGVK("autoscaling", "v1", "Scale"), + makeGVR("apps", "v1", "deployments/scale"): makeGVK("autoscaling", "v1", "Scale"), + makeGVR("apps", "v1", "replicasets/scale"): makeGVK("autoscaling", "v1", "Scale"), + makeGVR("apps", "v1", "statefulsets/scale"): makeGVK("autoscaling", "v1", "Scale"), } autoscalingGVK := schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "Scale"} From cccbf622f03754f219f90b73f02ac6ac0bf3a23c Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 9 Nov 2017 13:11:10 -0500 Subject: [PATCH 4/4] Generated files --- api/openapi-spec/swagger.json | 480 ++ api/swagger-spec/apps_v1.json | 565 +++ docs/api-reference/apps/v1/definitions.html | 137 + docs/api-reference/apps/v1/operations.html | 4442 ++++++++++++------- 4 files changed, 3979 insertions(+), 1645 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index e156a0c560f..a8f2d390606 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -23987,6 +23987,166 @@ } ] }, + "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale": { + "get": { + "description": "read scale of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "readAppsV1NamespacedDeploymentScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "put": { + "description": "replace scale of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "replaceAppsV1NamespacedDeploymentScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "patch": { + "description": "partially update scale of the specified Deployment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "patchAppsV1NamespacedDeploymentScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status": { "get": { "description": "read status of the specified Deployment", @@ -24653,6 +24813,166 @@ } ] }, + "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale": { + "get": { + "description": "read scale of the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "readAppsV1NamespacedReplicaSetScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "put": { + "description": "replace scale of the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "replaceAppsV1NamespacedReplicaSetScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "patch": { + "description": "partially update scale of the specified ReplicaSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "patchAppsV1NamespacedReplicaSetScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status": { "get": { "description": "read status of the specified ReplicaSet", @@ -25319,6 +25639,166 @@ } ] }, + "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale": { + "get": { + "description": "read scale of the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "readAppsV1NamespacedStatefulSetScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "put": { + "description": "replace scale of the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "replaceAppsV1NamespacedStatefulSetScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "patch": { + "description": "partially update scale of the specified StatefulSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "operationId": "patchAppsV1NamespacedStatefulSetScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status": { "get": { "description": "read status of the specified StatefulSet", diff --git a/api/swagger-spec/apps_v1.json b/api/swagger-spec/apps_v1.json index 7f5a7099be5..efe7308092c 100644 --- a/api/swagger-spec/apps_v1.json +++ b/api/swagger-spec/apps_v1.json @@ -3094,6 +3094,176 @@ } ] }, + { + "path": "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale", + "description": "API at /apis/apps/v1", + "operations": [ + { + "type": "v1.Scale", + "method": "GET", + "summary": "read scale of the specified Deployment", + "nickname": "readNamespacedDeploymentScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PUT", + "summary": "replace scale of the specified Deployment", + "nickname": "replaceNamespacedDeploymentScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Scale", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PATCH", + "summary": "partially update scale of the specified Deployment", + "nickname": "patchNamespacedDeploymentScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + } + ] + }, { "path": "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status", "description": "API at /apis/apps/v1", @@ -4236,6 +4406,176 @@ } ] }, + { + "path": "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale", + "description": "API at /apis/apps/v1", + "operations": [ + { + "type": "v1.Scale", + "method": "GET", + "summary": "read scale of the specified ReplicaSet", + "nickname": "readNamespacedReplicaSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PUT", + "summary": "replace scale of the specified ReplicaSet", + "nickname": "replaceNamespacedReplicaSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Scale", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PATCH", + "summary": "partially update scale of the specified ReplicaSet", + "nickname": "patchNamespacedReplicaSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + } + ] + }, { "path": "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status", "description": "API at /apis/apps/v1", @@ -5378,6 +5718,176 @@ } ] }, + { + "path": "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale", + "description": "API at /apis/apps/v1", + "operations": [ + { + "type": "v1.Scale", + "method": "GET", + "summary": "read scale of the specified StatefulSet", + "nickname": "readNamespacedStatefulSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PUT", + "summary": "replace scale of the specified StatefulSet", + "nickname": "replaceNamespacedStatefulSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Scale", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Scale", + "method": "PATCH", + "summary": "partially update scale of the specified StatefulSet", + "nickname": "patchNamespacedStatefulSetScale", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Scale", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Scale" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + } + ] + }, { "path": "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status", "description": "API at /apis/apps/v1", @@ -8395,6 +8905,61 @@ } } }, + "v1.Scale": { + "id": "v1.Scale", + "description": "Scale represents a scaling request for a resource.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata." + }, + "spec": { + "$ref": "v1.ScaleSpec", + "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status." + }, + "status": { + "$ref": "v1.ScaleStatus", + "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only." + } + } + }, + "v1.ScaleSpec": { + "id": "v1.ScaleSpec", + "description": "ScaleSpec describes the attributes of a scale subresource.", + "properties": { + "replicas": { + "type": "integer", + "format": "int32", + "description": "desired number of instances for the scaled object." + } + } + }, + "v1.ScaleStatus": { + "id": "v1.ScaleStatus", + "description": "ScaleStatus represents the current status of a scale subresource.", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "type": "integer", + "format": "int32", + "description": "actual number of observed instances of the scaled object." + }, + "selector": { + "type": "string", + "description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors" + } + } + }, "v1.ReplicaSetList": { "id": "v1.ReplicaSetList", "description": "ReplicaSetList is a collection of ReplicaSets.", diff --git a/docs/api-reference/apps/v1/definitions.html b/docs/api-reference/apps/v1/definitions.html index 12dafd8eb2b..069baa1351d 100755 --- a/docs/api-reference/apps/v1/definitions.html +++ b/docs/api-reference/apps/v1/definitions.html @@ -1413,6 +1413,47 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
+

v1.ScaleStatus

+
+

ScaleStatus represents the current status of a scale subresource.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

replicas

actual number of observed instances of the scaled object.

true

integer (int32)

selector

label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors

false

string

+

v1.PortworxVolumeSource

@@ -2680,6 +2721,68 @@ When an object is created, the system will populate this list with the current s +
+
+

v1.Scale

+
+

Scale represents a scaling request for a resource.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

false

string

metadata

Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.

false

v1.ObjectMeta

spec

defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.

false

v1.ScaleSpec

status

current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.

false

v1.ScaleStatus

+

v1.KeyToPath

@@ -5591,6 +5694,40 @@ Examples:
+
+
+

v1.ScaleSpec

+
+

ScaleSpec describes the attributes of a scale subresource.

+
+ +++++++ + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

replicas

desired number of instances for the scaled object.

false

integer (int32)

+

v1.RollingUpdateDeployment

diff --git a/docs/api-reference/apps/v1/operations.html b/docs/api-reference/apps/v1/operations.html index 8cb4cf3ab34..c0b38dd26bd 100755 --- a/docs/api-reference/apps/v1/operations.html +++ b/docs/api-reference/apps/v1/operations.html @@ -4463,6 +4463,390 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
+

read scale of the specified Deployment

+
+
+
GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Scale

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Scale

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisappsv1

    +
  • +
+
+
+
+
+

replace scale of the specified Deployment

+
+
+
PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Scale

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Scale

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Scale

201

Created

v1.Scale

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisappsv1

    +
  • +
+
+
+
+
+

partially update scale of the specified Deployment

+
+
+
PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Scale

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Scale

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisappsv1

    +
  • +
+
+
+
+

read status of the specified Deployment

@@ -4470,7 +4854,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -4520,7 +4904,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -4545,7 +4929,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -4555,7 +4939,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -4571,7 +4955,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -4589,7 +4973,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -4647,7 +5031,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -4677,7 +5061,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -4687,7 +5071,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -4703,7 +5087,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -4721,7 +5105,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -4779,7 +5163,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -4804,7 +5188,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -4820,7 +5204,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -4836,7 +5220,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -4854,7 +5238,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -4961,7 +5345,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -4986,7 +5370,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -4996,7 +5380,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -5018,7 +5402,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -5036,7 +5420,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -5143,7 +5527,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -5168,7 +5552,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -5178,7 +5562,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -5194,7 +5578,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -5212,7 +5596,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -5262,7 +5646,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -5297,7 +5681,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -5307,7 +5691,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -5323,7 +5707,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -5341,7 +5725,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -5407,7 +5791,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -5432,7 +5816,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -5442,7 +5826,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -5458,7 +5842,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -5476,7 +5860,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -5534,7 +5918,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Responses

+

Responses

@@ -5564,7 +5948,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Consumes

+

Consumes

  • @@ -5574,7 +5958,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Produces

+

Produces

  • @@ -5590,7 +5974,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Tags

+

Tags

  • @@ -5608,7 +5992,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

Parameters

+

Parameters

@@ -5688,385 +6072,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1.Status

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1

    -
  • -
-
-
-
-
-

partially update the specified ReplicaSet

-
-
-
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the ReplicaSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1.ReplicaSet

- -
-
-

Consumes

-
-
    -
  • -

    application/json-patch+json

    -
  • -
  • -

    application/merge-patch+json

    -
  • -
  • -

    application/strategic-merge-patch+json

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1

    -
  • -
-
-
-
-
-

read status of the specified ReplicaSet

-
-
-
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the ReplicaSet

true

string

- -
-
-

Responses

- ----- - - - - - - - - - - - - - - -
HTTP CodeDescriptionSchema

200

success

v1.ReplicaSet

- -
-
-

Consumes

-
-
    -
  • -

    /

    -
  • -
-
-
-
-

Produces

-
-
    -
  • -

    application/json

    -
  • -
  • -

    application/yaml

    -
  • -
  • -

    application/vnd.kubernetes.protobuf

    -
  • -
-
-
-
-

Tags

-
-
    -
  • -

    apisappsv1

    -
  • -
-
-
-
-
-

replace status of the specified ReplicaSet

-
-
-
PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
-
-
-
-

Parameters

- -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.ReplicaSet

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the ReplicaSet

true

string

-

Responses

@@ -6087,12 +6092,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1.ReplicaSet

- - -

201

-

Created

-

v1.ReplicaSet

+

v1.Status

@@ -6136,10 +6136,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

partially update status of the specified ReplicaSet

+

partially update the specified ReplicaSet

-
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
+
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
@@ -6269,10 +6269,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

list or watch objects of kind StatefulSet

+

read scale of the specified ReplicaSet

-
GET /apis/apps/v1/namespaces/{namespace}/statefulsets
+
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
@@ -6306,74 +6306,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -

QueryParameter

-

labelSelector

-

A selector to restrict the list of returned objects by their labels. Defaults to everything.

-

false

-

string

- - - -

QueryParameter

-

fieldSelector

-

A selector to restrict the list of returned objects by their fields. Defaults to everything.

-

false

-

string

- - - -

QueryParameter

-

includeUninitialized

-

If true, partially initialized resources are included in the response.

-

false

-

boolean

- - - -

QueryParameter

-

watch

-

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

-

false

-

boolean

- - - -

QueryParameter

-

resourceVersion

-

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

-

false

-

string

- - - -

QueryParameter

-

timeoutSeconds

-

Timeout for the list/watch call.

-

false

-

integer (int32)

- - - -

QueryParameter

-

limit

-

limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

-

false

-

integer (int32)

- - - -

QueryParameter

-

continue

-

The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

-

false

+

PathParameter

+

namespace

+

object name and auth scope, such as for teams and projects

+

true

string

PathParameter

-

namespace

-

object name and auth scope, such as for teams and projects

+

name

+

name of the Scale

true

string

@@ -6401,7 +6344,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1.StatefulSetList

+

v1.Scale

@@ -6430,12 +6373,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/vnd.kubernetes.protobuf

  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • @@ -6451,10 +6388,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    delete collection of StatefulSet

    +

    replace scale of the specified ReplicaSet

    -
    DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets
    +
    PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
    @@ -6488,68 +6425,11 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -

    QueryParameter

    -

    labelSelector

    -

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    -

    false

    -

    string

    +

    BodyParameter

    +

    body

    - - -

    QueryParameter

    -

    fieldSelector

    -

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    includeUninitialized

    -

    If true, partially initialized resources are included in the response.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    watch

    -

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    resourceVersion

    -

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    timeoutSeconds

    -

    Timeout for the list/watch call.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    limit

    -

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    continue

    -

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    -

    false

    -

    string

    +

    true

    +

    v1.Scale

    @@ -6560,6 +6440,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    string

    + +

    PathParameter

    +

    name

    +

    name of the Scale

    +

    true

    +

    string

    + + @@ -6583,7 +6471,12 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1.Status

    +

    v1.Scale

    + + +

    201

    +

    Created

    +

    v1.Scale

    @@ -6627,6 +6520,881 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    +

    partially update scale of the specified ReplicaSet

    +
    +
    +
    PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the Scale

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.Scale

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    read status of the specified ReplicaSet

    +
    +
    +
    GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the ReplicaSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.ReplicaSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    replace status of the specified ReplicaSet

    +
    +
    +
    PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.ReplicaSet

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the ReplicaSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.ReplicaSet

    201

    Created

    v1.ReplicaSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    partially update status of the specified ReplicaSet

    +
    +
    +
    PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the ReplicaSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.ReplicaSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    list or watch objects of kind StatefulSet

    +
    +
    +
    GET /apis/apps/v1/namespaces/{namespace}/statefulsets
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSetList

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    delete collection of StatefulSet

    +
    +
    +
    DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.Status

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +

    create a StatefulSet

    @@ -6634,7 +7402,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -6684,7 +7452,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -6719,7 +7487,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -6729,7 +7497,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -6745,7 +7513,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -6763,7 +7531,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -6829,7 +7597,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -6854,7 +7622,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -6864,7 +7632,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -6880,7 +7648,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -6898,7 +7666,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -6956,7 +7724,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -6986,7 +7754,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -6996,7 +7764,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -7012,7 +7780,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -7030,7 +7798,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -7110,865 +7878,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.Status

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      /

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    partially update the specified StatefulSet

    -
    -
    -
    PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    - -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      application/json-patch+json

      -
    • -
    • -

      application/merge-patch+json

      -
    • -
    • -

      application/strategic-merge-patch+json

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    read status of the specified StatefulSet

    -
    -
    -
    GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    - -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      /

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    replace status of the specified StatefulSet

    -
    -
    -
    PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.StatefulSet

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    - -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    201

    Created

    v1.StatefulSet

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      /

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    partially update status of the specified StatefulSet

    -
    -
    -
    PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    - -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      application/json-patch+json

      -
    • -
    • -

      application/merge-patch+json

      -
    • -
    • -

      application/strategic-merge-patch+json

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    list or watch objects of kind ReplicaSet

    -
    -
    -
    GET /apis/apps/v1/replicasets
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    - -
    -
    -

    Responses

    - ----- - - - - - - - - - - - - - - -
    HTTP CodeDescriptionSchema

    200

    success

    v1.ReplicaSetList

    - -
    -
    -

    Consumes

    -
    -
      -
    • -

      /

      -
    • -
    -
    -
    -
    -

    Produces

    -
    -
      -
    • -

      application/json

      -
    • -
    • -

      application/yaml

      -
    • -
    • -

      application/vnd.kubernetes.protobuf

      -
    • -
    • -

      application/json;stream=watch

      -
    • -
    • -

      application/vnd.kubernetes.protobuf;stream=watch

      -
    • -
    -
    -
    -
    -

    Tags

    -
    -
      -
    • -

      apisappsv1

      -
    • -
    -
    -
    -
    -
    -

    list or watch objects of kind StatefulSet

    -
    -
    -
    GET /apis/apps/v1/statefulsets
    -
    -
    -
    -

    Parameters

    - -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    -

    Responses

    @@ -7989,7 +7898,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1.StatefulSetList

    +

    v1.Status

    @@ -8018,12 +7927,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/vnd.kubernetes.protobuf

  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • @@ -8039,10 +7942,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of ControllerRevision

    +

    partially update the specified StatefulSet

    -
    GET /apis/apps/v1/watch/controllerrevisions
    +
    PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}
    @@ -8076,67 +7979,26 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -

    QueryParameter

    -

    labelSelector

    -

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    -

    false

    +

    BodyParameter

    +

    body

    + +

    true

    +

    v1.Patch

    + + + +

    PathParameter

    +

    namespace

    +

    object name and auth scope, such as for teams and projects

    +

    true

    string

    -

    QueryParameter

    -

    fieldSelector

    -

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    includeUninitialized

    -

    If true, partially initialized resources are included in the response.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    watch

    -

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    resourceVersion

    -

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    timeoutSeconds

    -

    Timeout for the list/watch call.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    limit

    -

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    continue

    -

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    -

    false

    +

    PathParameter

    +

    name

    +

    name of the StatefulSet

    +

    true

    string

    @@ -8163,7 +8025,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1.WatchEvent

    +

    v1.StatefulSet

    @@ -8174,7 +8036,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    • -

      /

      +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

    @@ -8192,12 +8060,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/vnd.kubernetes.protobuf

  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • @@ -8213,10 +8075,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of DaemonSet

    +

    read scale of the specified StatefulSet

    -
    GET /apis/apps/v1/watch/daemonsets
    +
    GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
    @@ -8250,67 +8112,18 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -

    QueryParameter

    -

    labelSelector

    -

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    -

    false

    +

    PathParameter

    +

    namespace

    +

    object name and auth scope, such as for teams and projects

    +

    true

    string

    -

    QueryParameter

    -

    fieldSelector

    -

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    includeUninitialized

    -

    If true, partially initialized resources are included in the response.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    watch

    -

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    -

    false

    -

    boolean

    - - - -

    QueryParameter

    -

    resourceVersion

    -

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    -

    false

    -

    string

    - - - -

    QueryParameter

    -

    timeoutSeconds

    -

    Timeout for the list/watch call.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    limit

    -

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. -

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    -

    false

    -

    integer (int32)

    - - - -

    QueryParameter

    -

    continue

    -

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    -

    false

    +

    PathParameter

    +

    name

    +

    name of the Scale

    +

    true

    string

    @@ -8337,7 +8150,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1.WatchEvent

    +

    v1.Scale

    @@ -8366,12 +8179,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • application/vnd.kubernetes.protobuf

  • -
  • -

    application/json;stream=watch

    -
  • -
  • -

    application/vnd.kubernetes.protobuf;stream=watch

    -
  • @@ -8387,10 +8194,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of Deployment

    +

    replace scale of the specified StatefulSet

    -
    GET /apis/apps/v1/watch/deployments
    +
    PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
    @@ -8424,6 +8231,655 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +

    BodyParameter

    +

    body

    + +

    true

    +

    v1.Scale

    + + + +

    PathParameter

    +

    namespace

    +

    object name and auth scope, such as for teams and projects

    +

    true

    +

    string

    + + + +

    PathParameter

    +

    name

    +

    name of the Scale

    +

    true

    +

    string

    + + + + + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.Scale

    201

    Created

    v1.Scale

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    partially update scale of the specified StatefulSet

    +
    +
    +
    PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the Scale

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.Scale

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    read status of the specified StatefulSet

    +
    +
    +
    GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    replace status of the specified StatefulSet

    +
    +
    +
    PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.StatefulSet

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    201

    Created

    v1.StatefulSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    partially update status of the specified StatefulSet

    +
    +
    +
    PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    PathParameter

    namespace

    object name and auth scope, such as for teams and projects

    true

    string

    PathParameter

    name

    name of the StatefulSet

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSet

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    list or watch objects of kind ReplicaSet

    +
    +
    +
    GET /apis/apps/v1/replicasets
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + @@ -8493,7 +8949,355 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.ReplicaSetList

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    list or watch objects of kind StatefulSet

    +
    +
    +
    GET /apis/apps/v1/statefulsets
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.StatefulSetList

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    watch individual changes to a list of ControllerRevision

    +
    +
    +
    GET /apis/apps/v1/watch/controllerrevisions
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    @@ -8518,7 +9322,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -8528,7 +9332,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -8550,7 +9354,355 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    + +
    +

    watch individual changes to a list of DaemonSet

    +
    +
    +
    GET /apis/apps/v1/watch/daemonsets
    +
    +
    +
    +

    Parameters

    +
    ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisappsv1

      +
    • +
    +
    +
    +
    +
    +

    watch individual changes to a list of Deployment

    +
    +
    +
    GET /apis/apps/v1/watch/deployments
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    • @@ -8568,7 +9720,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -8675,7 +9827,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -8700,7 +9852,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -8710,7 +9862,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -8732,7 +9884,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -8750,7 +9902,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -8865,7 +10017,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -8890,7 +10042,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -8900,7 +10052,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -8922,7 +10074,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -8940,7 +10092,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9047,7 +10199,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -9072,7 +10224,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -9082,7 +10234,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -9104,7 +10256,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -9122,7 +10274,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9237,7 +10389,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -9262,7 +10414,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -9272,7 +10424,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -9294,7 +10446,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -9312,7 +10464,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9419,7 +10571,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -9444,7 +10596,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -9454,7 +10606,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -9476,7 +10628,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -9494,7 +10646,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9609,7 +10761,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -9634,7 +10786,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -9644,7 +10796,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -9666,7 +10818,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -9684,7 +10836,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9791,7 +10943,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -9816,7 +10968,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -9826,7 +10978,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -9848,7 +11000,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -9866,7 +11018,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -9981,7 +11133,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -10006,7 +11158,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -10016,7 +11168,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -10038,7 +11190,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -10056,7 +11208,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -10163,7 +11315,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -10188,7 +11340,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -10198,7 +11350,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -10220,7 +11372,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -10238,7 +11390,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -10353,7 +11505,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -10378,7 +11530,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -10388,7 +11540,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -10410,7 +11562,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -10428,7 +11580,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -10527,7 +11679,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -10552,7 +11704,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -10562,7 +11714,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -10584,7 +11736,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    • @@ -10602,7 +11754,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -10701,7 +11853,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -10726,7 +11878,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -10736,7 +11888,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -10758,7 +11910,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags