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

Wrong type detection when using extend anchor in yaml files #4251

Closed
erfan-mehraban opened this issue Oct 20, 2021 · 5 comments
Closed

Wrong type detection when using extend anchor in yaml files #4251

erfan-mehraban opened this issue Oct 20, 2021 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@erfan-mehraban
Copy link

Describe the bug

In build command, If there is extend anchor in yaml file, fatal error accrues.

Files that can reproduce the issue

kustomization.yml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yml

deployment.yml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
spec:
  <<: &anchor
    key: value
  template:
    <<: *anchor

Expected output

successful build.

Actual output

$ kustomize build
Error: map[string]interface {}{"apiVersion":"apps/v1", "kind":"Deployment", "metadata":map[string]interface {}{"name":"deployment"}, "spec":map[interface {}]interface {}{"key":"value", "template":map[interface {}]interface {}{"key":"value"}}}: json: unsupported type: map[interface {}]interface {}

Kustomize version

{Version:kustomize/v4.4.0 GitCommit:63ec6bdb3d737a7c66901828c5743656c49b60e1 BuildDate:2021-09-27T16:24:12Z GoOs:linux GoArch:amd64}

Platform

Ubuntu 20.04.3 LTS

@erfan-mehraban erfan-mehraban added the kind/bug Categorizes issue or PR as related to a bug. label Oct 20, 2021
@k8s-ci-robot
Copy link
Contributor

@erfan-mehraban: This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 20, 2021
@natasha41575
Copy link
Contributor

@monopole Maybe another one you could take a look at?

@smurfralf
Copy link

Also a problem for us, coming from use of yaml merge in tekton 3pp: https://github.com/tektoncd/pipeline/blob/v0.22.0/config/300-clustertask.yaml#L47

@KnVerey
Copy link
Contributor

KnVerey commented Oct 27, 2021

/triage duplicate

Duplicate of #4215

/close

@k8s-ci-robot k8s-ci-robot added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Oct 27, 2021
@k8s-ci-robot
Copy link
Contributor

@KnVerey: Closing this issue.

In response to this:

/triage duplicate

Duplicate of #4215

/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
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

5 participants