-
Notifications
You must be signed in to change notification settings - Fork 74
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
disallow to configure traffic or match when a step has replicas more than threshold, for partition-style release only #225
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #225 +/- ##
==========================================
+ Coverage 43.63% 43.82% +0.19%
==========================================
Files 52 53 +1
Lines 5681 6037 +356
==========================================
+ Hits 2479 2646 +167
- Misses 2778 2925 +147
- Partials 424 466 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pkg/webhook/rollout/validating/rollout_create_update_handler.go
Outdated
Show resolved
Hide resolved
pkg/webhook/rollout/validating/rollout_create_update_handler.go
Outdated
Show resolved
Hide resolved
// In partition style, when the number of replicas for the new version is relatively small (i.e., less than PartitionReplicasLimitWithTraffic), | ||
// users can configure traffic strategies (traffic/matches). At this stage, it works similarly to canary style. | ||
// However, once the replicas for the new version exceed a certain proportion, we want the pods from both the new and old versions to receive traffic evenly. | ||
// Instead of having users manually set the proportion, we aim to achieve this through the Service and/or the upper-level load balancing mechanism. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having users manually set the proportion, we aim to achieve this through the Service and/or the upper-level load balancing mechanism.
this sentence is confusing
pkg/webhook/rollout/validating/rollout_create_update_handler.go
Outdated
Show resolved
Hide resolved
pkg/webhook/rollout/validating/rollout_create_update_handler.go
Outdated
Show resolved
Hide resolved
Signed-off-by: yunbo <yunbo10124scut@gmail.com>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg 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 |
Ⅰ. Describe what this PR does
add check to webhook of creating and updating Rollout, if a partition-style release step has
replicas
configured more than threshold (defaults to 30%), this step mustn't be configured with traffic strategy (ie.traffic
andmatches
must leave empty).Note:
rollouts.kruise.io/partition-replicas-limit
to Rollout to configure the threshold, for example, user may setrollouts.kruise.io/partition-replicas-limit: 100%
to virtually "disable" this check.weight
field without specifyingreplicas
(a common practice for v1alpha1, which is converted toreplicas
andtraffic
fields of v1beta1 with the same value automatically), they will encounter failure if weight is greater than the threshold.edit: modified the e2e tests to obey this restriction
Ⅱ. Does this pull request fix one issue?
Ⅲ. Special notes for reviews