knative / operator

Combined operator for Knative.
Apache License 2.0
187 stars 98 forks source link

set HPA replica values when workload overrides are set #1548

Closed ReToCode closed 1 year ago

ReToCode commented 1 year ago

Fixes #762

Proposed Changes

Release Note

The operator now sets HorizontalPodAutoscaler replicas (on resources with HPAs) when workload overrides are defined.
ReToCode commented 1 year ago

/assign @nak3 /assign @skonto /assign @houshengbo

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 68.85% and project coverage change: +0.01% :tada:

Comparison is base (3d8c3fb) 79.25% compared to head (8266b1f) 79.26%. Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1548 +/- ## ========================================== + Coverage 79.25% 79.26% +0.01% ========================================== Files 40 41 +1 Lines 1822 1852 +30 ========================================== + Hits 1444 1468 +24 - Misses 275 279 +4 - Partials 103 105 +2 ``` | [Files Changed](https://app.codecov.io/gh/knative/operator/pull/1548?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative) | Coverage Δ | | |---|---|---| | [pkg/reconciler/common/hpa.go](https://app.codecov.io/gh/knative/operator/pull/1548?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL3JlY29uY2lsZXIvY29tbW9uL2hwYS5nbw==) | `65.90% <65.90%> (ø)` | | | [pkg/reconciler/common/workload\_override.go](https://app.codecov.io/gh/knative/operator/pull/1548?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL3JlY29uY2lsZXIvY29tbW9uL3dvcmtsb2FkX292ZXJyaWRlLmdv) | `83.03% <72.72%> (-0.95%)` | :arrow_down: | | [pkg/reconciler/common/ha.go](https://app.codecov.io/gh/knative/operator/pull/1548?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL3JlY29uY2lsZXIvY29tbW9uL2hhLmdv) | `77.77% <80.00%> (+13.77%)` | :arrow_up: | | [pkg/reconciler/common/transformers.go](https://app.codecov.io/gh/knative/operator/pull/1548?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL3JlY29uY2lsZXIvY29tbW9uL3RyYW5zZm9ybWVycy5nbw==) | `82.60% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

skonto commented 1 year ago

LGTM @houshengbo should we merge? @ReToCode does this need any doc updates here https://knative.dev/docs/install/operator/configuring-serving-cr/#high-availability or we are good?

ReToCode commented 1 year ago

@ReToCode does this need any doc updates here https://knative.dev/docs/install/operator/configuring-serving-cr/#high-availability or we are good?

No that should be fine. This does not change anything for the high-available field.

ReToCode commented 1 year ago

@houshengbo would you mind taking a look?

ReToCode commented 1 year ago

/assign @houshengbo

knative-prow[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[OWNERS](https://github.com/knative/operator/blob/main/OWNERS)~~ [houshengbo] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ReToCode commented 11 months ago

/cherry-pick release-1.11

knative-prow-robot commented 11 months ago

@ReToCode: new pull request created: #1575

In response to [this](https://github.com/knative/operator/pull/1548#issuecomment-1742675464): >/cherry-pick release-1.11 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.