rancher/k3k

Prevent deleting wrong cluster when names are ambiguous

Open

#448 ouverte le 29 août 2025

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)Go (77 forks)auto 404
buggood first issueteam/collie

Métriques du dépôt

Stars
 (886 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

When two or more clusters share the same name but exist in different namespaces, running k3kcli cluster delete <cluster-name> without the --namespace flag can easily delete the wrong cluster.

The command currently defaults to the k3k-<cluster-name> namespace if one exists, which may not be the user's intention. This can lead to accidental data loss.

-> % k3kcli cluster list      
NAMESPACE   NAME                  MODE     STATUS    POLICY
default     foo                   shared   Unknown   <none>
k3k-foo     foo                   shared   Unknown   <none>

Expected Behavior

The CLI should detect the name collision and fail with an error message, requiring the user to specify the target with the --namespace flag to prevent accidental deletion.

Guide contributeur