Fix elasticsearch cronjob rendering

The pod security context for the elasticsearch cron jobs is in the wrong
location, causing an error when installing or upgrading the chart.

    ValidationError(CronJob.spec.jobTemplate.spec):
        unknown field "securityContext" in io.k8s.api.batch.v1.JobSpec

This change fixes the rendering.

Change-Id: I0e04b1ba27113d4b7aeefa2035b2b29c45be455a
This commit is contained in:
Phil Sphicas 2022-03-16 15:58:28 -07:00
parent 3a10c5ba95
commit c3da3a6f79
4 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v7.6.2
description: OpenStack-Helm ElasticSearch
name: elasticsearch
version: 0.2.13
version: 0.2.14
home: https://www.elastic.co/
sources:
- https://github.com/elastic/elasticsearch

View File

@ -38,12 +38,12 @@ spec:
labels:
{{ tuple $envAll "elasticsearch" "curator" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "curator" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
template:
metadata:
labels:
{{ tuple $envAll "elasticsearch" "curator" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }}
spec:
{{ dict "envAll" $envAll "application" "curator" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
nodeSelector:
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value | quote }}
serviceAccountName: {{ $serviceAccountName }}

View File

@ -40,12 +40,12 @@ spec:
annotations:
{{ dict "envAll" $envAll "podName" "elasticsearch-verify-repositories" "containerNames" (list "elasticsearch-verify-repositories" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "verify_repositories" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
template:
metadata:
labels:
{{ tuple $envAll "elasticsearch" "verify-repositories" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }}
spec:
{{ dict "envAll" $envAll "application" "verify_repositories" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
nodeSelector:
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value | quote }}
serviceAccountName: {{ $serviceAccountName }}

View File

@ -23,4 +23,5 @@ elasticsearch:
- 0.2.11 Enable TLS path between Curator and Elasticsearch
- 0.2.12 Helm 3 - Fix Job labels
- 0.2.13 Update htk requirements
- 0.2.14 Fix cronjob rendering
...