Closed linusyong closed 1 month ago
Your Composite Resource xPolicyTest
has spec.name
set to linus-cluster
, your patch is patching from that to the Composed Resource's metadata.annotations["myAnnotation"]
. So given that linus-cluster != field1-text
, the patch defaults to the configured fallback value, StringNotFound
. Looks correct to me.
Thanks @phisco, you're right. Looks like is my understanding of match transformation is wrong. Thanks again, will close this.
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
xrd.yaml
)composition.yaml
)xpolicytest.yaml
)Steps to Reproduce
XRD
andComposition
:xPolicyTest
:Policy
created:What happened?
It is expected that
should match "field1-text" and replace with "matchedLiteral". However a match wasn't found and replaced with the
fallbackValue
of "StringNotFound"Relevant Error Output Snippet
No response
Crossplane Version
1.15.2
Provider Version
1.4.0
Kubernetes Version
Client Version: v1.28.0 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.3-eks-adc711
Kubernetes Distribution
EKS
Additional Info
No response