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

Fix example for format transform #538

Closed
wants to merge 1 commit into from

Conversation

turkenh
Copy link
Member

@turkenh turkenh commented Aug 25, 2023

This PR fixes example for format transform on master and for v1.13. It is correct in older versions already.

Currently, it is documented as:

patches:
  - type: FromCompositeFieldPath
    fromFieldPath: spec.field1
    toFieldPath: metadata.annotations["stringAnnotation"]
    transforms:
      - type: string
        string:
          type: Format
          format:
            fmt: "the-field-%s"

Which fails as:

Composition in version "v1" cannot be handled as a Composition: strict decoding error: unknown field "spec.resources[0].patches[0].transforms[0].string.format"

The correct version of it should be:

patches:
  - type: FromCompositeFieldPath
    fromFieldPath: spec.field1
    toFieldPath: metadata.annotations["stringAnnotation"]
    transforms:
      - type: string
        string:
          type: Format
          fmt: "the-field-%s"

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit eaaf75d
🔍 Latest deploy log https://app.netlify.com/sites/crossplane/deploys/64e86ba6f0d19c0008aa3b26
😎 Deploy Preview https://deploy-preview-538--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@turkenh turkenh requested a review from plumbis August 25, 2023 08:52
@phisco
Copy link
Collaborator

phisco commented Aug 25, 2023

😅 #537

@turkenh
Copy link
Member Author

turkenh commented Aug 25, 2023

😅 #537

Ahh, thanks for the pointer @phisco :)

@turkenh turkenh closed this Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants