stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
https://docs.stakater.com/reloader/
Apache License 2.0
7.72k stars 513 forks source link

With kubernetes/eks 1.30 or higher and sleep lifecycle the controller not restart deployment #757

Open mlophez opened 1 month ago

mlophez commented 1 month ago

Ref: https://github.com/stakater/Reloader/issues/754

When using Kubernetes 1.30 or higher, the Deployment object adds new lifecycle policies, such as sleeplifecycle. https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/

When you add this, the controller throws the following error and not restart deployment:

This happens because, in the current project libraries, the Deployment object does not have those properties. When we updated the project's libraries to version 1.31, the problem was resolved.

´´´ go get k8s.io/api@v0.31.1 go get k8s.io/apimachinery@v0.31.1 go get k8s.io/client-go@v0.31.1 go get k8s.io/kubectl@v0.31.1 ´´´

Only i update kubernetes library to minimize impact.