Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

EIP is not associated to new instance after instance recreation #239

Open
endrec opened this issue Oct 6, 2022 · 0 comments
Open

EIP is not associated to new instance after instance recreation #239

endrec opened this issue Oct 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@endrec
Copy link

endrec commented Oct 6, 2022

What happened?

I have created an EC2 instnace, and an Elastic IP, which references the instance.
After the instance is deleted and recreated, EIP is not re-attached to the new instance.
(Workaround: manually remove spec.forProvider.instance from EIP.)

How can we reproduce it?

  1. Create an EC2 instance:
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: Instance
metadata:
  name: test-server
spec:
  providerConfigRef:
    name: aws-provider
  forProvider:
    region: eu-west-2 # or any other, as long as it is same as eip
    # Not important for reproduction, whatever you need to have a running instance
    [...]
  1. Create an EIP:
apiVersion: ec2.aws.jet.crossplane.io/v1alpha2
kind: EIP
metadata:
  name: test-eip
spec:
  providerConfigRef:
    name: aws-provider
  forProvider:
    region: eu-west-2 # or any other, as long as it is same as instance
    vpc: true
    instanceRef:
      name: test-server
  1. Apply both instance and EIP manifests, and observe they are synchronised and ready.
  2. kubectl delete instance.ec2.aws.jet.crossplane.io/test-server, and reapply instance manifest.
  3. After instance is synchronised and ready, observe EIP is not reattached.

What environment did it happen in?

Crossplane version: v0.5.0-preview
EKS: 1.21

@endrec endrec added the bug Something isn't working label Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant