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: id already used when including two bases that rename same resource in parent #1083

Closed
jessesuen opened this issue May 17, 2019 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jessesuen
Copy link

jessesuen commented May 17, 2019

I have the following kustomize structure:

.
├── aggregate                // has guestbook-a and guestbook-b as bases
│   └── kustomization.yaml
├── guestbook-a              // has template as a base, renamed using json6902
│   ├── kustomization.yaml
│   └── rename.yaml
├── guestbook-b              // has template as a base, renamed using json6902
│   ├── kustomization.yaml
│   └── rename.yaml
└── template                 // single resource
    ├── guestbook.yaml
    └── kustomization.yaml

When trying to build the aggregate directory (which simply includes guestbook-a and guestbook-b as bases), it fails with:

$ kustomize build aggregate
Error: ../guestbook-b: id '"~G_v1_Pod|~X|~P|guestbook|~S"' already used
  • aggregate/kustomization.yaml
bases:
- ../guestbook-a
- ../guestbook-b

Both of the guestbook-a and guestbook-b directories rename the same resource in the template base using json6902:

  • guestbook-a/rename.yaml
- op: replace
  path: /metadata/name
  value: guestbook-a
  • guestbook-b/rename.yaml
- op: replace
  path: /metadata/name
  value: guestbook-b

The failing example can be reproduced here:
https://github.com/jessesuen/k8s-deployments/tree/master/kustomize-json6902-rename-already-used

@jessesuen jessesuen changed the title Unable to include two bases that have same parent: id already used Error: id already used when includi two bases that rename same resource in parent May 17, 2019
@jessesuen jessesuen changed the title Error: id already used when includi two bases that rename same resource in parent Error: id already used when including two bases that rename same resource in parent May 17, 2019
@Liujingfang1 Liujingfang1 added the kind/bug Categorizes issue or PR as related to a bug. label Jun 26, 2019
@Liujingfang1
Copy link
Contributor

This has been fixed by #1154. Please check out v3.0.0-pre.

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.
Projects
None yet
Development

No branches or pull requests

2 participants