Remove Api version requirement for CronJob Curator

Curator job in Elasticsearch helm chart has a condition on
api version batch/v2alpha1. Cronjob resource is deprecated
in batch/v2alpha1 from k8s 1.8 and batch/v1beta1 is enabled
by default.

Remove the condition on API version as it is no more required.

Closes-Bug: #1753524
Change-Id: Ia296b3742e655fae508e5d4402e7f3881db31688
This commit is contained in:
Hemanth Nakkina 2018-03-05 21:23:49 +05:30
parent d6e9fa2c5a
commit 5392ac810b
2 changed files with 1 additions and 4 deletions

View File

@ -15,14 +15,13 @@ limitations under the License.
*/}}
{{- if .Values.manifests.cron_curator }}
{{- if .Capabilities.APIVersions.Has "batch/v2alpha1" }}
{{- $envAll := . }}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.curator -}}
{{- $serviceAccountName := "elastic-curator"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
---
apiVersion: batch/v2alpha1
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: elastic-curator
@ -72,4 +71,3 @@ spec:
name: elasticsearch-etc
defaultMode: 0444
{{- end }}
{{- end }}

View File

@ -31,7 +31,6 @@ token: {{ kubeadm_bootstrap_token }}
tokenTTL: 24h0m0s
selfHosted: {{ k8s.selfHosted }}
apiServerExtraArgs:
runtime-config: "batch/v2alpha1=true"
service-node-port-range: "1024-65535"
controllerManagerExtraArgs:
address: "0.0.0.0"