-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_helpers.tpl
More file actions
51 lines (47 loc) · 1.18 KB
/
_helpers.tpl
File metadata and controls
51 lines (47 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{{/* Generate helmbroker deployment envs */}}
{{- define "helmbroker.envs" -}}
env:
{{- range $key, $value := .Values.environment }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{/* Generate helmbroker deployment limits */}}
{{- define "helmbroker.limits" -}}
{{- if or (.Values.limits_cpu) (.Values.limits_memory) }}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end }}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end }}
{{- end }}
{{- end }}
{{/* Generate helmbroker deployment volumeMounts */}}
{{- define "helmbroker.volumeMounts" }}
volumeMounts:
- name: drycc-helmbroker-cm
mountPath: "/etc/helmbroker/config"
readOnly: true
{{- if .Values.persistence.enabled }}
- name: helmbroker-data
mountPath: /etc/helmbroker
{{- end }}
{{- end }}
{{/* Generate helmbroker deployment volumes */}}
{{- define "helmbroker.volumes" }}
volumes:
- name: drycc-helmbroker-cm
configMap:
name: drycc-helmbroker-cm
{{- if .Values.persistence.enabled }}
- name: helmbroker-data
persistentVolumeClaim:
claimName: drycc-helmbroker
{{- else}}
- name: helmbroker-data
emptyDir: {}
{{- end }}
{{- end }}