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

Replace Resource.refBy with annotations #3976

Closed
KnVerey opened this issue Jun 9, 2021 · 2 comments · Fixed by #4002
Closed

Replace Resource.refBy with annotations #3976

KnVerey opened this issue Jun 9, 2021 · 2 comments · Fixed by #4002
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@KnVerey
Copy link
Contributor

KnVerey commented Jun 9, 2021

The field Resource.refBy is used to track the IDs of resources that refer to the current resource as it propagates up the Kustomization stack.

This information isn't available to an out-of-process transformer, but like all other RNode metadata (e.g. the history of previous resource names in the transformation pipeline) it should be. This can be accomplished by moving the field's data to an annotation. https://github.com/kubernetes-sigs/kustomize/blob/master/api/resource/resource.go#L26

The fix should include tests that name references are correctly applied in the presence of KRM functions.

Similar to #3975.

@KnVerey KnVerey added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 9, 2021
@k8s-ci-robot
Copy link
Contributor

@KnVerey: 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 Jun 9, 2021
@KnVerey KnVerey added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 9, 2021
@natasha41575 natasha41575 self-assigned this Jun 17, 2021
@rishabh625
Copy link

Fix to this introduces a new bug where annotations used as fielPath in nameReference doesn't get transformed by nameReference transformer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants