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

images does not work with YAML anchors #3824

Closed
eyalzek opened this issue Apr 21, 2021 · 2 comments
Closed

images does not work with YAML anchors #3824

eyalzek opened this issue Apr 21, 2021 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@eyalzek
Copy link

eyalzek commented Apr 21, 2021

Describe the bug

using images fails when YAML anchors are in place.

Files that can reproduce the issue

kustomization.yaml

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

resources:
  - resources.yaml

images:
  - name: busybox
    newTag: stable

resources.yaml

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: foo
spec:
  template:
    spec:
      containers:
        - name: foo
          image: &image busybox
        - name: bar
          image: *image

Expected output

the Deployment is generated with the correct image.

Actual output

$ k kustomize .
Error: wrong Node Kind for  expected: ScalarNode was AliasNode: value: {*image}

Kustomize version

  • 4.0.5 (bundled in kubectl)
  • 4.1.2 (current latest)

Platform

linux

Additional context

we're in the process of updating our kustomization files since we use the bundled version in kubectl (which was just updated from v2 -> v4). This setup with images & yaml anchors used to work on 2.0.3.

@eyalzek eyalzek added the kind/bug Categorizes issue or PR as related to a bug. label Apr 21, 2021
@KnVerey
Copy link
Contributor

KnVerey commented Apr 28, 2021

This problem is not exclusive to the images field; this seems to be a duplicate of #3675

/triage duplicate
/close

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

@KnVerey: Closing this issue.

In response to this:

This problem is not exclusive to the images field; this seems to be a duplicate of #3675

/triage duplicate
/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. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

3 participants