Closed garreeoke closed 2 years ago
Thanks for reporting this @garreeoke! is there any other debugging information you can provide? e.g. an example manifest that causes this behavior, the kubectl describe
output of the broker object, etc.?
describe_broker.txt managed_resource.txt
@jbw976 attached is the describe of the broker object and the managed resource yaml I used to create it. The broker does get created in aws, but it does take about 5+ minutes.
I did turn on debugging for the provider, but no other valuable info in there.
Here is the created terraform file in the provider's container. main_terraform_file.txt
Screenshot of created resource in aws.
@jbw976 got past this issue as can create a broker now. Only issue left is there is no data in the connection secret. Let me know if that should be a different issue.
Good progress @garreeoke! did you change something to get past the first issue with creating the broker resource? worth sharing here?
I'd keep tracking this all in this one issue - end to end success of broker creation and able to actually use it :)
@jbw976 No, I didn't change anything. Just used changes we did to bump the version to v1alpha2. There are no more errors for brokername.
Hey @garreeoke , what do you expect to see in the connection secret? We're passing the username via managed resource spec and storing the password in a k8s secret. The URLs will be available in the managed resource's status field once it's ready.
Hi @ezgidemirel I'm trying to get some values from the status and put them in the secret. For example ...
In the XRD I have ...
connectionSecretKeys:
In the composition I have ...
connectionDetails:
type: FromFieldPath name: arn fromFieldPath: status.atProvider.arn
Status of my MR shows ...
status: atProvider: arn: arn:aws:mq:us-west-2:609897127049:broker:spring-sensors-1:b-91e6378a-5916-4be9-8aa6-b260f6c68dbb id: b-91e6378a-5916-4be9-8aa6-b260f6c68dbb instances:
@ezgidemirel @jbw976 My connection secret get created right away before any of this information is available in the status. Should this be updated once the managed resource is ready?
@garreeoke that was my initial assumption. But, I couldn't make it work.
@ezgidemirel wrote an issue in crossplane for this. I can probably fix it.
Hey @garreeoke I could propagate the arn value to the connection secret successfully. The missing part in my composition file was the following:
writeConnectionSecretToRef:
namespace: crossplane-system
Is there anything else that needs to be done in this bug's scope?
Hi @ezgidemirel I had that information already, but didn't work. However, I deleted my CRD and composition, re-added them and it worked. Therefore, we can close this.
What happened?
Cannot create broker, status of the broker says cannot create the broker, duplicate name. Broker actually gets created in aws but broker object in kubernetes never goes to true due to duplicate broker name.
How can we reproduce it?
Try to create a broker.
What environment did it happen in?
Crossplane version: