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

Control component ordering #4345

Closed
chicocvenancio opened this issue Dec 20, 2021 · 5 comments
Closed

Control component ordering #4345

chicocvenancio opened this issue Dec 20, 2021 · 5 comments
Labels
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.

Comments

@chicocvenancio
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently components are applied as a first step of any layer. That means any changes made by other transformers/generators are not available to it. This complicates a few patterns if a component is needed.

EG:
A diamond pattern like https://github.com/kubernetes-sigs/kustomize/blob/ec38bbeb999066abea59fd11c54e68377765a510/api/krusty/diamonds_test.go with components at kirk would fail if the components tries to reference kirk-storefront or spec.type. This means a new layer would be necessary to allow for components to be used, for each leg of the diamond (we have over 90 in our setup).

Describe the solution you'd like
Control to apply the component at the same level their operations would be applied if not in component, first or last. Perhaps a new field?

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

@chicocvenancio: 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 Dec 20, 2021
@KnVerey KnVerey self-assigned this Jan 19, 2022
@KnVerey
Copy link
Contributor

KnVerey commented Jan 21, 2022

This won't be possible in Kustomization, but the good news is we have a KEP for a new kind called Composition that has arbitrary transformer/generator/validator ordering as one of its features.

@KnVerey
Copy link
Contributor

KnVerey commented Jan 21, 2022

Actually, my first sentence wasn't strictly correct. Come to think of it, the combination of Composition prerequisites #4403 and #4402 should allow you to define your own sequence of generators/transformers/validators in the existing transformers field in a Kustomization as well.

Since we already have plans that would make this possible tracked in those issues / the KEP, please follow along there instead.
/close

@KnVerey KnVerey removed their assignment Jan 21, 2022
@k8s-ci-robot
Copy link
Contributor

@KnVerey: Closing this issue.

In response to this:

Actually, my first sentence wasn't strictly correct. Come to think of it, the combination of Composition prerequisites #4403 and #4402 should allow you to define your own sequence of generators/transformers/validators in the existing transformers field in a Kustomization as well.

Since we already have plans that would make this possible tracked in those issues / the KEP, please follow along there instead.
/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.

@chicocvenancio
Copy link
Contributor Author

Thanks for the links @KnVerey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

3 participants