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

Support for ToEnvironmentFieldPath patch type in spec.environment.patches #123

Closed
truongnht opened this issue May 25, 2024 · 1 comment · Fixed by #125
Closed

Support for ToEnvironmentFieldPath patch type in spec.environment.patches #123

truongnht opened this issue May 25, 2024 · 1 comment · Fixed by #125

Comments

@truongnht
Copy link
Contributor

truongnht commented May 25, 2024

In function-patch-and-transform 0.2.1 we do have support for ToEnvironmentFieldPath, so the following was supported in our composition

        apiVersion: pt.fn.crossplane.io/v1beta1
        kind: Resources
        environment:
          patches:
            - type: ToEnvironmentFieldPath
              fromFieldPath: spec.parameters.serviceAccount.namespace
              toFieldPath: data.serviceAccountNamespace
            - type: ToEnvironmentFieldPath
              fromFieldPath: spec.parameters.serviceAccount.name
              toFieldPath: data.serviceAccountName

However in latest release the ToEnvironmentFieldPath patch type is no longer supported, rather FromCompositeFieldPath. Since our platform supports also customer compositions, it is not easy bringing breaking changes without verifying with all customers. Our ask is to bring back the support for To|FromEnvironmentFieldPath in spec.environment.patches

@truongnht truongnht changed the title support for ToEnvironmentFieldPath patch type in spec.environment.patches Support for ToEnvironmentFieldPath patch type in spec.environment.patches May 25, 2024
@phisco
Copy link
Collaborator

phisco commented May 25, 2024

Aha, I see what happened, when I refactored and properly splitted the patch types I introduced a breaking change inadvertently, as although they should have not been supported, they were actually working before. It could be fine supporting both ways to define those patches, ToEnvironment == FromCompositeFieldPath, FromEnvironment == ToCompositeFieldPath 🤔

truongnht added a commit to truongnht/function-patch-and-transform that referenced this issue May 29, 2024
truongnht added a commit to truongnht/function-patch-and-transform that referenced this issue May 29, 2024
truongnht added a commit to truongnht/function-patch-and-transform that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants