mirror of https://github.com/k3s-io/k3s
Merge pull request #53067 from janetkuo/kubectl-apps-rs
Automatic merge from submit-queue (batch tested with PRs 50685, 53050, 52899, 52913, 53067). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Support apps.ReplicaSet in kubectl Supersedes #53056, ref #53040 **Release note**: ```release-note NONE ```pull/6/head
commit
ededef24e4
|
@ -625,7 +625,7 @@ func (f *ring0Factory) Generators(cmdName string) map[string]kubectl.Generator {
|
|||
func (f *ring0Factory) CanBeExposed(kind schema.GroupKind) error {
|
||||
switch kind {
|
||||
case api.Kind("ReplicationController"), api.Kind("Service"), api.Kind("Pod"),
|
||||
extensions.Kind("Deployment"), apps.Kind("Deployment"), extensions.Kind("ReplicaSet"):
|
||||
extensions.Kind("Deployment"), apps.Kind("Deployment"), extensions.Kind("ReplicaSet"), apps.Kind("ReplicaSet"):
|
||||
// nothing to do here
|
||||
default:
|
||||
return fmt.Errorf("cannot expose a %s", kind)
|
||||
|
@ -636,7 +636,7 @@ func (f *ring0Factory) CanBeExposed(kind schema.GroupKind) error {
|
|||
func (f *ring0Factory) CanBeAutoscaled(kind schema.GroupKind) error {
|
||||
switch kind {
|
||||
case api.Kind("ReplicationController"), extensions.Kind("ReplicaSet"),
|
||||
extensions.Kind("Deployment"), apps.Kind("Deployment"):
|
||||
extensions.Kind("Deployment"), apps.Kind("Deployment"), apps.Kind("ReplicaSet"):
|
||||
// nothing to do here
|
||||
default:
|
||||
return fmt.Errorf("cannot autoscale a %v", kind)
|
||||
|
|
|
@ -72,7 +72,7 @@ func ReaperFor(kind schema.GroupKind, c internalclientset.Interface) (Reaper, er
|
|||
case api.Kind("ReplicationController"):
|
||||
return &ReplicationControllerReaper{c.Core(), Interval, Timeout}, nil
|
||||
|
||||
case extensions.Kind("ReplicaSet"):
|
||||
case extensions.Kind("ReplicaSet"), apps.Kind("ReplicaSet"):
|
||||
return &ReplicaSetReaper{c.Extensions(), Interval, Timeout}, nil
|
||||
|
||||
case extensions.Kind("DaemonSet"), apps.Kind("DaemonSet"):
|
||||
|
|
|
@ -54,7 +54,7 @@ func ScalerFor(kind schema.GroupKind, c internalclientset.Interface) (Scaler, er
|
|||
switch kind {
|
||||
case api.Kind("ReplicationController"):
|
||||
return &ReplicationControllerScaler{c.Core()}, nil
|
||||
case extensions.Kind("ReplicaSet"):
|
||||
case extensions.Kind("ReplicaSet"), apps.Kind("ReplicaSet"):
|
||||
return &ReplicaSetScaler{c.Extensions()}, nil
|
||||
case batch.Kind("Job"):
|
||||
return &JobScaler{c.Batch()}, nil // Either kind of job can be scaled with Batch interface.
|
||||
|
|
|
@ -153,6 +153,7 @@ func describerMap(c clientset.Interface) map[schema.GroupKind]printers.Describer
|
|||
apps.Kind("StatefulSet"): &StatefulSetDescriber{c},
|
||||
apps.Kind("Deployment"): &DeploymentDescriber{c, versionedExtensionsClientV1beta1(c)},
|
||||
apps.Kind("DaemonSet"): &DaemonSetDescriber{c},
|
||||
apps.Kind("ReplicaSet"): &ReplicaSetDescriber{c},
|
||||
certificates.Kind("CertificateSigningRequest"): &CertificateSigningRequestDescriber{c},
|
||||
storage.Kind("StorageClass"): &StorageClassDescriber{c},
|
||||
policy.Kind("PodDisruptionBudget"): &PodDisruptionBudgetDescriber{c},
|
||||
|
|
Loading…
Reference in New Issue