cloudposse / cloudposse/charts

[incubator/monochart]: CronJob is using deprecated batch/v1beta1 apiVersion

Open
#277 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Mustache
Stars
160
Forks
62
PR merge metrics
No merged PRs in 30d

Description

## Describe the Bug

Current [Job](https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/job.yaml#L5) is fine, but [CronJob](https://github.com/cloudposse/charts/blob/master/incubator/monochart/templates/cronjob.yaml#L5) still uses batch/v1beta1 which is not available since [Kubernetes v1.25](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125)

Applying a cronJob on Kubernetes >= 1.25 get rejected by Kubernetes API server

## Expected Behavior

Generated cronJob resources should be accepted.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Deploy Kubernetes >=1.25 (minikube, kind)
2. Edit values.yaml to have `cronJobs.default.enabled` to `true`
3. `helm template monochart . | kubectl apply --dry-run=server -f -`
4. See error

```
error: resource mapping not found for name: "monochart-monochart-default" namespace: "" from "STDIN": no matches for kind "CronJob" in version "batch/v1beta1"
ensure CRDs are installed first
```

## Environment:
- kubectl 1.28.2
- kind 0.17.0
- helm version 3.11
- incubator/monochart 0.28.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.