@@ -497,7 +497,7 @@ func (n *NIMService) GetStandardAnnotations() map[string]string {
497497 "openshift.io/required-scc" : "nonroot" ,
498498 utils .NvidiaAnnotationParentSpecHashKey : utils .DeepHashObject (n .Spec ),
499499 }
500- if n .GetProxySpec () != nil {
500+ if n .GetProxyCertConfigMap () != "" {
501501 standardAnnotations ["openshift.io/required-scc" ] = "anyuid"
502502 }
503503 return standardAnnotations
@@ -730,8 +730,8 @@ func (n *NIMService) GetVolumes(modelPVC *PersistentVolumeClaim) []corev1.Volume
730730 })
731731 }
732732
733- if n .GetProxySpec () != nil {
734- volumes = append (volumes , k8sutil .GetVolumesForUpdatingCaCert (n .Spec . Proxy .CertConfigMap )... )
733+ if n .GetProxyCertConfigMap () != "" {
734+ volumes = append (volumes , k8sutil .GetVolumesForUpdatingCaCert (n .GetProxySpec () .CertConfigMap )... )
735735 }
736736 return volumes
737737}
@@ -838,7 +838,7 @@ func (n *NIMService) GetVolumeMounts(modelPVC *PersistentVolumeClaim) []corev1.V
838838 },
839839 }
840840
841- if n .GetProxySpec () != nil {
841+ if n .GetProxyCertConfigMap () != "" {
842842 volumeMounts = append (volumeMounts , k8sutil .GetVolumesMountsForUpdatingCaCert ()... )
843843 }
844844 return volumeMounts
@@ -945,7 +945,7 @@ func (n *NIMService) GetDeploymentKind() string {
945945
946946// GetInitContainers returns the init containers for the NIMService deployment.
947947func (n * NIMService ) GetInitContainers () []corev1.Container {
948- if n .Spec . Proxy != nil {
948+ if n .GetProxyCertConfigMap () != "" {
949949 return []corev1.Container {
950950 {
951951 Name : "update-ca-certificates" ,
@@ -1583,6 +1583,14 @@ func (n *NIMService) GetProxySpec() *ProxySpec {
15831583 return n .Spec .Proxy
15841584}
15851585
1586+ // GetProxyCertConfigMap returns the cert config map for the NIMService deployment.
1587+ func (n * NIMService ) GetProxyCertConfigMap () string {
1588+ if n .GetProxySpec () != nil && n .GetProxySpec ().CertConfigMap != "" {
1589+ return n .GetProxySpec ().CertConfigMap
1590+ }
1591+ return ""
1592+ }
1593+
15861594// GetInferenceServiceParams returns params to render InferenceService from templates.
15871595func (n * NIMService ) GetInferenceServiceParams (
15881596 deploymentMode kserveconstants.DeploymentModeType ) * rendertypes.InferenceServiceParams {
0 commit comments