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

Add config knob MaxScale for setting default "autoscaling.knative.dev/maxScale" #8951

Merged

Conversation

arturenault
Copy link
Contributor

@arturenault arturenault commented Aug 6, 2020

/lint
Fixes #8627

Proposed Changes

  • Add config knob for max-scale to allow for cluster-wide setting of default max-scale for revisions where "autoscaling.knative.dev/maxScale" isn't specified

Release Note

Add config knob "max-value," which allows for setting a cluster-wide value for the max scale of any revision that doesn't have the "autoscaling.knative.dev/maxScale" annotation. The default of 0 conforms to previous behavior: revisions created with no annotation can scale without an upper bound.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 6, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/API API objects and controllers area/autoscale labels Aug 6, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@arturenault: 0 warnings.

In response to this:

/lint
Fixes #8627

Proposed Changes

  • Add config knob for default-max-scale to allow for cluster-wide setting of default-max-scale

Release Note

Add config knob "default-max-value," which allows for setting a cluster-wide value for the max scale of a revision after creation. The config applies to any revision which doesn't have the "autoscaling.knative.dev/maxScale" annotation. The default of 0 conforms to previous behavior: revisions created with no annotation can scale without an upper bound.

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/test-infra repository.

@arturenault arturenault marked this pull request as draft August 6, 2020 21:41
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2020
@arturenault arturenault marked this pull request as ready for review August 6, 2020 21:58
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2020
Co-authored-by: Yanwei Guo <yanweiguo@google.com>
@yanweiguo
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2020
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2020
Copy link
Member

@julz julz left a comment

Choose a reason for hiding this comment

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

mostly lgtm, couple more nits

pkg/autoscaler/config/config.go Outdated Show resolved Hide resolved
pkg/reconciler/autoscaling/kpa/kpa.go Outdated Show resolved Hide resolved
config/core/configmaps/autoscaler.yaml Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Aug 7, 2020

This pull request introduces 1 alert when merging 2cbce5f into cdf76a9 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@julz
Copy link
Member

julz commented Aug 7, 2020

looks like the tests are still failing. I think because you've checked in generate-groups.sh and generate-knative.sh with a permission change and removed zz_generated.deepcopy.go. If you re-run ./hack/update-codegen.sh and make sure everything works locally afterwards with go test ./... that should fix it.

Co-authored-by: Victor Agababov <vagababov@gmail.com>
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/autoscaling/kpa/kpa.go 94.8% 94.9% 0.1
pkg/reconciler/autoscaling/kpa/scaler.go 93.4% 94.3% 0.9

Copy link
Member

@julz julz left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for the contribution @arturenault

/lgtm
/approve
/assign @vagababov

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2020
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
Thanks.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arturenault, julz, vagababov

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2020
@julz
Copy link
Member

julz commented Aug 7, 2020

/retest

@julz
Copy link
Member

julz commented Aug 7, 2020

looks like #8953.

/retest

@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-integration-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-integration-tests:

test/conformance/api/v1.TestContainerExitingMsg
test/conformance/api/v1alpha1.TestContainerExitingMsg
test/conformance/api/v1beta1.TestContainerExitingMsg

@arturenault
Copy link
Contributor Author

/retest

@knative-prow-robot knative-prow-robot merged commit 7c85368 into knative:master Aug 7, 2020
@arturenault arturenault deleted the dev/arenault/default-max-scale branch August 7, 2020 22:19
@markusthoemmes
Copy link
Contributor

@arturenault thanks for this! Would you please send a PR against the docs repository too to add this new global default? I'd imagine it to go here https://github.com/knative/docs/blob/master/docs/serving/autoscaling/scale-bounds.md#upper-bound and add a global key to the upper bound description, including an example for the ConfigMap/Operator in the example section of the upper-bound.

Lemme know if you need help there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers area/autoscale cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add config knob to set DefaultMaxScale
9 participants