K8s: omit CABundle until insecure is false (#84323)

This commit is contained in:
Charandas
2024-03-12 12:58:02 -07:00
committed by GitHub
parent cfc3957894
commit 0eee72824c

View File

@@ -136,7 +136,7 @@ func CreateAggregatorConfig(commandOptions *options.Options, sharedConfig generi
return NewConfig(aggregatorConfig, sharedInformerFactory, nil), nil return NewConfig(aggregatorConfig, sharedInformerFactory, nil), nil
} }
caBundlePEM, err := readCABundlePEM(commandOptions.AggregatorOptions.APIServiceCABundleFile, commandOptions.ExtraOptions.DevMode) _, err = readCABundlePEM(commandOptions.AggregatorOptions.APIServiceCABundleFile, commandOptions.ExtraOptions.DevMode)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -151,7 +151,8 @@ func CreateAggregatorConfig(commandOptions *options.Options, sharedConfig generi
// https://github.com/kubernetes/kubernetes/pull/123808 // https://github.com/kubernetes/kubernetes/pull/123808
InsecureSkipTLSVerify: true, InsecureSkipTLSVerify: true,
ExternalNamesNamespace: externalNamesNamespace, ExternalNamesNamespace: externalNamesNamespace,
CABundle: caBundlePEM, // TODO: CABundle can't be set when insecure is true
// CABundle: caBundlePEM,
Services: remoteServices, Services: remoteServices,
serviceClientSet: serviceClient, serviceClientSet: serviceClient,
} }