Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] With kubernetes/eks 1.30 or higher and sleep lifecycle the controller not restart deployment #754

Open
mlophez opened this issue Sep 27, 2024 · 5 comments
Labels
good-first-issue A good starting point for new contributors kind/bug Something isn't working

Comments

@mlophez
Copy link
Contributor

mlophez commented Sep 27, 2024

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

@mlophez mlophez added the kind/bug Something isn't working label Sep 27, 2024
@MuneebAijaz MuneebAijaz added the good-first-issue A good starting point for new contributors label Sep 28, 2024
@MuneebAijaz
Copy link
Contributor

@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)

@mlophez
Copy link
Contributor Author

mlophez commented Oct 3, 2024

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.

@Agger1995
Copy link

Hi @MuneebAijaz.
What is the status on this issue? We are currently unable to utilize the new sleep preStop hooks due to this issue. Is it possible to get a release with this bug fix?

@MuneebAijaz
Copy link
Contributor

hi @Agger1995 Pls verify if its accessible now via 1.2.1 version

@Agger1995
Copy link

Hi! Thank you for the swift release. We are upgrading Reloader as we speak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue A good starting point for new contributors kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants