cluster-api-provider-aws: Don't attempt to recreate an ELB after the cluster has been provisioned

/kind feature

Describe the solution you’d like [A clear and concise description of what you want to happen.]

If a cluster was created at time X, and then the user deletes the ELB , CAPA will try to recreate the ELB, which will have a new DNS endpoint which will not work. There’s not much point doing this, and CAPA also has issues updating the resource in Kubernetes because its own webhook rejects the update as immutable.

In this scenario, we should mark AWSCluster as failed, and inform the user the cluster is unrecoverable.

Long term, we should switch to using NLBs and a recoverable endpoint.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api-provider-aws version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (14 by maintainers)

Most upvoted comments

The trick here is to figure out under what circumstances CAPA shouldn’t recreate the ELB. Possibly once the CAPI Cluster endpoint is filled, because it’s at this stage it becomes immutable?

How about this suggestion pointed above?

It is problematic to use the conditions for decisions that are set in the same controller.

Even if with NLB changes, we will only deprecate ELB, will not block their usage. Existing clusters will keep using ELB for a while so it is good to have.