From 98d2e347da12957cb7cbaf0138c377e73880d195 Mon Sep 17 00:00:00 2001 From: devenami Date: Wed, 20 Nov 2024 17:06:53 +0800 Subject: [PATCH] feat: support device plugin daemonset update strategy Signed-off-by: devenami --- charts/hami/templates/device-plugin/daemonsetnvidia.yaml | 4 ++++ charts/hami/values.yaml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/charts/hami/templates/device-plugin/daemonsetnvidia.yaml b/charts/hami/templates/device-plugin/daemonsetnvidia.yaml index 8874aee4..04d67491 100644 --- a/charts/hami/templates/device-plugin/daemonsetnvidia.yaml +++ b/charts/hami/templates/device-plugin/daemonsetnvidia.yaml @@ -12,6 +12,10 @@ metadata: annotations: {{ toYaml .Values.global.annotations | nindent 4}} {{- end }} spec: + updateStrategy: + {{- with .Values.devicePlugin.updateStrategy }} + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: app.kubernetes.io/component: hami-device-plugin diff --git a/charts/hami/values.yaml b/charts/hami/values.yaml index 7026f25c..7296c8a2 100644 --- a/charts/hami/values.yaml +++ b/charts/hami/values.yaml @@ -131,6 +131,14 @@ devicePlugin: nvidianodeSelector: gpu: "on" tolerations: [] + # The updateStrategy for DevicePlugin DaemonSet. + # If you want to update the DaemonSet by manual, set type as "OnDelete". + # We recommend use OnDelete update strategy because DevicePlugin pod restart will cause business pod restart, this behavior is destructive. + # Otherwise, you can use RollingUpdate update strategy to rolling update DevicePlugin pod. + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 devices: mthreads: