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

BYO scaledobject #31

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Jul 22, 2024

Changes

  • Allow user to define their own scaled object. This can be done per service or globally.

/kind

Fixes #13

Release Note

BYO scaledobject is now supported and can be configured per service.

Copy link

knative-prow bot commented Jul 22, 2024

@skonto: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

Changes

  • Allow user to define their own scaled object. This can be done per service or globally.
  • TODO: add an example to doc files

/kind

Fixes #13

Release Note

BYO scaledobject is now supported and can be configured per service.

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.

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2024
@knative-prow knative-prow bot requested review from cardil and ReToCode July 22, 2024 14:09
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 22, 2024
@@ -82,7 +82,7 @@ func setupCustomHPASvc(t *testing.T, metric string, target int) *TestContext {
autoscaling.MinScaleAnnotationKey: "1",
autoscaling.MaxScaleAnnotationKey: fmt.Sprintf("%d", int(maxPods)),
autoscaling.WindowAnnotationKey: "20s",
resources2.KedaAutoscaleAnotationPrometheusQuery: "sum(rate(http_requests_total{}[1m]))",
resources2.KedaAutoscaleAnotationPrometheusQuery: fmt.Sprintf("sum(rate(http_requests_total{namespace='%s'}[1m]))", test.ServingFlags.TestNamespace),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be specific to the namespace where metrics are emitted.

@skonto skonto requested review from dsimansk and removed request for cardil July 22, 2024 14:10
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 51.21951% with 20 lines in your changes missing coverage. Please review.

Project coverage is 83.28%. Comparing base (71dad4a) to head (4ed5c93).
Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/autoscaling/hpa/keda_hpa.go 39.39% 13 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   84.10%   83.28%   -0.82%     
==========================================
  Files           8        8              
  Lines         346      359      +13     
==========================================
+ Hits          291      299       +8     
- Misses         39       43       +4     
- Partials       16       17       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 22, 2024
@skonto skonto changed the title [wip] BYO scaledobject BYO scaledobject Jul 22, 2024
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2024
const allActivators = 0
const (
allActivators = 0
KedaAutoscaleAnotationAutocreate = autoscaling.GroupName + "/scaled-object-auto-create"
Copy link
Member

Choose a reason for hiding this comment

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

KedaAutoscaleAnnotationAutocreate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see the same spelling error elsewhere. I am going to fix it.

# have their Knative service annotation `autoscaling.knative.dev/scaled-object-auto-create` set to true.
# By setting `autoscaling.knative.dev/scaled-object-auto-create` at the Knative Service level you can bypass
# this configuration and by setting to false you can bring your own scaled object.

Copy link
Member

Choose a reason for hiding this comment

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

probably no newline here?

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

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

only nit stuff

@skonto
Copy link
Contributor Author

skonto commented Jul 23, 2024

@ReToCode I think this is ready.

Copy link
Member

@ReToCode ReToCode 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

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2024
Copy link

knative-prow bot commented Jul 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ReToCode, skonto

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 knative-prow bot merged commit 8abc7c7 into knative-extensions:main Jul 23, 2024
22 checks passed
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. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow non-managed mode
2 participants