itaysk / kubectl-neat

Clean up Kubernetes yaml and json output to make it readable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error neating : error in neatDefaults

logicbomb421 opened this issue · comments

I am trying to use this module to easily move secrets between namespaces, however when I attempt to neat an image pull secret with docker config inside, the following error is returned:

2020/04/02 16:02:08 error neating : error in neatDefaults : error flattening json : error unmarshaling: unexpected end of JSON input

I have attempted to use the module directly as a kubectl plugin: kubectl neat secret regcred -oyaml, and also by piping the output of kubectl get: kubectl get secret regcred -oyaml | kubectl-neat, but both give the same error.

Additionally, when I don't specify an output format, the following error is returned:

2020/04/02 16:03:48 error neating : error in neatDefaults : error unmarshaling as PartialObject : json: cannot unmarshal string into Go value of type v1.PartialObjectMetadata

System Details:
OS: macOS 10.15.3
neat version: v1.1.0

Kubernetes:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T23:41:55Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.10-gke.27", GitCommit:"145f9e21a4515947d6fb10819e5a336aff1b6959", GitTreeState:"clean", BuildDate:"2020-02-21T18:01:40Z", GoVersion:"go1.12.12b4", Compiler:"gc", Platform:"linux/amd64"}

Krew:

GitTag        v0.3.3
GitCommit     71418fa
IndexURI      https://github.com/kubernetes-sigs/krew-index.git
BasePath      /Users/mhill/.krew
IndexPath     /Users/mhill/.krew/index
InstallPath   /Users/mhill/.krew/store
DownloadPath  /var/folders/fv/p5zj_bcd71xfk_cl47j6mxm40000gn/T/krew-downloads
BinPath       /Users/mhill/.krew/bin

Please let me know if additional information is needed. Thanks!

@logicbomb421 thanks for reporting this! I've fixed the bug and will soon release it in v1.1.1

This is now released as v1.1.1