Skip to content

Commit

Permalink
last comments
Browse files Browse the repository at this point in the history
  • Loading branch information
njtran committed Dec 15, 2023
1 parent 2cacbd4 commit 6856ee4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/content/en/preview/concepts/disruption.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ When calculating if a budget will block nodes from disruption, Karpenter lists t
If the budget is configured with a percentage value, such as `20%`, Karpenter will calculate the number of allowed disruptions as `allowed_disruptions = roundup(total * percentage) - total_deleting`. If otherwise defined as a non-percentage value, Karpenter will simply subtract the number of nodes from the total `(total * percentage) - total_deleting`. For multiple budgets in a NodePool, Karpenter will take the minimum value (most restrictive) of each of the budgets.
For example, the following NodePool with the following three budgets defines:
- When the NodePool has less than 25 nodes nodes, 20% disruptions would be allowed. For instance, if there were 19 nodes owned by the NodePool, 4 disruptions would be allowed, rounding up from `19 * .2 = 3.8`.
- When the NodePool has 25 or more nodes, only 5 disruptions are allowed, acting as a ceiling. When comparing to the 20% budget, 5 will be more restrictive than any percentage value, resulting in 5 allowed disruptions.
- The last budget selectively blocks disruptions during the first 10 minutes of the day, where 0 disruptions are allowed.
For example, the following NodePool with three budgets defines:
- The first budget will only allow 20% of nodes owned by that NodePool to be disrupted. For instance, if there were 19 nodes owned by the NodePool, 4 disruptions would be allowed, rounding up from `19 * .2 = 3.8`.
- The second budget acts as a ceiling to the previous budget, only allowing 5 disruptions when there are more than 25 nodes.
- The last budget only blocks disruptions during the first 10 minutes of the day, where 0 disruptions are allowed.
```yaml
apiVersion: karpenter.sh/v1beta1
Expand Down Expand Up @@ -236,7 +236,7 @@ Timezones are not supported. Most images default to UTC, but it is best practice
Duration allows compound durations with minutes and hours values such as `10h5m` or `30m` or `160h`. Since cron syntax does not accept denominations smaller than minutes, users can only define minutes or hours.
{{% alert title="Note" color="primary" %}}
Duration and Schedule can only be defined together. When omitted, the budget is always active. When defined, the schedule determines when a budget is active, and the duration determines how long from that point the budget is active.
Duration and Schedule must be defined together. When omitted, the budget is always active. When defined, the schedule determines a starting point where the budget will begin being enforced, and the duration determines how long from that starting point the budget will be enforced.
{{% /alert %}}
### Pod-Level Controls
Expand Down

0 comments on commit 6856ee4

Please sign in to comment.