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

migrate to PodDisruptionBudget policy/v1

Open vroldanbet opened this issue 3 years ago • 5 comments
trafficstars

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

vroldanbet avatar Sep 20 '22 11:09 vroldanbet

CLA assistant check
All committers have signed the CLA.

cockroach-teamcity avatar Sep 20 '22 11:09 cockroach-teamcity

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 avatar Sep 21 '22 17:09 chrisseto

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

vroldanbet avatar Sep 22 '22 08:09 vroldanbet

@chrisseto friendly bump 🙏🏻

vroldanbet avatar Oct 07 '22 11:10 vroldanbet

@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. 🥴

chrisseto avatar Oct 11 '22 18:10 chrisseto

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!

chrisseto avatar Dec 08 '22 15:12 chrisseto

waiting for this to get approved ASAP ! operator refuses to work with kube installations of versions v1.25+

fuzzbuck avatar Dec 13 '22 03:12 fuzzbuck

Is there an ETA on this review?

imle avatar Jan 09 '23 00:01 imle

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.

DWSR avatar Jan 15 '23 22:01 DWSR

Hey there, this is being addressed in #940 which has been approved. Once that's merged we'll cut a new release.

pseudomuto avatar Jan 17 '23 17:01 pseudomuto