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

Use CronJob batch/v1 resource version if available #11

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

ikeeip
Copy link
Contributor

@ikeeip ikeeip commented Dec 2, 2021

The batch/v2alpha1 CronJob type definitions and clients are deprecated and removed in Kubernetes v1.21. This patch fix deprecation warnings related to version change.

Kubernetes v1.20.7 output:

$ kubectl version | grep Server
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-27T23:27:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}

$ helm install foo deploy/helm/kubernetes --dry-run | grep -B1 CronJob
apiVersion: batch/v1beta1
kind: CronJob

Kubernetes v1.21.1 output:

$ kubectl version | grep Server
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

$ helm install foo deploy/helm/kubernetes --dry-run | grep -B1 CronJob
apiVersion: batch/v1
kind: CronJob

@kvaps
Copy link
Member

kvaps commented Dec 23, 2021

Hi thank you for your contribution and sorry for late reply,

In order to keep this chart as compatible as possible with the other management and templating tools, eg argocd and jsonnet. I'd like to avoid using lookup and capabilities feature.
This would allow you to render simple yaml without accessing end cluster, and just apply it when it will be needed.

Thus, let's just update the apiVersion and bump required Kubernetes version in README.md file

The batch/v2alpha1 CronJob type definitions and clients are
deprecated and removed in Kubernetes v1.21

Signed-off-by: Konstantin Misyutin <[email protected]>
@ikeeip
Copy link
Contributor Author

ikeeip commented Dec 28, 2021

Thus, let's just update the apiVersion and bump required Kubernetes version in README.md file

Done!

Copy link
Member

@kvaps kvaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@kvaps kvaps merged commit 12c9125 into aenix-io:master Dec 28, 2021
@kvaps kvaps mentioned this pull request Feb 24, 2022
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.

None yet

2 participants