Open mlophez opened 2 weeks ago
@mlophez PRs are welcome for this fix. However, we would prefer it if the change can be tested on older versions to make sure it doesn't break community on older kubernetes versions. (< 1.30)
Hi @MuneebAijaz, i open PR for this, only update k8s libraries.
Unfortunately, I cannot test on earlier versions because our EKS clusters have already been updated. However, the Kubernetes libraries should be backward compatible with previous versions.
Describe the bug 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 ´´´
To Reproduce Use kubernetes 1.30 and use deployment with lifecycle sleep or kubernetes 1.29 with de alpha feature enable
Expected behavior The controller must be function as normally
Environment
Additional context