Feat: support connecting cluster via proxy url (#5875)

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
Somefive
2023-04-19 11:12:02 +08:00
committed by GitHub
parent 859702900f
commit feb819920e
+3
View File
@@ -136,6 +136,9 @@ func (clusterConfig *KubeClusterConfig) createOrUpdateClusterSecret(ctx context.
data["tls.crt"] = clusterConfig.AuthInfo.ClientCertificateData
data["tls.key"] = clusterConfig.AuthInfo.ClientKeyData
}
if clusterConfig.Cluster.ProxyURL != "" {
data["proxy-url"] = []byte(clusterConfig.Cluster.ProxyURL)
}
secret := &corev1.Secret{}
if err := cli.Get(ctx, apitypes.NamespacedName{Name: clusterConfig.ClusterName, Namespace: ClusterGatewaySecretNamespace}, secret); client.IgnoreNotFound(err) != nil {
return err