kudo icon indicating copy to clipboard operation
kudo copied to clipboard

KUDO init --dry-run Should Succeed Regardless of Cluster has CRDs or Not

Open kensipe opened this issue 5 years ago • 3 comments

kudo v0.15.0+

If you have kudo init a cluster and then need to work with or create manifests... it fails with:

 go run cmd/kubectl-kudo/main.go init --unsafe-self-signed-webhook-ca --version dev --dry-run -o yaml
Errors                                                                                               
CRD operators.kudo.dev is already installed. Did you mean to use --upgrade?                          
KUDO manager kudo-system/kudo-controller-manager seems to be installed. Did you mean to use --upgrade
Error: failed to verify installation requirements
exit status 255

If the cluster was new this does NOT happen. The --dry-run isn't changing anything and we should be able to get an output without this validation error. The solution is to change KUBECONFIG or clear cluster :(

We need to have a verify flag... or change it. when turning off verify it still fails. go run cmd/kubectl-kudo/main.go init --unsafe-self-signed-webhook-ca --version dev --dry-run -o yaml --verify=false

--upgrade fixes it... but this is NOT a good UX

kensipe avatar Jul 10 '20 16:07 kensipe

there's challenge with cert-manager related resources. @ANeumann82 can fill in the details since he pointed it out

alenkacz avatar Jul 16 '20 13:07 alenkacz

this really bugs me a lot, I am used to being able to get the yaml out of the CLI and hitting this all the time :(

./bin/kubectl-kudo init --version 0.15.0 -o yaml --dry-run
Errors
CRD operators.kudo.dev is already installed. Did you mean to use --upgrade?
Error: failed to verify installation requirements

alenkacz avatar Jul 31 '20 08:07 alenkacz

I'm not sure how to fix this, to be honest. From what I see when have these options:

  1. Change kudo init to silently upgrade an existing installation. I feel this is a bad idea, but I might be alone with this opinion.
  2. Change kudo init --dry-run -o yaml to implicitly use --upgrade if it's not specified. I don't like it, because it changes the behaviour depending on the parameters.

If there is a third option, i'd love to hear it.

I do agree that this is weird when uninstalling KUDO, because we now need users to run kudo init --upgrade --dry-run -o yaml | kubectl delete -f - which is a mouthful. But I'd rather implement something like kudo init --uninstall, to be honest

ANeumann82 avatar Aug 19 '20 11:08 ANeumann82