Unified mechanism for Cluster Autoscaler feature flags #5432
Labels
area/cluster-autoscaler
area/core-autoscaler
Denotes an issue that is related to the core autoscaler and is not specific to any provider.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/feature
Categorizes issue or PR as related to a new feature.
Which component are you using?:
cluster-autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
Enabling new features in Cluster Autoscaler usually requires a feature flag. Existing examples include
--scale-down-enabled
(sic!),--debugging-snapshot-enabled
or--parallel-drain
. These flags contribute to an already existing huge API surface of Cluster Autoscaler flags. Additionally, implementation of such flags sometimes requires passing them through a few layers of abstraction (e.g. throughAutoscalingOptions
), making the code harder to maintain.Describe the solution you'd like.:
There should be a single flag to control feature enablement. Feature flags should be accessible from the code - they are global to the entire CA process anyway. I'd reuse the approach taken in kube-apiserver: http://go/kuber/blob/1ca2180f300bb83e4581c7efb02ab91b7027b6f3/staging/src/k8s.io/apiserver/pkg/util/feature/feature_gate.go#L32
Describe any alternative solutions you've considered.:
Build a custom mechanism for this. On one hand we don't really need all the alpha/beta/GA in Cluster Autoscaler, but it will be simpler to reuse what is already there (especially since CA already takes a dependency on core k8s).
Additional context.:
/help
The text was updated successfully, but these errors were encountered: