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.43k stars 257 forks source link

elasticache-controller - issue deleting `CacheParameterGroup` #2004

Open ferozemohideen opened 9 months ago

ferozemohideen commented 9 months ago

Describe the bug I was testing the elasticache-controller, and I have found that when I run kubectl delete on the following template (attached), all resources are deleted except for the CacheParameterGroup, whose delete fails because of the following condition:

Status:
  Ack Resource Metadata:
    Arn:               arn:aws:elasticache:us-west-1:*********:parametergroup:test
    Owner Account ID:  *********
    Region:            us-west-1
  Conditions:
    Last Transition Time:  2024-01-29T17:19:01Z
    Message:               Resource synced successfully
    Reason:
    Status:                True
    Type:                  ACK.ResourceSynced
    Message:               InvalidCacheParameterGroupState: One or more cache clusters are still members of this parameter group test, so the group cannot be deleted.
                           status code: 400, request id: b189ad54-88bc-4b4a-ae4d-1cb35c4f3e90
    Status:                True
    Type:                  ACK.Terminal

discussion on Slack: https://kubernetes.slack.com/archives/C0402D8JJS1/p1706552666549969

Steps to reproduce Apply the attached template, then delete Expected outcome Expected the CacheParameterGroup CRD to be deleted Environment

template: delete.txt

davejfranco commented 8 months ago

I just had the same issue. I'm using it inside a helm chart, so when I try to delete the chart the ParameterGroup gets stuck, I think is because by the moment it tries to delete it, the ReplicationGroup is still active. After the ReplicationGroup is gone I tried to delete it manually with no success.

a-hilaly commented 8 months ago

@davejfranco We're working on fixing some flaky tests/security patches first. We'll dive into this one ASAP.

ack-bot commented 1 month ago

Issues go stale after 180d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 60d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale