|
10 | 10 | metadata: |
11 | 11 | labels: |
12 | 12 | name: {{ .Values.daemonset.label }} |
| 13 | + annotations: |
| 14 | + kubectl.kubernetes.io/default-container: "coredump-container" |
13 | 15 | spec: |
14 | 16 | {{- with .Values.image.pullSecrets }} |
15 | 17 | imagePullSecrets: |
|
28 | 30 | cpu: {{ .Values.image.limit_cpu }} |
29 | 31 | securityContext: |
30 | 32 | privileged: true |
31 | | - volumeMounts: |
32 | | - - name: host-volume |
33 | | - mountPath: {{ .Values.daemonset.hostDirectory }} |
34 | | - mountPropagation: Bidirectional |
35 | | - - name: core-volume |
36 | | - mountPath: {{ .Values.daemonset.coreDirectory }} |
37 | | - mountPropagation: Bidirectional |
38 | | - {{- if .Values.composer.coreEvents }} |
39 | | - - name: event-volume |
40 | | - mountPath: {{ .Values.daemonset.eventDirectory }} |
41 | | - mountPropagation: Bidirectional |
42 | | - {{- end }} |
43 | | - {{- if .Values.daemonset.mountContainerRuntimeEndpoint }} |
44 | | - - mountPath: {{ .Values.daemonset.hostContainerRuntimeEndpoint }} |
45 | | - name: container-runtime |
46 | | - {{- end }} |
| 33 | + volumeMounts: {{ include "core-dump-handler.daemonset.container.volumeMounts" . | nindent 10 }} |
47 | 34 | env: |
48 | 35 | - name: COMP_FILENAME_TEMPLATE |
49 | 36 | value: {{ .Values.composer.filenameTemplate | quote }} |
@@ -114,11 +101,28 @@ spec: |
114 | 101 | {{- if .Values.daemonset.extraEnvVars }} |
115 | 102 | {{ include "core-dump-handler.tplvalues.render" ( dict "value" .Values.daemonset.extraEnvVars "context" $) | nindent 10 }} |
116 | 103 | {{- end }} |
| 104 | + {{- with .Values.daemonset.envFrom }} |
| 105 | + envFrom: |
| 106 | + {{- toYaml . | nindent 10 }} |
| 107 | + {{- end }} |
117 | 108 | command: ["/app/core-dump-agent"] |
118 | 109 | lifecycle: |
119 | 110 | preStop: |
120 | 111 | exec: |
121 | 112 | command: ["/app/core-dump-agent", "remove"] |
| 113 | + {{- range .Values.daemonset.sidecarContainers }} |
| 114 | + - {{ with . -}} |
| 115 | + securityContext: |
| 116 | + privileged: true |
| 117 | + volumeMounts: |
| 118 | + {{- include "core-dump-handler.daemonset.container.volumeMounts" $ | nindent 10 }} |
| 119 | + {{- if .volumeMounts -}} |
| 120 | + {{- toYaml .volumeMounts | nindent 10 }} |
| 121 | + {{- end }} |
| 122 | + {{- $_ := unset . "volumeMounts" -}} |
| 123 | + {{- toYaml . | nindent 8 -}} |
| 124 | + {{- end }} |
| 125 | + {{- end }} |
122 | 126 | {{- with .Values.nodeSelector }} |
123 | 127 | nodeSelector: |
124 | 128 | {{- toYaml . | nindent 8 }} |
|
0 commit comments