cockroach-operator
cockroach-operator copied to clipboard
migrate to PodDisruptionBudget policy/v1
Fixes https://github.com/cockroachdb/cockroach-operator/issues/928
PodDisruptionBudget v1beta is deprecated in Kube 1.25. This PR moves the codebase to start using v1.
See https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125
The policy/v1beta1 API version of PodDisruptionBudget will no longer be served in v1.25.
- Migrate manifests and API clients to use the policy/v1 API version, available since v1.21.
- All existing persisted objects are accessible via the new API
- Notable changes in policy/v1:
- an empty spec.selector ({}) written to a policy/v1 PodDisruptionBudget selects all pods in the namespace (in policy/v1beta1 an empty spec.selector selected no pods). An unset spec.selector selects no pods in either API version.
Add a description of the problem this PR addresses and an overview of how this PR works.
Checklist
- [x] I have added these changes to the changelog (or it's not applicable).
That's for the contribution @vroldanbet! Can you update the line in the README.md and the CHANGELOG to indicate that Kubernetes >= 1.21 is now required? That's the version that policy/v1 was introduced according to the note you've linked.
You might get yelled at by our linters for the header changes because we haven't updated to the latest version of Go yet. If so, could you back out those changes? Thanks!
@chrisseto thanks for the hints, just pushed changes to CHANGELOG and README! It seems e2e tests are failing due to a block storage bucket being unavailable. It would seem to host some of the binaries used. Is that something y'all can fix?
WARNING: Download from https://storage.googleapis.com/crdb-bazel-artifacts/linux/kubetest2 failed: class java.io.FileNotFoundException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'kubetest2_linux'
There is also a templates job failing. It would seem like y'all use a manually triggered GitHub Action to open a PR to update all the CRDB versions available to the operator. I believe I don't have permission to trigger it.
@chrisseto friendly bump 🙏🏻
@vroldanbet thanks for the bump!
We're currently looking into fixing the e2e tests and would like to get them running again before merging this.
A bucket from a contractor with some custom binaries got deleted and we're still tracking down the right versions. 🥴
Sorry for the lengthy delay @vroldanbet! Would you mind rebasing this PR and marking it as ready for review once you have? Our tests should be running again. Thanks!
waiting for this to get approved ASAP ! operator refuses to work with kube installations of versions v1.25+
Is there an ETA on this review?
Hey, trying to use the operator on my Kubernetes 1.26 cluster and it won't install because it's still using policy/v1beta1. Can one of the project maintainers take over rebasing the branch and merging?
Edit: The PR description is inaccurate btw. policy/v1beta1 was deprecated in 1.21 and removed in 1.25.
Hey there, this is being addressed in #940 which has been approved. Once that's merged we'll cut a new release.