Skip to content

[Bug]: kubectl krew plugin accepted name of a non-existent cluster in a destroy command #10413

Description

@mateuszdrab

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

No response

Version

1.29 (latest patch)

What version of Kubernetes are you using?

1.34

What is your Kubernetes environment?

Self-managed: k3s

How did you install the operator?

Helm

What happened?

I ran kubectl cnpg destroy -n cnpg-system central-cluster central-postgres-1, noticing a typo yet the command succeeded.

central-cluster does not exist, the cluster is called central-postgres

The command however, deleted instance central-postgres-1 as requested and returned with:

Instance central-postgres-1 of cluster central-cluster is destroyed

Seems that some sort of validation did not happen? I'd expect it to fail as the cluster name specified does not exist.

Cluster resource

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions