Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DeletionPropagation in Uninstall #1363

Open
adrianmace opened this issue May 8, 2024 · 0 comments · May be fixed by #1365
Open

Support DeletionPropagation in Uninstall #1363

adrianmace opened this issue May 8, 2024 · 0 comments · May be fixed by #1365

Comments

@adrianmace
Copy link

Description

When uninstalling a helm_release type resource, we should wait for all child resources to also be deleted before marking the operation as complete. This is supported in Kubernetes by using Foreground Cascading Deletion and in Helm by setting the DeletionPropagation flag on the uninstall object.

Potential Terraform Configuration

resource "helm_release" "alb-controller" {
  name       = var.name
  namespace  = var.namespace
  chart      = "aws-load-balancer-controller"
  repository = "https://aws.github.io/eks-charts"
  version    = "1.7.2"

  create_namespace = true
  atomic           = true
  cleanup_on_fail  = true
  cascading        = "foreground"|"background"|"orphan"

  values = [...]
}

References

The use case I have is to support the deletion of Gateway resources that are created as part of a Helm release, alongside deletion of the Load Balancer Controller which provisions the underlying Service controller.

My scenario is as follows:

  1. Deploy an AWS Load Balancer Controller Helm Release
  2. Deploy a Gateway resource (using Gateway API) Helm Release (local helm chart)
  3. Gateway creates a child Service resource in the cluster
  4. Service is provisioned by the ALB Controller all happy and working.

When it comes to deletion, no matter how I set up the depends_on, the following happens:

  1. Destroy the Gateway resource and report success
  2. Destroy the Load Balancer controller before its had a chance to destroy the underlying service

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
adrianmace added a commit to adrianmace/terraform-provider-helm that referenced this issue May 10, 2024
adrianmace added a commit to adrianmace/terraform-provider-helm that referenced this issue May 10, 2024
@adrianmace adrianmace linked a pull request May 10, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant