Commit 810681d1 authored by Radu Carpa's avatar Radu Carpa Committed by rcarpa
Browse files

all: make CronJob compatible with k8s 1.25+. Closes #118

The old API is deprecated already and was removed in 1.25:
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125
parent 91eed642
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
name: rucio-daemons
version: 1.29.9
version: 1.29.10
apiVersion: v1
description: A Helm chart to deploy daemons for Rucio
keywords:
+11 −0
Original line number Diff line number Diff line
@@ -30,3 +30,14 @@ Create chart name and version as used by the chart label.
{{- define "rucio.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Get CronJob Kube API Version
*/}}
{{- define "rucio.kubeApiVersion.cronjob" -}}
  {{- if semverCompare ">= 1.22.x" (default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride) -}}
    {{- print "batch/v1" -}}
  {{- else -}}
    {{- print "batch/v1beta1" -}}
  {{- end -}}
{{- end -}}
+1 −1
Original line number Diff line number Diff line
{{- if .Values.automaticRestart.enabled -}}
apiVersion: batch/v1beta1
apiVersion: {{ template "rucio.kubeApiVersion.cronjob" . }}
kind: CronJob
metadata:
  name: {{ .Release.Name }}-automatic-restart
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@

{{- if .Values.ftsRenewal.enabled -}}
---
apiVersion: batch/v1beta1
apiVersion: {{ template "rucio.kubeApiVersion.cronjob" . }}
kind: CronJob
metadata:
  name: {{ .Release.Name }}-renew-fts-proxy
+1 −1
Original line number Diff line number Diff line
name: rucio-server
version: 1.29.3
version: 1.29.4
apiVersion: v1
description: A Helm chart to deploy servers for Rucio
keywords:
Loading