diff --git a/tools/pytorchjob-generator/chart/templates/_helpers.tpl b/tools/pytorchjob-generator/chart/templates/_helpers.tpl index f4e4fd4..c836ddc 100644 --- a/tools/pytorchjob-generator/chart/templates/_helpers.tpl +++ b/tools/pytorchjob-generator/chart/templates/_helpers.tpl @@ -277,7 +277,7 @@ imagePullSecrets: [] {{- define "mlbatch.securityContext" }} -{{- if gt ( int .Values.numRoceGdr ) 0 }} +{{- if or (gt ( int .Values.numRoceGdr ) 0) (eq .Values.serviceAccountName "gdr") }} securityContext: capabilities: add: