aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.41k stars 253 forks source link

Track ACK resources without depending only on final status #2066

Open nromriell opened 5 months ago

nromriell commented 5 months ago

Is your feature request related to a problem? Related to https://github.com/aws-controllers-k8s/community/issues/2062 The problem is that if the controller receives any interrupt between the initial create api call and the resource update the result is duplicate resources being created

Describe the solution you'd like Controller protects against duplicate resources by tracking reconcile state before API call and as part of the remote resource

Describe alternatives you've considered Initial idea is to:

@a-hilaly has brought up some good initial points to investigate:

The purpose of this is feature request is to start a discussion on this issue, gather additional ideas for resource tracking, and track investigation of the initial concept

We can also continue discussion in the slack thread

nromriell commented 5 months ago

@a-hilaly has suggested that instead use defer/recover handling to recover and still write out to the kubernetes object even when an error occurs which seems like a good way to handle these situations more universally