Kubernetes 1.25 removed support for CronJob API version batch/v1beta1 which is what the current chart version for the elasticsearch-logging-curator is set to use. This chart should be updated either by manually updating what is set in _helpers.tpl within that archive or by sourcing an updated version of the chart.
The simple fix is to replace the following section of the _helpers.tpl file in the roles/common/files/elasticsearch/elasticsearch-curator-1.3.3.tgz
{{/*
Return the appropriate apiVersion for cronjob APIs.
*/}}
{{- define "cronjob.apiVersion" -}}
{{- if semverCompare "< 1.8-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v2alpha1" }}
{{- else if semverCompare ">=1.8-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v1beta1" }}
{{- end -}}
{{- end -}}
With this that adds a section to use the correct version in k8s 1.21 as that is when it became available.
{{/*
Return the appropriate apiVersion for cronjob APIs.
*/}}
{{- define "cronjob.apiVersion" -}}
{{- if semverCompare "< 1.21-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v1beta1" }}
{{- else if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v1" }}
{{- end -}}
{{- end -}}
I have tested this change on K8s v1.27.1 and it allows this to be installed. This change should allow it to be installed on k8s 1.8 and above.
Kubernetes 1.25 removed support for CronJob API version
batch/v1beta1
which is what the current chart version for the elasticsearch-logging-curator is set to use. This chart should be updated either by manually updating what is set in _helpers.tpl within that archive or by sourcing an updated version of the chart.The simple fix is to replace the following section of the _helpers.tpl file in the
roles/common/files/elasticsearch/elasticsearch-curator-1.3.3.tgz
With this that adds a section to use the correct version in k8s 1.21 as that is when it became available.
I have tested this change on K8s v1.27.1 and it allows this to be installed. This change should allow it to be installed on k8s 1.8 and above.