BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
39 stars 56 forks source link

Update cron job to use apiVersion: "batch/v1" #104

Closed pbolduc closed 1 year ago

pbolduc commented 1 year ago

Kubernetes introduced batch/v1 API version in 1.21. The batch/v1beta1 API version of CronJob is no longer served as of v1.25. The next version of OpenShift, 4.12 uses Kubernetes 1.25. OpenShift 4.12 was released around February 1, 2023. It will be the next version deployed to BC Gov OpenShift at sometime in the future. To avoid uses of this backup container breaking, it should move to using the new API version.

See: Deprecated API Migration Guide 1.25

WadeBarnes commented 1 year ago

@LawrenceLau2020, is this related to the message you sent me?

WadeBarnes commented 1 year ago

@pbolduc, @LawrenceLau2020, Feel free to make the updates, test things out, and submit a PR. This is a community driven project.

pbolduc commented 1 year ago

It is a simple change, however, I currently do not have a deployment in place to test. I mainly created the issue to bring the removal to the attention of those who do have this deployment.

WadeBarnes commented 1 year ago

@LawrenceLau2020, do you have a place to test this?

LawrenceLau2020 commented 1 year ago

Yes, we might be able to test this in our dev environment in OCP.

WadeBarnes commented 1 year ago

After a little investigation with @LawrenceLau2020, it turns out his concern is not related to the upgrade of the k8s version affecting the CronJob API version, but with the API version of a Tekton task they're using with the backup container. Separate component, separate release schedule ... separate concern.

WadeBarnes commented 1 year ago

PR submitted with the update.