reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

batch/v1beta1 CronJob is deprecated in v1.21+ #97

Closed tommady closed 2 years ago

tommady commented 2 years ago

Hi, I am using the kubegres for a while in the EKS k8s v1.21 cluster and my log keeps showing the below message

batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob

I am not sure if it needed to be fixed right now, but I'd be glad to upgrade it.

I tried to create a PR, (yet but following the contribution guide I have to open an issue first)

so here I am. please guide me if I was doing anything wrong 🙇🏻 Thanks!

samstride commented 2 years ago

@tommady , that's just a warning, and such warnings are quite popular when things are deprecated.

Remember, people still run older version of k8s, for example, a cluster could be on say, v1.18 and if we try to use batch/v1 (instead of batch/v1beta1) on such a cluster, it might fail.

Applying this upgrade means that a minimum k8s version of 1.21. is needed. In the end it will be up to the maintainers to decide.

I think it might be better to update the readme with the supported k8s versions for each release.

tommady commented 2 years ago

@tommady , that's just a warning, and such warnings are quite popular when things are deprecated.

Remember, people still run older version of k8s, for example, a cluster could be on say, v1.18 and if we try to use batch/v1 (instead of batch/v1beta1) on such a cluster, it might fail.

Applying this upgrade means that a minimum k8s version of 1.21. is needed. In the end it will be up to the maintainers to decide.

I think it might be better to update the readme with the supported k8s versions for each release.

Oh yes you are right. Sorry for the bothering.

sambonbonne commented 2 years ago

I'm sorry to comment this issue but Kubernetes 1.25 is out now, it means Kubegres can't work anymore if a cluster is upgraded to the latest version. It can prevent some people to upgrade their cluster(s).

Maybe this issue should be re-opened? At least a warning on the README.md would be nice.

alex-arica commented 2 years ago

Kubegres 1.16 is compatible with Kubernetes 1.25 https://github.com/reactive-tech/kubegres/releases/tag/v1.16