mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-04 09:36:16 +00:00
Add Custom Resource support to "kubectl autoscale"
Generalize the autoscsale command to simply let the dynamic client check if a scale subresource is registered for the supplied type. This allows using the autoscale command for built in types as well as custom resources.
This commit is contained in:
@@ -79,12 +79,6 @@ type PortsForObjectFunc func(object runtime.Object) ([]string, error)
|
||||
// PortsForObjectFn gives a way to easily override the function for unit testing if needed
|
||||
var PortsForObjectFn PortsForObjectFunc = portsForObject
|
||||
|
||||
// CanBeAutoscaledFunc checks whether the kind of resources could be autoscaled
|
||||
type CanBeAutoscaledFunc func(kind schema.GroupKind) error
|
||||
|
||||
// CanBeAutoscaledFn gives a way to easily override the function for unit testing if needed
|
||||
var CanBeAutoscaledFn CanBeAutoscaledFunc = canBeAutoscaled
|
||||
|
||||
// CanBeExposedFunc is a function type that can tell you whether a given GroupKind is capable of being exposed
|
||||
type CanBeExposedFunc func(kind schema.GroupKind) error
|
||||
|
||||
|
Reference in New Issue
Block a user