mirror of https://github.com/kubernetes/kops.git
Fix CRDs, clarify docs, and add cloud provider check for price expander.
This commit is contained in:
parent
1d9996b4ad
commit
8672d9b219
|
@ -46,7 +46,7 @@ spec:
|
|||
memoryRequest: "300Mi"
|
||||
```
|
||||
|
||||
Read more about cluster autoscaler in the [official documentation](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). The autoscaler supports five different expander strategies; the `priority` expander requires additional configuration in a ConfigMap as described in [its documentation](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md).
|
||||
Read more about cluster autoscaler in the [official documentation](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). The autoscaler supports five different expander strategies; the `priority` expander requires additional configuration in a ConfigMap as described in [its documentation](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md) - please ensure that you have deployed this ConfigMap before enabling the `priority` expander.
|
||||
|
||||
##### Disabling cluster autoscaler for a given instance group
|
||||
{{ kops_feature_table(kops_added_default='1.20') }}
|
||||
|
|
|
@ -622,7 +622,7 @@ spec:
|
|||
expander:
|
||||
description: 'Expander determines the strategy for which instance
|
||||
group gets expanded. Supported values: least-waste, most-pods,
|
||||
random, price, priority. The priority expander requires additional
|
||||
random, price, priority. The priority expander requires additional
|
||||
configuration via a ConfigMap. Default: least-waste'
|
||||
type: string
|
||||
image:
|
||||
|
|
|
@ -961,6 +961,7 @@ type ClusterAutoscalerConfig struct {
|
|||
Enabled *bool `json:"enabled,omitempty"`
|
||||
// Expander determines the strategy for which instance group gets expanded.
|
||||
// Supported values: least-waste, most-pods, random, price, priority.
|
||||
// The priority expander requires additional configuration via a ConfigMap.
|
||||
// Default: least-waste
|
||||
Expander *string `json:"expander,omitempty"`
|
||||
// BalanceSimilarNodeGroups makes cluster autoscaler treat similar node groups as one.
|
||||
|
|
|
@ -981,6 +981,7 @@ type ClusterAutoscalerConfig struct {
|
|||
Enabled *bool `json:"enabled,omitempty"`
|
||||
// Expander determines the strategy for which instance group gets expanded.
|
||||
// Supported values: least-waste, most-pods, random, price, priority.
|
||||
// The priority expander requires additional configuration via a ConfigMap.
|
||||
// Default: least-waste
|
||||
Expander *string `json:"expander,omitempty"`
|
||||
// BalanceSimilarNodeGroups makes cluster autoscaler treat similar node groups as one.
|
||||
|
|
|
@ -958,6 +958,7 @@ type ClusterAutoscalerConfig struct {
|
|||
Enabled *bool `json:"enabled,omitempty"`
|
||||
// Expander determines the strategy for which instance group gets expanded.
|
||||
// Supported values: least-waste, most-pods, random, price, priority.
|
||||
// The priority expander requires additional configuration via a ConfigMap.
|
||||
// Default: least-waste
|
||||
Expander *string `json:"expander,omitempty"`
|
||||
// BalanceSimilarNodeGroups makes cluster autoscaler treat similar node groups as one.
|
||||
|
|
|
@ -1519,6 +1519,10 @@ func validateNodeLocalDNS(spec *kops.ClusterSpec, fldpath *field.Path) field.Err
|
|||
func validateClusterAutoscaler(cluster *kops.Cluster, spec *kops.ClusterAutoscalerConfig, fldPath *field.Path) (allErrs field.ErrorList) {
|
||||
allErrs = append(allErrs, IsValidValue(fldPath.Child("expander"), spec.Expander, []string{"least-waste", "random", "most-pods", "price", "priority"})...)
|
||||
|
||||
if *spec.Expander == "price" && kops.CloudProviderID(cluster.Spec.CloudProvider) != kops.CloudProviderGCE {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("expander"), "Cluster autoscaler price expander is only supported on GCE"))
|
||||
}
|
||||
|
||||
if kops.CloudProviderID(cluster.Spec.CloudProvider) == kops.CloudProviderOpenstack {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath, "Cluster autoscaler is not supported on OpenStack"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue