@@ -654,7 +654,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
654
654
// "odh-trusted-ca-bundle" can have fields: "odh-ca-bundle.crt" and "ca-bundle.crt", we need to utilize both
655
655
for _ , val := range globalCerts {
656
656
// If the ca-bundle field is empty, ignore it
657
- if val != "" {
657
+ if strings . TrimSpace ( val ) != "" {
658
658
p .APICustomPemCerts = append (p .APICustomPemCerts , []byte (val ))
659
659
}
660
660
}
@@ -679,7 +679,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
679
679
}
680
680
dspaProvidedCABundle := util .GetConfigMapValue (dspaCaBundleCfgKey , dspaCAConfigMap )
681
681
// If the ca-bundle field is empty, ignore it
682
- if dspaProvidedCABundle != "" {
682
+ if strings . TrimSpace ( dspaProvidedCABundle ) != "" {
683
683
p .APICustomPemCerts = append (p .APICustomPemCerts , []byte (dspaProvidedCABundle ))
684
684
}
685
685
}
@@ -694,7 +694,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
694
694
return serviceCACfgErr
695
695
}
696
696
serviceCABundle := util .GetConfigMapValue (config .OpenshiftServiceCAConfigMapKey , serviceCA )
697
- if serviceCABundle == "" {
697
+ if strings . TrimSpace ( serviceCABundle ) == "" {
698
698
return fmt .Errorf ("expected key %s from configmap %s not found" , config .OpenshiftServiceCAConfigMapKey , config .OpenshiftServiceCAConfigMapName )
699
699
}
700
700
p .APICustomPemCerts = append (p .APICustomPemCerts , []byte (serviceCABundle ))
@@ -729,7 +729,7 @@ func (p *DSPAParams) ExtractParams(ctx context.Context, dsp *dspa.DataSciencePip
729
729
return sysCertsErr
730
730
}
731
731
732
- if len (certs ) != 0 {
732
+ if len (bytes . TrimSpace ( certs ) ) != 0 {
733
733
p .APICustomPemCerts = append (p .APICustomPemCerts , certs )
734
734
}
735
735
}
0 commit comments