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

Feature request: Drain based on annotation #4188

Open
anton-johansson opened this issue Jun 11, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@anton-johansson
Copy link

commented Jun 11, 2019

Is this a request for help?
No

What keywords did you search in NGINX Ingress controller issues before filing this one?
nginx ingress controller drain annotation
nginx ingress controller drain label

I found #2322, which is a similar request, which was closed because drain is commercial only. I understand that, but maybe we can work out a solution that works without the NGINX function (as done with sticky sessions already). If I understand things correctly, we use LUA-scripting to handle the balancing and sticky sessions. It should be possible to check upstream pod annotations here to decide whether or not pods should be considered for new sessions.


Is this a BUG REPORT or FEATURE REQUEST?
Feature request

NGINX Ingress controller version:

0.24.1

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: Bare metal, 3 masters and 5 worker nodes.
  • OS: Ubuntu 18.04.2 LTS (Bionic Beaver)
  • Kernel: 4.15.0-50-generic
  • Install tools: I use Ansible to install Kubernetes services, as described here.
  • Others:

Feature request:

I have a scenario similar to the one described in issue #2322. Our application does not have session replication and we need a better way of running version rollouts. We need a way to tell NGINX to not send new sessions to older deployments. I was thinking that we could use an annotation for this on Pod-level, maybe:

nginx.ingress.kubernetes.io/drain: true

... or this one (to not mix this with NGINX Plus' built in functionality):

nginx.ingress.kubernetes.io/accept-new-sessions: false

This would of course only have any effect at all if using sticky sessions, which could be a little confusing.

Looking around in the code, I assume that this functionality would take place somewhere in the pick_new_upstream function of sticky.lua.

Thoughts? Ideas? I could try and see if I can develop the changes myself, but I need to know if it's something that is actually wanted and if it's the right approach.

@anton-johansson anton-johansson changed the title Drain based on annotation Feature request: Drain based on annotation Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.