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

Enhance ReplacementTranformer to Allow Replacing into Multiple Targets #520

Closed
lb4368 opened this issue Apr 13, 2021 · 4 comments
Closed
Assignees
Labels
3-Container Relates to plugin related issues enhancement New feature or request priority/medium Default priority for items size m
Milestone

Comments

@lb4368
Copy link

lb4368 commented Apr 13, 2021

Problem description
There are use cases where we need to ReplacementTransform the same source data into multiple target paths – e.g. replacing an IP address into many network policy rules. It would be helpful for the RT to support this natively.

Proposed change
Enhance the ReplacementTransformer KRM function to support specifying multiple targets so that a single source can be replaced into multiple targets.

Improve Transformer to support Target as Slice :

if err := replace(items, r.Target, val); err != nil {

@lb4368 lb4368 added enhancement New feature or request 3-Container Relates to plugin related issues triage Needs evaluation by project members labels Apr 13, 2021
@jezogwza jezogwza added this to the v2.1 milestone Apr 21, 2021
@jezogwza jezogwza added priority/medium Default priority for items and removed triage Needs evaluation by project members labels Apr 21, 2021
@sirajyasin
Copy link
Contributor

I can start working on this issue if no one has started yet. @lb4368 can you please assign this issue to me

@lb4368
Copy link
Author

lb4368 commented Apr 21, 2021

@sirajyasin Done. Thanks!

@lb4368 lb4368 added the size m label Apr 23, 2021
@aodinokov
Copy link

https://review.opendev.org/c/airship/airshipctl/+/788405 - merged, can be closed

@eak13
Copy link

eak13 commented Apr 29, 2021

Closing per code merge above.

@eak13 eak13 closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3-Container Relates to plugin related issues enhancement New feature or request priority/medium Default priority for items size m
Projects
None yet
Development

No branches or pull requests

5 participants