knative / serving-operator

DEPRECATED: Development continues in https://github.com/knative/operator/
Apache License 2.0
39 stars 48 forks source link

Respect HA Replicas setting in HPAs. #394

Closed markusthoemmes closed 4 years ago

markusthoemmes commented 4 years ago

Proposed Changes

If the operator has a HighAvailabiliy configuration and the replicas are set > 1, we probably want to adjust all HPAs to have at least as many minReplicas as specified in that HA config. An HPA being present is enough of a signal for us to assume that the component supports a HA configuration.

Release Note

Adjusts all HPAs to have at least the number of replicas specified by a potential HighAvailability configuration.
knative-metrics-robot commented 4 years ago

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

File Old Coverage New Coverage Delta
pkg/reconciler/knativeserving/common/ha.go 81.2% 80.0% -1.2
markusthoemmes commented 4 years ago

/assign @houshengbo @pmorie

pmorie commented 4 years ago

in practice, based on the current resources in serving config directory, i expect this initially to set spec.minReplicas of the activator HPA. Is that accurate?

pmorie commented 4 years ago

Discussed w/ @markusthoemmes offline that the behavior is what I expect.

/lgtm

houshengbo commented 4 years ago

@markusthoemmes This PR looks good. Would you mind contributing this PR to the new repo at https://github.com/knative-sandbox/operator, since we have set up the consolidated operator? Thx.

knative-prow-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, markusthoemmes

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/serving-operator/blob/master/OWNERS)~~ [aliok] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment