Skip to content
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

Fix external name #60

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Fix external name #60

wants to merge 10 commits into from

Conversation

displague
Copy link
Collaborator

@displague displague commented Jul 29, 2024

Description of your changes

This branch will attempt to address #62, #48 , #50, and #54

This draft currently fixes none of those and is blocked on the following error:
cannot set critical annotations: cannot get external name: cannot find id in tfstate

This was also seen in #48 (comment), where the packngo client SDK reported an error indicating that GET requests are being attempted with an empty string for the resource UUID (external name).

This occurs on observations before any creations. The creations are not attempted.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

@displague
Copy link
Collaborator Author

displague commented Sep 11, 2024

I'm attempting to address displague/configuration-metalnetworks#2 with this PR.

To debug, after installing Crossplane and the configuration-metalnetworks using the instructions from the issue above, I scale the controller replicas to 0:

$ kubectl edit deploymentruntimeconfigs.pkg.crossplane.io provider-jet-equinix 
...
  deploymentTemplate:
    spec:
      replicas: 0
      selector: {}
      template: {}

I then update the CRDs and run the code from this branch using tilt up

$ crossplane beta trace MetalNetworks metal-network-instance-b6mz9
NAME                                        SYNCED   READY   STATUS
MetalNetwork/metal-network-instance-b6mz9   True     False   Creating: Unready resources: metalgateway, metalgatewayipreservation
├─ Gateway/vrf-via-crossplane               False    False   ReconcilePaused
├─ ReservedIPBlock/vrf-via-crossplane       False    -       ReconcilePaused
├─ Vlan/vrf-via-crossplane                  False    True    ReconcilePaused
└─ Vrf/vrf-via-crossplane                   False    True    ReconcileError: ... "ProviderConfig" in version "equinix.jet.crossplane.io/v1beta1"
$ kubectl describe Vrf/vrf-via-crossplane
...
  Warning  CannotConnectToProvider  3m47s (x3 over 3m50s)  managed/metal.equinix.jet.crossplane.io/v1alpha1, kind=vrf  cannot initialize the Terraform plugin SDK async external client: cannot get terraform setup: cannot get referenced ProviderConfig: no matches for kind "ProviderConfig" in version "equinix.jet.crossplane.io/v1beta1"

Update: ProviderConfig issues were due to the timing of the local controller starting before the CRDs were fully available. Subsequent tilt up runs did not have this problem.

Signed-off-by: Marques Johansson <[email protected]>
…-401b-94e4-deadbeefc0de" for GetIdFn

Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant