kubernetes-sigs / descheduler

Descheduler for Kubernetes
https://sigs.k8s.io/descheduler
Apache License 2.0
4.23k stars 645 forks source link

Unable to create a profile" err="unable to build DefaultEvictor plugin #1440

Open timetofaceit opened 2 weeks ago

timetofaceit commented 2 weeks ago

Hi!

I'm facing an error in Descheduler pod logs:

"unable to create a profile" err="unable to build DefaultEvictor plugin: unable to initialize \"DefaultEvictor\" plugin: indexer conflict: map[metadata.ownerReferences:{}]" profile="Descheduler"

I'm installing Descheduler via Helm Chart v0.30.1 with Deployment mode.

My policy config looks like this:

deschedulerPolicy:
  profiles:
    - name: "Descheduler"
      pluginConfig:
        - name: "DefaultEvictor"
          args:
            evictLocalStoragePods: false
            evictSystemCriticalPods: false
            ignorePvcPods: false
            evictFailedBarePods: false
            nodeFit: true
            minReplicas: 2
        - name: "RemoveDuplicates"
        - name: "LowNodeUtilization"
          args:
            thresholds:
              cpu : 30
              memory: 30
              pods: 20
            targetThresholds:
              cpu : 80
              memory: 80
              pods: 50
        - name: "HighNodeUtilization"
          args:
            thresholds:
              cpu : 80
              memory: 80
              pods: 50
        - name: "RemovePodsViolatingInterPodAntiAffinity"
        - name: "RemovePodsViolatingNodeTaints"
        - name: "RemovePodsViolatingNodeAffinity"
          args:
            nodeAffinityType:
              - "requiredDuringSchedulingIgnoredDuringExecution"
        - name: "RemovePodsViolatingTopologySpreadConstraint"
          args:
            topologyBalanceNodeFit: true
            constraints:
              - "DoNotSchedule"
              - "ScheduleAnyway"
      plugins:
        balance:
          enabled:
            - "RemoveDuplicates"
            - "LowNodeUtilization"
            - "HighNodeUtilization"
            - "RemovePodsViolatingTopologySpreadConstraint"
        deschedule:
          enabled:
            - "RemovePodsViolatingInterPodAntiAffinity"
            - "RemovePodsViolatingNodeAffinity"
            - "RemovePodsViolatingNodeTaints"

I also see that when pod starts, everything works fine until CronJob finishes... Then I'm starting to get these errors...

Maybe I'm configuring something wrong? 🤔

ggggut commented 4 days ago

It seems related to minReplicas. Removing it fixes the problem for me..

a7i commented 3 days ago

Thank you for reporting this @timetofaceit /assign