-
Notifications
You must be signed in to change notification settings - Fork 1
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
Status transformer not able to propage conditional message to the Composite resource and Claim #34
Comments
Hi @ashishkurian 👋 I believe the name is not matching. The matcher is looking for - matchers:
- resources:
- name: "sc-role-servicerole-insproroashtest" That is the name of the resource being created. apiVersion: iam.aws.crossplane.io/v1beta1
kind: Role
metadata:
name: sc-role-servicerole-insproroashtest But we match on the "name" key in the desired resource map. This name is derived from the apiVersion: iam.aws.crossplane.io/v1beta1
kind: Role
metadata:
annotations:
gotemplating.fn.crossplane.io/composition-resource-name: InsProRoashtest To resolve the issue, either change the matcher to look for |
@dalton-hill-0 Thanks Dalton. Indeed that was the issue. I cannot believe that I did not try that option. |
No problem! I'll go ahead and close out this issue. |
@dalton-hill-0 It would be handy to mention this explicitly in the readme |
@ashishkurian - I have opened #35 to add this documentation, let me know what you think. |
@dalton-hill-0 Looks well. I will be using the function more and probably we could find more such little improvements. |
What happened?
Status transformer failing to propagate conditional message to the Composite resource and Claim even though the
StatusTransformationSuccess
isTrue
on the composite resource.Expectation
I want to propagate the
conditions.InstanceProfileRoleReady
type to be instatus: "False"
withmessage "Encountered an error creating the instance profile role: <the error that I am capturing using regex>"
Current composite resource status conditions
What am I missing or doing incorrect here?
How can we reproduce it?
I am sharing my XRD, Composition and claim below. I assume I can set any type for the
setConditions.condition.type
as I havex-kubernetes-preserve-unknown-fields: true
set under the conditions for the XRD.In my iam role managed resource, I am deliberately creating an error so that I can propagate that error message to the composite and claim.
I have the following error on the managed aws iam role.
Manifest I am using.
What environment did it happen in?
Status transformer function version: v0.4.0
Cloud provider: AWS
Kubernetes version: v1.29.1
Kubernetes distribution: EKS
Crossplane version: v1.17.3
The text was updated successfully, but these errors were encountered: