You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flux cli ignored my resource argument on flux uninstall, fully uninstalling flux instead of my specific intended resource.
Steps to reproduce
$ kubectl get helmrelease.helm.toolkit.fluxcd.io -n flux-ca-system my-resource
NAME AGE READY STATUS
my-resource 23m False HelmChart 'flux-ca-system/flux-ca-system-my-resource' is not ready
$ flux --version
flux version 2.1.0
$ flux uninstall helmrelease.helm.toolkit.fluxcd.io -n flux-ca-system my-resource
Are you sure you want to delete Flux and its custom resource definitions: y
► deleting components in flux-ca-system namespace
✔ ServiceAccount/flux-ca-system/helm-controller deleted
✔ ServiceAccount/flux-ca-system/image-automation-controller deleted
[...] (59 other resources)
✔ Namespace/flux-ca-system deleted
✔ uninstall finished
$
Expected behavior
An error should be thrown like "my resource is not a recognized argument for flux uninstall".
Screenshots and recordings
No response
OS / Distro
Ubuntu 22.04 (wsl)
Flux version
v2.1.0
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
I now know to remove the helmrelease with flux uninstall is a mistake, this caused an unintended removal. But that may've been caught by the cli exception.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Hi everyone, first time contributor but regular user of Flux. Happy to help with this effort. For the uninstall command, I did some testing and it looks like adding Args: cobra.OnlyValidArgs and ValidArgs: []string{"keep-namespace", "dry-run", "silent"} gives the expected behavior.
Describe the bug
flux cli ignored my resource argument on
flux uninstall
, fully uninstalling flux instead of my specific intended resource.Steps to reproduce
Expected behavior
An error should be thrown like "my resource is not a recognized argument for flux uninstall".
Screenshots and recordings
No response
OS / Distro
Ubuntu 22.04 (wsl)
Flux version
v2.1.0
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
I now know to remove the helmrelease with flux uninstall is a mistake, this caused an unintended removal. But that may've been caught by the cli exception.
Code of Conduct
The text was updated successfully, but these errors were encountered: