druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 92 forks source link

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

Closed jwitko closed 1 year ago

jwitko commented 1 year ago

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:


Key changed/added files in this PR
jwitko commented 1 year ago

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 commented 1 year ago

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

jwitko commented 1 year ago

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

jwitko commented 1 year ago

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