@@ -99,3 +99,57 @@ Certificate DNS names
9999- {{ include " preflight.fullname" . }}. {{ .Release.Namespace }}.svc.cluster.local
100100{{- end }}
101101
102+ {{/*
103+ DCGM service endpoint - uses global.dcgm.service.endpoint with fallback to local
104+ */ }}
105+ {{- define " preflight.dcgmEndpoint" -}}
106+ {{- if and .Values.global .Values.global.dcgm .Values.global.dcgm.service }}
107+ {{- .Values.global.dcgm.service.endpoint | default .Values.dcgm.service.endpoint }}
108+ {{- else }}
109+ {{- .Values.dcgm.service.endpoint }}
110+ {{- end }}
111+ {{- end }}
112+
113+ {{/*
114+ DCGM service port - uses global.dcgm.service.port with fallback to local
115+ */ }}
116+ {{- define " preflight.dcgmPort" -}}
117+ {{- if and .Values.global .Values.global.dcgm .Values.global.dcgm.service }}
118+ {{- .Values.global.dcgm.service.port | default .Values.dcgm.service.port }}
119+ {{- else }}
120+ {{- .Values.dcgm.service.port }}
121+ {{- end }}
122+ {{- end }}
123+
124+ {{/*
125+ DCGM hostengine address - combines endpoint and port
126+ */ }}
127+ {{- define " preflight.dcgmHostengineAddr" -}}
128+ {{- printf " %s :%v " (include " preflight.dcgmEndpoint" . ) (include " preflight.dcgmPort" . ) }}
129+ {{- end }}
130+
131+ {{/*
132+ DCGM diagnostic level
133+ */ }}
134+ {{- define " preflight.dcgmDiagLevel" -}}
135+ {{- .Values.dcgm.diagLevel | default 1 }}
136+ {{- end }}
137+
138+ {{/*
139+ Event processing strategy
140+ */ }}
141+ {{- define " preflight.processingStrategy" -}}
142+ {{- .Values.dcgm.processingStrategy | default " EXECUTE_REMEDIATION" }}
143+ {{- end }}
144+
145+ {{/*
146+ Platform connector socket path for health event reporting
147+ Uses global.socketPath with unix:// prefix
148+ */ }}
149+ {{- define " preflight.connectorSocket" -}}
150+ {{- if and .Values.global .Values.global.socketPath }}
151+ {{- printf " unix://%s " .Values.global.socketPath }}
152+ {{- else }}
153+ {{- " unix:///var/run/nvsentinel.sock" }}
154+ {{- end }}
155+ {{- end }}
0 commit comments