Skip to content

Commit

Permalink
Merge pull request #3 from JupiterOne/ints-16-cronjob-min-k8s
Browse files Browse the repository at this point in the history
Resolve issue where min supported cronjob wasn't calculated correctly by helm
  • Loading branch information
Kenan Warren authored Sep 14, 2021
2 parents 8b3bf95 + 4599449 commit 374b5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/graph-kubernetes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: graph-kubernetes
description:
Converts K8s resources into a graph model for ingestion into JupiterOne.
type: application
version: 0.2.0
version: 0.2.1
appVersion: '0.3.1'
3 changes: 2 additions & 1 deletion charts/graph-kubernetes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ Return the appropriate apiVersion for rbac.

{{/*
Return the appropriate apiVersion for cronjob.
We also add an extra check on the minimum k8s version because not all vendors
*/}}
{{- define "cronjob.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "batch/v1" }}
{{- if and (.Capabilities.APIVersions.Has "batch/v1") (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.GitVersion) }}
{{- print "batch/v1" -}}
{{- else -}}
{{- print "batch/v1beta1" -}}
Expand Down

0 comments on commit 374b5d7

Please sign in to comment.