From c1a1e808a2cf1378de1cc5a6e5f4f75bd4c4b5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EM=2E=20Fern=C3=A1ndez?= Date: Mon, 11 Mar 2024 11:46:58 +0100 Subject: [PATCH] Fix example on README.md --- README.md | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 99bf0aa..35d77e3 100644 --- a/README.md +++ b/README.md @@ -72,37 +72,37 @@ Here is another example using [function-patch-and-transform](https://github.com/ name: function-patch-and-transform input: apiVersion: pt.fn.crossplane.io/v1beta1 - kind: Resources - environment: - patches: - # So you can then use it in all your patches: - # - Env -> XR - - type: ToCompositeFieldPath - fromFieldPath: "someFieldInTheEnvironment" - toFieldPath: "status.someFieldFromTheEnvironment" - # - XR -> Env - - type: FromCompositeFieldPath - fromFieldPath: "spec.someFieldInTheXR" - toFieldPath: "someFieldFromTheXR" - resources: - - name: bucket - base: - apiVersion: s3.aws.upbound.io/v1beta1 - kind: Bucket - spec: - forProvider: - region: us-east-2 - patches: - # - Env -> Resource - - type: FromEnvironmentFieldPath - fromFieldPath: "someFieldInTheEnvironment" - toFieldPath: "spec.forProvider.someFieldFromTheEnvironment" - # - Resource -> Env - - type: ToEnvironmentFieldPath - fromFieldPath: "status.someOtherFieldInTheResource" - toFieldPath: "someOtherFieldInTheEnvironment" - # the environment will be passed to the next function in the pipeline - # as part of the context + kind: Resources + environment: + patches: + # So you can then use it in all your patches: + # - Env -> XR + - type: ToCompositeFieldPath + fromFieldPath: "someFieldInTheEnvironment" + toFieldPath: "status.someFieldFromTheEnvironment" + # - XR -> Env + - type: FromCompositeFieldPath + fromFieldPath: "spec.someFieldInTheXR" + toFieldPath: "someFieldFromTheXR" + resources: + - name: bucket + base: + apiVersion: s3.aws.upbound.io/v1beta1 + kind: Bucket + spec: + forProvider: + region: us-east-2 + patches: + # - Env -> Resource + - type: FromEnvironmentFieldPath + fromFieldPath: "someFieldInTheEnvironment" + toFieldPath: "spec.forProvider.someFieldFromTheEnvironment" + # - Resource -> Env + - type: ToEnvironmentFieldPath + fromFieldPath: "status.someOtherFieldInTheResource" + toFieldPath: "someOtherFieldInTheEnvironment" + # the environment will be passed to the next function in the pipeline + # as part of the context ``` This diagram shows what part of the usual Composition is replaced by this