awslabs / aws-eks-cluster-controller

Manages EKS clusters in different AWS accounts using Custom Resources
Apache License 2.0
103 stars 30 forks source link

improved detection of cloudformation stack states #72

Closed ckrough closed 5 years ago

ckrough commented 5 years ago

Description of changes:

This fixes a bug where some Cloudformation Stack states would be incorrectly detected as successes, resulting in a k8s resource instance with a successfully completed status while the associated cloudformation stack was actually in a failed state. This also adds tests to assert that each known Cloudformation Stack State traverses the expected reconciliation path. If a CFN stack is in an unrecognized state, it will log that problem and requeue.

This changeset also introduces helpers to assign various Cloudformation Stack states into logical groups that indicate if a stack is "complete", "failed", or "pending". The CFN Stack stack is compared to these logical groupings when determining how to proceed with the reconciliation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

MadVikingGod commented 5 years ago

Added additional tests around delete logic: https://github.com/MadVikingGod/aws-eks-cluster-controller/tree/pr72