aws-load-balancer-controller icon indicating copy to clipboard operation
aws-load-balancer-controller copied to clipboard

Keep albs even if the ingress has been deleted

Open devopsmash opened this issue 1 year ago • 14 comments

Is your feature request related to a problem? I have a scenario, which I need to remove my apps every evening and turn it back on every morning. I'm removing my apps by using helm uninstall, which removes all of the relevant resources for each app, including the Ingress resource. The ALB ingress controller detects every evening that no Ingress resource exist and removes the ALB (as expected), and in the morning the ALB ingress controller detects that new Ingress resource has been created, it will create a new ALB, but with different DNS name.

Describe the solution you'd like Ability to provide annotation or something else that tells the ALB ingress controller to keep the ALB without removing it, so when I'll re-create the Ingress resource, it will use the existing load balancer balancer

notes:

  • The ALB is dedicated to specific app, and can't be shared with other apps
  • I want to keep the Ingress resourced managed by helm, so I want to prevent from using helm.sh/resource-policy="keep"

devopsmash avatar Oct 23 '22 08:10 devopsmash

i think we might be able support some thing similar to helm's helm.sh/resource-policy="keep" for this. But i'm interested on why would you like to do deployment like this 😄 as keep the ALB around without any backend app wastes money. Have you considered using a fixed custom domain name with route53?

M00nF1sh avatar Oct 24 '22 21:10 M00nF1sh

@dsaydon90, you could use an ingress group with a "resident" ingress which doesn't get deleted and add/remove the app ingress to/from the group when needed. You can have separate group for each application. You can still deploy/uninstall your application helm chart as normal.

I agree with @M00nF1sh on the cost part, and the route53 option.

kishorj avatar Oct 24 '22 21:10 kishorj

First, this can help me to be on the safe side, so if someone will ever remove ingress resource by mistake, the alb will still be there so I won't need to change my dns records accordingly.

Second, the best solution for my case is to change the dns record when new alb is created, but I can't due to permissions & security reasons.

So instead of creating a resident ingress beforehand, I'll have only 1 ingress resource to manage instead of 2.

I can close this issue if you think that my scenario is not reasonable

devopsmash avatar Oct 24 '22 21:10 devopsmash

Perhaps this should be a field in IngressClassParams which specifies the ALB for the group should be retained despite the group having zero Ingresses? One would then manage the IngressClass and IngressClassParams outside of the application's Helm chart, possibly in a second chart that doesn't get removed.

johngmyers avatar Oct 25 '22 05:10 johngmyers

@johngmyers good point to use IngressClassParams instead of annotations 😄 I'm also wondering whether we should keep all resources(ALB/security groups/Listener/TargetGroups) or just the ALB around.

M00nF1sh avatar Oct 26 '22 22:10 M00nF1sh

/kind feature

M00nF1sh avatar Oct 26 '22 22:10 M00nF1sh

For the Listener/TG, the question would be what the preferred behavior is to incoming connections. Should it ECONNREFUSED or return a 404? I suspect it should ECONNREFUSED, which means to delete the Listener.

Are the SGs likely to be referenced by resources not under control of LBC? If so, it might be worth keeping them around. Otherwise, it doesn't matter.

johngmyers avatar Oct 26 '22 22:10 johngmyers

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 24 '23 23:01 k8s-triage-robot

/remove-lifecycle stale

devopsmash avatar Jan 25 '23 14:01 devopsmash

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 25 '23 15:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar May 25 '23 15:05 k8s-triage-robot

/remove-lifecycle rotten

rarescosma avatar Jun 21 '23 18:06 rarescosma

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 23 '24 03:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 22 '24 03:02 k8s-triage-robot

We have a usecase for this. Any plans on picking this up?

jkdihenkar avatar Mar 14 '24 04:03 jkdihenkar

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Apr 13 '24 05:04 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Apr 13 '24 05:04 k8s-ci-robot