postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Add support for Kubernetes 1.25

Open jelmer opened this issue 1 year ago • 3 comments

Add support for Kubernetes 1.25.

Move to CRDs removed in Kubernetes 1.25:

  • policyv1beta1.PodDisruptionBudget => policyv1.PodDisruptionBudget
  • batchv1beta1.CronJob => batchv1.CronJob
  • corev1.Handler => corev1.ProbeHandler

Update to minor change in apimachinery Patch functions.

Upgrade various go packages to newer versions.

Port to newer genericr/logr package

Issue: #3365

jelmer avatar Sep 03 '22 20:09 jelmer

Hey @cbandy, would you normally review a change like this? I'm looking for PGO support on 1.25

zevisert avatar Sep 12 '22 21:09 zevisert

Hi @jelmer!

I just wanted to quickly reach out let you know that we're currently working on some dependency updates in the following PR, which we will be working in-front of some planned updates to enable Kubernetes 1.25 support in PGO: https://github.com/CrunchyData/postgres-operator/pull/3362.

Therefore, I did want to be sure you were aware that we are planning to add support Kubernetes 1.25 in the coming weeks once https://github.com/CrunchyData/postgres-operator/pull/3362 is merged. We are happy to review this PR at that time (so feel free to leave it open!), but some changes/updates will likely be required.

andrewlecuyer avatar Sep 14 '22 23:09 andrewlecuyer

Hi Andrew,

Thanks for the heads-up. Happy to update this PR once the other changes happen.

jelmer avatar Sep 15 '22 04:09 jelmer

Hi @jelmer, First, thanks for this.

Second, I'm hoping to merge the dependency update sometime this week, which includes changes like a generic logging update, the Handler=>ProbeHandler change, and the patch change.

Since I'm handling that, could you simplify this PR to focus on the API deprecations for policyv1 and batchv1? That would be very helpful. Cheers!

benjaminjb avatar Sep 26 '22 02:09 benjaminjb

@benjaminjb done, rebased on your branch.

jelmer avatar Sep 26 '22 04:09 jelmer

Hey @jelmer thanks, my branch was still in-progress when you rebased -- can you maybe rebase off master now instead?

benjaminjb avatar Sep 29 '22 17:09 benjaminjb

@benjaminjb done

jelmer avatar Sep 29 '22 17:09 jelmer

Two things the linter caught:

  • internal/controller/postgrescluster/cluster_test.go is missing the import batchv1 "k8s.io/api/batch/v1"
  • internal/controller/postgrescluster/pgbouncer_test.go has the import policyv1 "k8s.io/api/policy/v1beta1" -- should drop the beta1 suffix

benjaminjb avatar Sep 29 '22 21:09 benjaminjb

Fixed!

jelmer avatar Sep 29 '22 22:09 jelmer