Use the kube-system UID to identify if the member cluster already exists

This commit is contained in:
Xinzhao Xu
2022-01-27 11:27:41 +08:00
parent 794129d056
commit d3ed81059f
4 changed files with 55 additions and 93 deletions

View File

@@ -19,6 +19,7 @@ package v1alpha1
import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
const (
@@ -168,6 +169,9 @@ type ClusterStatus struct {
// every amount of time, like 5 minutes.
// +optional
Configz map[string]bool `json:"configz,omitempty"`
// UID is the kube-system namespace UID of the cluster, which represents the unique ID of the cluster.
UID types.UID `json:"uid,omitempty"`
}
// +genclient