Description
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:
time="2024-09-26T06:24:29Z" level=error msg="Update for of type 'Deployment' in namespace 'core' failed with error Deployment.apps is invalid: spec.template.spec.containers[0].lifecycle.preStop: Required value: must specify a handler type"
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/[email protected]
go get k8s.io/[email protected]
go get k8s.io/[email protected]
go get k8s.io/[email protected]
´´´
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
- Operator Version: master
- Kubernetes/OpenShift Version: 1.31
Additional context
Activity