Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Move policy/v1beta1 to policy/v1 for K8s 1.25+ compatability #334

Closed

Conversation

jwitko
Copy link

@jwitko jwitko commented Feb 10, 2023

Fixes #333

Description

This PR moves policy/v1beta1 to policy/v1 for the PodDisruptionBudget. policy/v1beta1 was deprecated in K8s 1.21 and removed in 1.25. It should be noted that this PR will make K8s <1.21 unsupported.

This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Key changed/added files in this PR
  • PodDisruptionBudget

@jwitko jwitko force-pushed the feature/move-policy-v1beta1-to-v1 branch from 17247f3 to f8eda76 Compare February 10, 2023 19:34
@jwitko
Copy link
Author

jwitko commented Feb 13, 2023

I was able to build an image and test this in my cluster. Where it previously could not create past the historical pod it now generates all pods correctly.


1.67630906979728e+09 DEBUG events Normal {"object": {"kind":"Druid","namespace":"druid1","name":"druid1","uid":"c3deaede-1222-4577-8ce4-d7ca3e9b9872","apiVersion":"druid.apache.org/v1alpha1","resourceVersion":"91033849"}, "reason": "DruidOperatorCreateSuccess", "message": "Successfully created object [druid-druid1-historicals:*v1.PodDisruptionBudget] in namespace [druid1]"}

@AdheipSingh
Copy link
Contributor

@jwitko thanks. Also i wanting to do the same for HPA api too.

@jwitko
Copy link
Author

jwitko commented Feb 14, 2023

@jwitko thanks. Also i wanting to do the same for HPA api too.

Yes, that one is removed in 1.26 which is an active current release. I wasn't sure if this style PR would be appropriate or if it would be required to support both old and new. I can try to do the latter in this PR if required but it may get tricky in some parts.

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@jwitko jwitko force-pushed the feature/move-policy-v1beta1-to-v1 branch from f8eda76 to 63e1ef6 Compare February 21, 2023 14:36
@jwitko
Copy link
Author

jwitko commented Feb 23, 2023

Closing because it was merged in new repo datainfrahq/druid-operator

@jwitko jwitko closed this Feb 23, 2023
@jwitko jwitko deleted the feature/move-policy-v1beta1-to-v1 branch February 23, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update podDisruptionBudget apiVersion
2 participants