-
Notifications
You must be signed in to change notification settings - Fork 93
Description
/kind bug
/area provider/ibmcloud
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
When attempting to provide an existing VPC for IBM Cloud Infrastructure provisioning, CAPI still attempts to create a new VPC, with the same name, thus failing due to name collision.
time="2024-12-26T10:40:07Z" level=debug msg="E1226 10:40:07.335078 482 ibmvpccluster_controller.go:241] \"failed to reconcile VPC\" err=\"failed to create vpc: error creating vpc: Provided Name (ci-op-ty2xb467-e5b9a-vpc) is not unique\"
What did you expect to happen:
CAPI will use the existing VPC to provision Infrastructure resources in, rather than attempting to create a new VPC.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The issue occurs when the VPC ID that gets found, but fails to get returned.
The ID is not returned here, after it was found
cluster-api-provider-ibmcloud/cloud/scope/vpc_cluster.go
Lines 497 to 505 in 41a8998
// Check if the VPC was found and has an ID | |
if vpcDetails != nil && vpcDetails.ID != nil { | |
// Set VPC ID in Status to shortcut future lookups | |
s.SetResourceStatus(infrav1beta2.ResourceTypeVPC, &infrav1beta2.ResourceStatus{ | |
ID: *vpcDetails.ID, | |
Name: s.NetworkSpec().VPC.Name, | |
Ready: true, | |
}) | |
} |
Environment:
- Cluster-api version: v0.9.0
- Minikube/KIND version: n/a
- Kubernetes version: (use
kubectl version
): v1.32 - OS (e.g. from
/etc/os-release
): ubuntu nobel