support statefulset in kubectl autoscale command
This commit is contained in:
@@ -31,6 +31,7 @@ func canBeAutoscaled(kind schema.GroupKind) error {
|
||||
corev1.SchemeGroupVersion.WithKind("ReplicationController").GroupKind(),
|
||||
appsv1.SchemeGroupVersion.WithKind("Deployment").GroupKind(),
|
||||
appsv1.SchemeGroupVersion.WithKind("ReplicaSet").GroupKind(),
|
||||
appsv1.SchemeGroupVersion.WithKind("StatefulSet").GroupKind(),
|
||||
extensionsv1beta1.SchemeGroupVersion.WithKind("Deployment").GroupKind(),
|
||||
extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet").GroupKind():
|
||||
// nothing to do here
|
||||
|
@@ -38,6 +38,10 @@ func TestCanBeAutoscaled(t *testing.T) {
|
||||
kind: appsv1.SchemeGroupVersion.WithKind("Deployment").GroupKind(),
|
||||
expectErr: false,
|
||||
},
|
||||
{
|
||||
kind: appsv1.SchemeGroupVersion.WithKind("StatefulSet").GroupKind(),
|
||||
expectErr: false,
|
||||
},
|
||||
{
|
||||
kind: extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet").GroupKind(),
|
||||
expectErr: false,
|
||||
|
Reference in New Issue
Block a user