streamnative / function-mesh

The serverless framework purpose-built for event streaming applications.
https://functionmesh.io/
Apache License 2.0
213 stars 29 forks source link

Support special resource unit for VPA #748

Open jiangpengcheng opened 6 months ago

jiangpengcheng commented 6 months ago

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

  1. the ratio of CPU and Memory should keep the same, e.g. if the cpu is increased to 400m, the memory also needs to increase to 1600Mi
  2. the resource must increase at least 200m and 800Mi, e.g. if the cpu should be 211m, we need to increase it to 400m

but with the default vpa updater, we cannot do that, so create this PR to fit for our charging model

Modifications

Describe the modifications you've done.

Verifying this change

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

Documentation

Check the box below.

Need to update docs?

illegalnumbers commented 6 months ago

I took a look at this change and it seemed straightforward to me. I don't have a lot of context on this though, @freeznet or @nlu90 would be better to approve it. Also, the unit tests are still failing.