forked from IBM/core-dump-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daemonset.yaml
117 lines (117 loc) · 4.08 KB
/
daemonset.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ .Values.daemonset.name }}
spec:
selector:
matchLabels:
name: {{ .Values.daemonset.label }}
template:
metadata:
labels:
name: {{ .Values.daemonset.label }}
spec:
containers:
- name: coredump-container
image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}
resources:
requests:
memory: {{ .Values.image.request_mem }}
cpu: {{ .Values.image.request_cpu }}
limits:
memory: {{ .Values.image.limit_mem }}
cpu: {{ .Values.image.limit_cpu }}
securityContext:
privileged: true
volumeMounts:
- name: host-volume
mountPath: {{ .Values.daemonset.hostDirectory }}
mountPropagation: Bidirectional
- name: core-volume
mountPath: {{ .Values.daemonset.coreDirectory }}
mountPropagation: Bidirectional
env:
- name: COMP_FILENAME_TEMPLATE
value: {{ .Values.composer.filenameTemplate | quote }}
- name: COMP_LOG_LENGTH
value: {{ .Values.composer.logLength | quote }}
- name: COMP_LOG_LEVEL
value: {{ .Values.composer.logLevel }}
- name: COMP_IGNORE_CRIO
value: {{ .Values.composer.ignoreCrio | quote }}
- name: COMP_CRIO_IMAGE_CMD
value: {{ .Values.composer.crioImageCmd }}
- name: COMP_POD_SELECTOR_LABEL
value: {{ .Values.composer.podSelectorLabel }}
- name: DEPLOY_CRIO_CONFIG
value: {{ .Values.daemonset.deployCrioConfig | quote }}
- name: CRIO_ENDPOINT
value: {{ .Values.daemonset.crioEndpoint | quote }}
- name: HOST_DIR
value: {{ .Values.daemonset.hostDirectory }}
- name: CORE_DIR
value: {{ .Values.daemonset.coreDirectory }}
- name: SUID_DUMPABLE
value: {{ .Values.daemonset.suidDumpable | quote }}
- name: DEPLOY_CRIO_EXE
value: {{ .Values.daemonset.includeCrioExe | quote }}
{{- if .Values.daemonset.manageStoreSecret }}
- name: S3_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3config
key: s3AccessKey
optional: true
- name: S3_SECRET
valueFrom:
secretKeyRef:
name: s3config
key: s3Secret
optional: true
- name: S3_BUCKET_NAME
valueFrom:
secretKeyRef:
name: s3config
key: s3BucketName
- name: S3_REGION
valueFrom:
secretKeyRef:
name: s3config
key: s3Region
{{- end }}
- name: VENDOR
value: {{ .Values.daemonset.vendor }}
- name: INTERVAL
value: {{ .Values.daemonset.interval | quote }}
- name: SCHEDULE
value: {{ .Values.daemonset.schedule | quote}}
- name: USE_INOTIFY
value: {{ .Values.daemonset.useINotify | quote }}
{{- if .Values.daemonset.extraEnvVars }}
{{ include "core-dump-handler.tplvalues.render" ( dict "value" .Values.daemonset.extraEnvVars "context" $) | nindent 10 }}
{{- end }}
command: ["/app/core-dump-agent"]
lifecycle:
preStop:
exec:
command: ["/app/core-dump-agent", "remove"]
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "core-dump-handler.serviceAccountName" . }}
volumes:
- name: host-volume
persistentVolumeClaim:
claimName: host-storage-pvc
- name: core-volume
persistentVolumeClaim:
claimName: core-storage-pvc