From 41bf329bde82a47ff479275c866f2d130cce25c8 Mon Sep 17 00:00:00 2001 From: Poor12 Date: Mon, 11 Jul 2022 14:20:21 +0800 Subject: [PATCH] add warnings when config cluster-namespace as karmada-system Signed-off-by: Poor12 --- pkg/karmadactl/join.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/karmadactl/join.go b/pkg/karmadactl/join.go index fc386b9b8..26ce6ec0f 100644 --- a/pkg/karmadactl/join.go +++ b/pkg/karmadactl/join.go @@ -125,6 +125,9 @@ func (j *CommandJoinOption) Validate() error { return fmt.Errorf("invalid cluster name(%s): %s", j.ClusterName, strings.Join(errMsgs, ";")) } + if j.ClusterNamespace == util.NamespaceKarmadaSystem { + klog.Warningf("karmada-system is always reserved for Karmada control plane. We do not recommend using karmada-system to store secrets of member clusters. It may cause mistaken cleanup of resources.") + } return nil }