mirror of https://github.com/k3s-io/k3s
fix missing apps/replicaset in kubectl
parent
b188868fd9
commit
137cd9e6fc
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue