Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kapp deploy suddenly doesn't work anymore #404

Closed
ahoehma opened this issue Jan 4, 2022 · 8 comments
Closed

kapp deploy suddenly doesn't work anymore #404

ahoehma opened this issue Jan 4, 2022 · 8 comments
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@ahoehma
Copy link

ahoehma commented Jan 4, 2022

What steps did you take:

Yesterday I started working with kapp (nice tool! :D) in my win-10 docker-desktop-k8s ... simple setup, using lens to look into it, simple application to deploy (deployment, service, nginx-ingress, ....) nothing special so far ... And everything works well ...

kapp deploy -a "foo" -f .

I did this many many many times ... changed my yaml's, re-deployed etc.
I also deleted my app many times

kapp delete -a "foo"

Everything was fine

What happened:

BUT :D Today ... kapp deploy always fail with

"kapp: Error: error unmarshaling JSON: json: cannot unmarshal array into Go value of type map[string]interface {}"

And I have no glue why :(

Anything else you would like to add:

I removed all the things I installed with kapp yesterday

kapp list
kapp delete ...

Is there a debug/verbose mode or something?

Environment:

$kapp --version
kapp version 0.43.0

$kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:42:41Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}

@ahoehma ahoehma added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity labels Jan 4, 2022
@ahoehma
Copy link
Author

ahoehma commented Jan 4, 2022

OMG ... Shit ... sorry ... was my fault! :)

I was in the wrong directory today ... there are no yaml's at all ... and this cause this "result".

Mayb it would be good if kapp shows a different warning if no input files at all given?

Could be rejected.

@100mik
Copy link
Contributor

100mik commented Jan 4, 2022

Glad you are enjoying kapp!
Could you share the YAML that you are trying to deploy?
It'll be a big help.

@100mik 100mik added the helping with an issue Debugging happening to identify the problem label Jan 4, 2022
@ahoehma
Copy link
Author

ahoehma commented Jan 4, 2022

Glad you are enjoying kapp! Could you share the YAML that you are trying to deploy? It'll be a big help.

That was the problem :D I run kapp deploy with "nothing" g

@100mik
Copy link
Contributor

100mik commented Jan 4, 2022

Oh I see! I am sorry I did not notice the comment you made later.
Keep having fun with kapp 🚀
Closing this issue.

A better error message would definitely help. We will take note of this!

@100mik 100mik closed this as completed Jan 4, 2022
@github-actions github-actions bot removed the carvel triage This issue has not yet been reviewed for validity label Jan 4, 2022
@100mik 100mik reopened this Jan 4, 2022
@100mik 100mik added carvel triage This issue has not yet been reviewed for validity discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution and removed bug This issue describes a defect or unexpected behavior helping with an issue Debugging happening to identify the problem labels Jan 4, 2022
@100mik
Copy link
Contributor

100mik commented Jan 4, 2022

The error I get while trying to deploy an empty directory is

kapp: Error: Trying to apply empty set of resources will result in deletion of resources on cluster. Refusing to continue unless --dangerous-allow-empty-list-of-resources is specified.

I am curious about what conditions led to that error message as we would definitely want it to be more helpful 🤔

@100mik
Copy link
Contributor

100mik commented Jan 4, 2022

Is it possible that this directory had YAML files that were improperly formatted or created for some other purpose?

@ahoehma
Copy link
Author

ahoehma commented Jan 4, 2022

You are right @100mik ... there was a "EXPORT.yml" ... its just a configuration file.
So its seems I did it 100% wrong :D

@100mik
Copy link
Contributor

100mik commented Jan 4, 2022

Oops! Thanks for bringing this up.
Closing this for now, seems like Murphy's law is at play!

@100mik 100mik closed this as completed Jan 4, 2022
@github-actions github-actions bot removed the carvel triage This issue has not yet been reviewed for validity label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
None yet
Development

No branches or pull requests

2 participants