kubernetes-sigs / karpenter

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
Apache License 2.0
567 stars 188 forks source link

Karpenter does not respect reasons in budgets #1691

Open sergii-auctane opened 2 weeks ago

sergii-auctane commented 2 weeks ago

Description

Karpenter does not respect reasons in budgets. In my configuration i don't have budgets which would deny all three reasons. Observed Behavior:

57m         Normal    DisruptionBlocked            nodepool/eks-prodau-linux-amd64                                 No allowed disruptions for disruption reason Underutilized due to blocking budget
57m         Normal    DisruptionBlocked            nodepool/eks-prodau-linux-amd64                                 No allowed disruptions for disruption reason Empty due to blocking budget
57m         Normal    DisruptionBlocked            nodepool/eks-prodau-linux-amd64                                 No allowed disruptions for disruption reason Drifted due to blocking budget

Expected Behavior: The expected behavior is Karpenter to respect reasons in budgets and make a differentiation as described. This rule assumes disruptions for Empty and Drifted reasons allowed by one node at a time and denied for Underutilized nodes.

spec:
  disruption:
    budgets:
    - nodes: "2"
    - duration: 20h
      nodes: "1"
      reasons:
      - Empty
      - Drifted
      schedule: 0 7 * * *
    - duration: 20h
      nodes: "0"
      reasons:
      - Underutilized
      schedule: 0 7 * * *
    consolidateAfter: 30m
    consolidationPolicy: WhenEmptyOrUnderutilized

Reproduction Steps (Please include YAML):

Versions:

k8s-ci-robot commented 2 weeks ago

This issue is currently awaiting triage.

If Karpenter contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.