Open
Conversation
Signed-off-by: Jon Tucci <[email protected]>
Signed-off-by: Jon Tucci <[email protected]>
Signed-off-by: Jon Tucci <[email protected]>
Signed-off-by: Jon Tucci <[email protected]>
Signed-off-by: Jon Tucci <[email protected]>
3d9a647 to
a9862c2
Compare
Author
|
Hey @phisco :) Is this feature something we can add in? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Adds transform support to label selectors in
EnvironmentConfigselection. This allows field path values to be transformed before being used as label match values, bringing a subset offunction-patch-and-transform's transform functionality to environment config selection.Supported transforms:
Key changes:
input/v1beta1/transforms.go— Transform types (subset of patch-and-transform, excluding math/convert/base64/hash/join as they don't produce valid label values)transforms.go— Transform resolution logic, faithfully copied from function-patch-and-transform with regexp replace backreference support addedtransforms_test.go— Unit tests for map, match, and string transformsfn.go— ChangedGetString()toGetValue()on field path resolution to support non-string fields (booleans, numbers), with transforms applied before converting to label stringinput/v1beta1/environment.go— AddedTransformsfield toEnvironmentSourceSelectorLabelMatcherexamples/selector_with_transforms/demonstrating regexp group extract, regexp replace with backreferences, map transform, and case conversionExample use case:
team-alpha→alpha-environment-configFixes #100
I have:
[contribution process]: https://git.io/fj2m9
[docs]: https://docs.crossplane.io/contribute/contribute