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: