feat: proxy mode support proxy multiple workloads

This commit is contained in:
fengcaiwen
2025-01-18 11:13:09 +08:00
parent 12920650ba
commit 7d028fc950
15 changed files with 380 additions and 337 deletions

View File

@@ -38,11 +38,10 @@ func GetClusterIDByCM(cm *v1.ConfigMap) types.UID {
return cm.UID
}
func IsSameCluster(client v12.ConfigMapInterface, namespace string, clientB v12.ConfigMapInterface, namespaceB string) (bool, error) {
func IsSameCluster(ctx context.Context, client v12.ConfigMapInterface, namespace string, clientB v12.ConfigMapInterface, namespaceB string) (bool, error) {
if namespace != namespaceB {
return false, nil
}
ctx := context.Background()
clusterIDA, err := GetClusterID(ctx, client)
if err != nil {
return false, err