-
Notifications
You must be signed in to change notification settings - Fork 378
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
Cluster.kafka cannot be created #1611
Comments
#1551 seems provides a more complete solution |
/reopen |
Hey I am still unable to create kafka cluster with The error message is a bit different:
Anyone experiencing the same? Note the value for The output of
|
Let me Test again i will update - later today |
Seems to be the logic problem in func (e *external) Create(ctx context.Context, mg cpresource.Managed) (managed.ExternalCreation, error) {
cr, ok := mg.(*svcapitypes.Cluster)
if !ok {
return managed.ExternalCreation{}, errors.New(errUnexpectedObject)
}
cr.Status.SetConditions(xpv1.Creating())
input := GenerateCreateClusterInput(cr)
if err := e.preCreate(ctx, cr, input); err != nil {
return managed.ExternalCreation{}, errors.Wrap(err, "pre-create failed")
}
resp, err := e.client.CreateClusterWithContext(ctx, input)
if err != nil {
return managed.ExternalCreation{}, awsclient.Wrap(err, errCreate)
}
if resp.ClusterArn != nil {
cr.Status.AtProvider.ClusterARN = resp.ClusterArn
} else {
cr.Status.AtProvider.ClusterARN = nil
}
// here we use the response to overwrite the spec
if resp.ClusterName != nil {
cr.Spec.ForProvider.ClusterName = resp.ClusterName
} else {
cr.Spec.ForProvider.ClusterName = nil
}
if resp.State != nil {
cr.Status.AtProvider.State = resp.State
} else {
cr.Status.AtProvider.State = nil
}
return e.postCreate(ctx, cr, resp, managed.ExternalCreation{}, err)
} Below the commented line, we use the response to overwrite the spec, which is a little bit unreasonable. I wonder if the response didn't provide the The error msg says |
@HotThoughts |
Hi @haorenfsa , yes I checked aws console. No MSK cluster is being created by crossplane. |
Add ref of related patch: #1624 |
@HotThoughts According to others tests, the creation should be Okey. My guess is that the the spec:
clientAuthentication:
unauthenticated:
enabled: true You can try out or just wait for the patch. |
we will publish tomorrow a new fix release #1638 |
I am getting the same issue in v0.36.1 / #1638 The creation is not surfacing any errors calling AWS with provided configuration. It would be helpful to update the CR with status if AWS api failures |
What happened?
The resource Cluster.kafka cannot be created
How can we reproduce it?
just use the example provided, you can change some fields to more reasonable values. but it doesn't make any difference. The reconcile failed before it can start create.
(https://github.com/crossplane-contrib/provider-aws/blob/master/examples/kafka/cluster.yaml)
What environment did it happen in?
Crossplane version: (doesn't matter)
Here is why it's going wrong:
The initializer of the managed resources will set the
external-name
annotation.The
observe
function uses theexternal-name
as the arn of the cluster to do theDescribeCluster
. But a user is only allowed to describe the arn under his/her own useraccount.Say a user is
670409000460
, and the region isap-southeast-1
.Then the user can only describe the resources under
"arn:aws:kafka:ap-southeast-1:670409000460:cluster/bla/bla"
So the
Observe
failed with 403.I tried a way to set the
external-name
by my self to avoid it. But then I jump into annother error:So the here's the conclusion: the reconciler can only work correctly when
external-name
is not set, or set to correct value. While the initializer set it to the wrong value by default.Solution
We should add
WithInitializers
options to override the unintended default intializersThe text was updated successfully, but these errors were encountered: