add warnings when config cluster-namespace as karmada-system

Signed-off-by: Poor12 <shentiecheng@huawei.com>
This commit is contained in:
Poor12 2022-07-11 14:20:21 +08:00
parent 98ecd8f239
commit 41bf329bde
1 changed files with 3 additions and 0 deletions

View File

@ -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
}