postgres-operator
postgres-operator copied to clipboard
Add support for Kubernetes 1.25
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
Hey @cbandy, would you normally review a change like this? I'm looking for PGO support on 1.25
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.
Hi Andrew,
Thanks for the heads-up. Happy to update this PR once the other changes happen.
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 done, rebased on your branch.
Hey @jelmer thanks, my branch was still in-progress when you rebased -- can you maybe rebase off master
now instead?
@benjaminjb done
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
Fixed!