-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
graduate HPAContainerMetrics to stable #123482
graduate HPAContainerMetrics to stable #123482
Conversation
/cc @gjtempleton |
/retest |
e195246
to
07e0a80
Compare
Changelog suggestion -graduate HPAContainerMetrics to stable
+Graduated HorizontalPodAutoscaler support for per-container metrics to stable. |
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.
One minor change and one query from me.
func (autoscalerStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { | ||
newHPA := obj.(*autoscaling.HorizontalPodAutoscaler) | ||
|
||
// create cannot set status | ||
newHPA.Status = autoscaling.HorizontalPodAutoscalerStatus{} | ||
|
||
if !utilfeature.DefaultFeatureGate.Enabled(features.HPAContainerMetrics) { | ||
dropContainerMetricSources(newHPA.Spec.Metrics) | ||
} | ||
} | ||
func (autoscalerStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) {} |
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.
Am I missing some context as to why we're wiping this entire function instead of just the feature gate check?
Same holds true for PrepareForUpdate
below.
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.
You're right. I overlooked it prevents the operation from changing status.
@@ -994,7 +995,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS | |||
|
|||
GracefulNodeShutdownBasedOnPodPriority: {Default: true, PreRelease: featuregate.Beta}, | |||
|
|||
HPAContainerMetrics: {Default: true, PreRelease: featuregate.Beta}, | |||
HPAContainerMetrics: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.32 |
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.
Added LockToDefault
as I was suggested in another GA graduation PR #123481.
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.
Good. Note that in future releases the logic using the featuregate must remain in order to support the compatibility versions: https://github.com/kubernetes/enhancements/tree/master/keps/sig-architecture/4330-compatibility-versions .
/label api-review |
/lgtm |
LGTM label has been added. Git tree hash: 94c119f1be96ba38dd53039fb43d52bd77ee72ca
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, sanposhiho The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Code freeze began early today. Is this target to v1.30?
|
It is, yes. Have just submitted an exception request (currently waiting for the message to be approved.) |
/milestone v1.30 |
/triage accepted |
@praparn Can you file a GitHub issue instead of here. But, note that v1.26 or older already reached end of Life., |
@sanposhiho Note with thanks will delete and post on issue na krab. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
graduate HPAContainerMetrics to stable
Which issue(s) this PR fixes:
Part of kubernetes/enhancements#1610
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: