Skip to content

Commit 6da7bb8

Browse files
committed
fix: ignore empty CA string in in-cluster OIDC config to prevent TLS parse error
1 parent c8331e8 commit 6da7bb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/pkg/kubeconfig/kubeconfig.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,9 @@ func GetInClusterContext(oidcIssuerURL string,
983983
IdpIssuerURL: oidcIssuerURL,
984984
Scopes: strings.Split(oidcScopes, ","),
985985
SkipTLSVerify: &oidcSkipTLSVerify,
986-
CACert: &oidcCACert,
986+
}
987+
if strings.TrimSpace(oidcCACert) != "" {
988+
oidcConf.CACert = &oidcCACert
987989
}
988990
}
989991

0 commit comments

Comments
 (0)