From fcd90b0d81c87c9a168a6c9009d13409506bfd4b Mon Sep 17 00:00:00 2001 From: Icarus9913 Date: Mon, 6 Nov 2023 14:45:35 +0800 Subject: [PATCH] add downward API for spiderpool-agent to get agent pod name and namespace Signed-off-by: Icarus9913 --- charts/spiderpool/templates/daemonset.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/spiderpool/templates/daemonset.yaml b/charts/spiderpool/templates/daemonset.yaml index 0aed7d0fe4..c329200ae9 100644 --- a/charts/spiderpool/templates/daemonset.yaml +++ b/charts/spiderpool/templates/daemonset.yaml @@ -210,6 +210,14 @@ spec: rm -f /host/etc/cni/net.d/00-multus.conf || true {{ .Values.spiderpoolAgent.binName }} shutdown env: + - name: SPIDERPOOL_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: SPIDERPOOL_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: SPIDERPOOL_LOG_LEVEL value: {{ .Values.spiderpoolAgent.debug.logLevel | quote }} - name: SPIDERPOOL_ENABLED_METRIC