From 21084b737de9ef728c9dd92df7172cb3cdd6c233 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 10 Aug 2023 17:19:23 -0600 Subject: [PATCH] whereabouts: update charts to pass `spec.nodeName` to pod Update DaemonSet to pass `spec.nodeName` via a new `NODENAME` environment variable. Introduced by whereabouts v0.6.2: https://github.com/k8snetworkplumbingwg/whereabouts/pull/309 Signed-off-by: Michael Fritch --- whereabouts/templates/cluster_role.yaml | 5 +++++ whereabouts/templates/daemonset.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/whereabouts/templates/cluster_role.yaml b/whereabouts/templates/cluster_role.yaml index 148ae90..04fe144 100644 --- a/whereabouts/templates/cluster_role.yaml +++ b/whereabouts/templates/cluster_role.yaml @@ -28,6 +28,11 @@ rules: verbs: - list - watch +- apiGroups: [""] + resources: + - nodes + verbs: + - get - apiGroups: ["k8s.cni.cncf.io"] resources: - network-attachment-definitions diff --git a/whereabouts/templates/daemonset.yaml b/whereabouts/templates/daemonset.yaml index fda9b24..12db765 100644 --- a/whereabouts/templates/daemonset.yaml +++ b/whereabouts/templates/daemonset.yaml @@ -37,6 +37,11 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + - name: NODENAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName - name: WHEREABOUTS_NAMESPACE valueFrom: fieldRef: