From e342076a5e0020d1a98aef4ffde10b4bbc617633 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 24 Sep 2021 21:59:33 +0300 Subject: [PATCH] deployment: clean up base/topologyupdater-daemonset The base should really have the very bare minimum. Remove all redundant (at default-value) args and move the others to the specific topologyupdater kustomize component. This also makes these settings re-usable in user-specific overlays (that are not based on topologyupdater-daemonset). --- .../topologyupdater-daemonset.yaml | 6 +----- .../components/topology-updater/kustomization.yaml | 4 ++++ .../components/topology-updater/sleep-interval-flag.yaml | 3 +++ .../topology-updater/topologyupdater-mounts.yaml | 9 +++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 deployment/components/topology-updater/sleep-interval-flag.yaml diff --git a/deployment/base/topologyupdater-daemonset/topologyupdater-daemonset.yaml b/deployment/base/topologyupdater-daemonset/topologyupdater-daemonset.yaml index f8197c9a1..b89483148 100644 --- a/deployment/base/topologyupdater-daemonset/topologyupdater-daemonset.yaml +++ b/deployment/base/topologyupdater-daemonset/topologyupdater-daemonset.yaml @@ -22,8 +22,4 @@ spec: command: - "nfd-topology-updater" args: - - "--kubelet-config-file=/host-var/lib/kubelet/config.yaml" - - "--podresources-socket=/host-var/lib/kubelet/pod-resources/kubelet.sock" - - "--sleep-interval=3s" - - "--watch-namespace=*" - - "--server=nfd-master:8080" + - "-server=nfd-master:8080" diff --git a/deployment/components/topology-updater/kustomization.yaml b/deployment/components/topology-updater/kustomization.yaml index 7dc6baf1c..b951ec605 100644 --- a/deployment/components/topology-updater/kustomization.yaml +++ b/deployment/components/topology-updater/kustomization.yaml @@ -10,3 +10,7 @@ patches: target: labelSelector: app=nfd name: nfd-topology-updater +- path: sleep-interval-flag.yaml + target: + labelSelector: app=nfd + name: nfd-topology-updater diff --git a/deployment/components/topology-updater/sleep-interval-flag.yaml b/deployment/components/topology-updater/sleep-interval-flag.yaml new file mode 100644 index 000000000..04d15311f --- /dev/null +++ b/deployment/components/topology-updater/sleep-interval-flag.yaml @@ -0,0 +1,3 @@ +- op: add + path: /spec/template/spec/containers/0/args/- + value: "-sleep-interval=3s" diff --git a/deployment/components/topology-updater/topologyupdater-mounts.yaml b/deployment/components/topology-updater/topologyupdater-mounts.yaml index c531284ca..c792c99e9 100644 --- a/deployment/components/topology-updater/topologyupdater-mounts.yaml +++ b/deployment/components/topology-updater/topologyupdater-mounts.yaml @@ -10,6 +10,7 @@ - name: kubelet-podresources-sock hostPath: path: /var/lib/kubelet/pod-resources/kubelet.sock + - op: add path: /spec/template/spec/containers/0/volumeMounts value: @@ -19,3 +20,11 @@ mountPath: /host-var/lib/kubelet/pod-resources/kubelet.sock - name: host-sys mountPath: /host-sys + +- op: add + path: /spec/template/spec/containers/0/args/- + value: "-kubelet-config-file=/host-var/lib/kubelet/config.yaml" + +- op: add + path: /spec/template/spec/containers/0/args/- + value: "-podresources-socket=/host-var/lib/kubelet/pod-resources/kubelet.sock"