1 {{- $fullName := include "cmk.fullname" . -}}
2 {{- $exclusiveMode := .Values.exclusiveMode -}}
3 {{- $numExclusiveCores := .Values.numExclusiveCores -}}
4 {{- $sharedMode := .Values.sharedMode -}}
5 {{- $numSharedCores := .Values.numSharedCores -}}
6 {{- $pullPolicy := .Values.image.pullPolicy -}}
7 {{- $image := .Values.image.repository -}}
8 {{- $tag := .Values.image.tag -}}
9 {{- $noTaint := .Values.noTaint }}
10 {{ range splitList "," .Values.hosts.list }}
16 helm.sh/hook: pre-install,pre-upgrade,pre-rollback
17 helm.sh/hook-weight: "10"
19 app: {{ $fullName }}-init-discover-{{ . }}
20 name: {{ $fullName }}-init-discover-{{ . }}
24 serviceAccountName: {{ $fullName }}
31 image: {{ $image }}:{{ $tag }}
32 imagePullPolicy: {{ $pullPolicy }}
33 command: ["/bin/bash", "-c"]
35 - "/cmk/cmk.py install"
40 image: {{ $image }}:{{ $tag }}
41 imagePullPolicy: {{ $pullPolicy }}
49 fieldPath: spec.nodeName
50 command: ["/bin/bash", "-c"]
52 - "/cmk/cmk.py init --exclusive-mode={{ $exclusiveMode }} --num-exclusive-cores={{ $numExclusiveCores }} --shared-mode={{ $sharedMode }} --num-shared-cores={{ $numSharedCores }}"
54 - mountPath: /host/proc
58 image: {{ $image }}:{{ $tag }}
59 imagePullPolicy: {{ $pullPolicy }}
67 fieldPath: spec.nodeName
68 command: ["/bin/bash", "-c"]
70 - "/cmk/cmk.py discover {{ if $noTaint }}--no-taint{{ end }}"
72 - mountPath: /host/proc
82 type: DirectoryOrCreate