-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump Horizontal Pod Autoscaler apiBase version #6906
Conversation
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
stabilizationWindowSecond?: number; | ||
selectPolicy?: ScalingPolicySelect; | ||
policies?: HPAScalingPolicy[]; | ||
} | ||
|
||
type ScalingPolicySelect = string; | ||
|
||
interface HPAScalingPolicy { | ||
type: HPAScalingPolicyType; | ||
value: number; | ||
periodSeconds: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: too big indentation within both interface
s (comparing to one above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were tabs instead of spaces. Surprisingly, linter ignores that. Fixed.
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
// Kubernetes < 1.26 | ||
fallbackApiBases: [ | ||
"/apis/autoscaling/v2beta2/horizontalpodautoscalers", | ||
"/apis/autoscaling/v2beta1/horizontalpodautoscalers", | ||
"/apis/autoscaling/v1/horizontalpodautoscalers", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these are necessary since the group hasn't changed.
We should be careful though since if a v3
comes out it might change the representation. Though we can add that safety in a future PR.
v2
version (introduced in k8s v1.23)Now HPAs get loaded using version
v2
for newer k8s. And new fields such asbehavior
andmetrics
presented:newer.hpa.apibase.mov
HPAs get loaded using some of the fallback api versions if running older kubernetes:
kube.1.20.hpa.api.version.mov
Fixes #6168
Fixes #6817
Fixes #6827