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

Error: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type patch.StrategicMerge #2390

Closed
hanyouqing opened this issue Apr 20, 2020 · 6 comments

Comments

@hanyouqing
Copy link

hanyouqing commented Apr 20, 2020

I wanted to add a sidecar container with kustomize, and following the docs here https://github.com/kubernetes-sigs/kustomize/blob/1dad3f09757130b4c1149a8e48eb5c076cd46c07/examples/patchMultipleObjects.md, but it doesn't work any more.

got the error blow:

Error: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type patch.StrategicMerge

kubectl version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T23:34:48Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Anyone have suggestions?

  • kustomization.yaml
patches:
- path: patch_sidecar.yaml
  target:
    kind: Deployment
  • patch_sidecar.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
spec:
  template:
    spec:
      containers:

      - name: envoy
        image: envoyproxy/envoy

BTW, it seems that a large number of official documents are out of date.

Anyone can help? @phanimarupaka @novalagung @monopole

@mkuhl
Copy link

mkuhl commented Apr 22, 2020

I have exactly the same issue. kubectl version v1.17.1

@hanyouqing
Copy link
Author

I have exactly the same issue. kubectl version v1.17.1

Any progress or solution?

@kingfai
Copy link

kingfai commented Apr 24, 2020

This could be the reason: #1373 (comment)

@hanyouqing
Copy link
Author

reason

Yeah, thanks! it should be the reason, we've use kustomize instead of kubectl kustomize for a while.

@Shell32-Natsu
Copy link
Contributor

/close

@k8s-ci-robot
Copy link
Contributor

@Shell32-Natsu: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants