Skip to content
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

feature(kubectl): support mem-percent,cpu-value,cpu-average-value,mem-value,mem-average-value flag to kubectl autoscale #129373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

googs1025
Copy link
Contributor

@googs1025 googs1025 commented Dec 24, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • support mem-percent,cpu-value,cpu-average-value,mem-value,mem-average-value flag to kubectl autoscale

Which issue(s) this PR fixes:

Fixes kubernetes/kubectl#1481

Special notes for your reviewer:

Does this PR introduce a user-facing change?

support mem-percent,cpu-value,cpu-average-value,mem-value,mem-average-value flag to kubectl autoscale

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 24, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 24, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: googs1025
Once this PR has been reviewed and has the lgtm label, please assign seans3 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 24, 2024
@googs1025 googs1025 force-pushed the feature/kubectl/autoscale branch from 657001e to a3b9c5d Compare December 24, 2024 03:10
…-value,mem-average-value flag to kubectl autoscale
@googs1025 googs1025 force-pushed the feature/kubectl/autoscale branch from a3b9c5d to b926312 Compare December 24, 2024 14:08
@googs1025 googs1025 marked this pull request as ready for review December 24, 2024 14:08
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2024
@k8s-ci-robot k8s-ci-robot requested a review from seans3 December 24, 2024 14:08
@@ -224,6 +275,11 @@ func (o *AutoscaleOptions) Run() error {
if err := o.handleHPA(hpaV2); err != nil {
klog.V(1).Infof("Encountered an error with the v2 HorizontalPodAutoscaler: %v. "+
"Falling back to try the v1 HorizontalPodAutoscaler", err)
// check if the HPA can be created using v1 API.
if !o.canCreateHPAV1() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we need to determine whether it can be created in V1, because there are different between v1 and v2.

@googs1025
Copy link
Contributor Author

ping @soltysh please help this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

The command autoscale deployment should provide a flag for providing the maximum, average memory utilization
2 participants