2 # Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 {{- if .Values.enabled }}
17 {{- range $kind, $enabled := .Values.hooks }}
23 name: {{ include "common.fullname" . }}-curator-on-{{ $kind }}
24 namespace: {{ include "common.namespace" . }}
25 labels: {{- include "common.labels" . | nindent 2 }}
28 "helm.sh/hook": post-{{ $kind }}
29 "helm.sh/hook-weight": "1"
30 {{- if $.Values.cronjob.annotations }}
31 {{ toYaml $.Values.cronjob.annotations | indent 4 }}
35 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
40 name: {{ template "common.fullname" (dict "suffix" "curator" "dot" .) }}
41 {{- if $.Values.extraVolumes }}
42 {{ toYaml $.Values.extraVolumes | indent 8 }}
45 {{- if $.Values.priorityClassName }}
46 priorityClassName: "{{ $.Values.priorityClassName }}"
49 - name: {{ template "common.fullname" . }}-curator
50 image: {{printf "%s/%s" (include "repositoryGenerator.repository" .) .Values.image }}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 mountPath: /etc/es-curator
55 {{- if $.Values.extraVolumeMounts }}
56 {{ toYaml $.Values.extraVolumeMounts | indent 12 }}
58 command: [ "curator" ]
59 args: [ "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ]
61 {{ toYaml $.Values.resources | indent 12 }}
62 {{- with $.Values.nodeSelector }}
64 {{ toYaml . | indent 8 }}
66 {{- with $.Values.affinity }}
68 {{ toYaml . | indent 8 }}
70 {{- with $.Values.tolerations }}
72 {{ toYaml . | indent 8 }}