Skip to content

Scheduling docs are incorrect about preferred affinites sorting #9048

@thebearmayor

Description

@thebearmayor

Under Preferences it has

Karpenter starts by treating preferred affinities as required affinities when constructing requirements for a pod. When these requirements cannot be met, the pod’s preferences are relaxed one-at-a-time by ascending weight (lowest weight is relaxed first), and the remaining requirements are tried again.

However, the code shows that preferences are relaxed by descending weight.
https://github.com/kubernetes-sigs/karpenter/blob/v1.9.0/pkg/controllers/provisioning/scheduling/preferences.go#L59-L72

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions