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

controller: set external name to its latest value no matter what #190

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Jan 4, 2022

Description of your changes

It's up to discussion whether there should be a re-creation behavior but until that lands, we'll conform to how native controllers behave and override existing external name if we have another, like the case where VPC is deleted in the console and we re-create it since its query returns 404.

Fixes #122

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

  • Created a VPC and it got into ready state.
  • Deleted the VPC in console.
  • Validated that a new VPC is created and external name annotation contained that new VPC ID, not the old one.
  • Deleted and both CR and VPC were gone.

…hat even if the resource is re-created, we record the latest external name in case it changes

Signed-off-by: Muvaffak Onus <me@muvaf.com>
@muvaf muvaf requested review from ulucinar and turkenh January 4, 2022 15:51
@muvaf muvaf marked this pull request as ready for review January 5, 2022 16:15
@muvaf muvaf merged commit 9b6e0a4 into crossplane:main Jan 5, 2022
@muvaf muvaf deleted the record-recreation branch January 5, 2022 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource is re-created even if there is already an external name assigned and the new name is not overriden
2 participants