kubernetes-sigs / descheduler

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

Helm Chart Install Fails - CronJob in version "v1" cannot be handled as a CronJob: json: cannot unmarshal object into Go struct field Container.spec.jobTemplate.spec.template.spec.containers.args of type string #1227

Closed alextricity25 closed 12 months ago

alextricity25 commented 1 year ago

What version of descheduler are you using?

descheduler version: Helm Chart Version 0.28.0

Does this issue reproduce with the latest release? Yes

Which descheduler CLI options are you using? Installing Helm Chart

Please provide a copy of your descheduler policy config file We are using Pulumi to install the helm chart, and are using the following values:

export const descheduler = new helm.v3.Release('descheduler', {
  name: 'descheduler',
  chart: 'descheduler',
  repositoryOpts: {
    repo: 'https://kubernetes-sigs.github.io/descheduler/',
  },
  namespace: 'kube-system',
  values: {
    image: {
      repository: 'registry.k8s.io/descheduler/descheduler',
    },
    replicas: 2,
    deschedulerPolicy: {
      strategies: {
        RemoveDuplicates: {
          enabled: false,
        },
        RemovePodsHavingTooManyRestarts: {
          enabled: false,
        },
        RemovePodsViolatingNodeTaints: {
          enabled: false,
        },
        RemovePodsViolatingNodeAffinity: {
          enabled: false,
        },
        RemovePodsViolatingInterPodAntiAffinity: {
          enabled: false,
        },
        RemovePodsViolatingTopologySpreadConstraint: {
          enabled: true,
          params: {
            includeSoftConstraints: false,
          },
        },
        LowNodeUtilization: {
          enabled: false,
        },
      },
    },
  },
}, {
  provider: clusterProvider,
});

What k8s version are you using (kubectl version)? 1.27.3-gke.100

kubectl version Output
$ kubectl version

What did you do? Attempted to install helm chart version 0.28.0

What did you expect to see? Successful installation of helm chart 0.28.0

What did you see instead?

  kubernetes:helm.sh/v3:Release (descheduler):                                                                                                                                                                                              
    warning: Helm release "descheduler" was created but has a failed status. Use the `helm` command to investigate the error, correct it, then retry. Reason: 1 error occurred:                                                             
        * CronJob in version "v1" cannot be handled as a CronJob: json: cannot unmarshal object into Go struct field Container.spec.jobTemplate.spec.template.spec.containers.args of type string                                           
    error: 1 error occurred:                                                                                                                                                                                                                
        * Helm release "kube-system/descheduler" was created, but failed to initialize completely. Use Helm CLI to investigate.: failed to become available within allocated timeout. Error: Helm Release kube-system/descheduler: 1 error o
ccurred:                                                                                                                                                                                                                                    
        * CronJob in version "v1" cannot be handled as a CronJob: json: cannot unmarshal object into Go struct field Container.spec.jobTemplate.spec.template.spec.containers.args of type string  

Downgrading to helm chart version 0.27.1 fixes the issue.

cayla commented 1 year ago

This was fixed in #1229