kubernetes: make the terminating-pod policy configurable in pods mode

Ouverte
#224 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
53/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
elixir, kubernetes

Piste de recherche

Start by reading the Kubernetes strategy code for pods mode and the change associated with issue #114, which introduced the current terminating-pod behavior. Trace how pod deletion timestamps and running state affect discovery, then check the strategy tests and configuration documentation. Done means an opt-in :include setting keeps running terminating pods visible while the default :exclude behavior remains unchanged.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Steps to reproduce
  • Configuration Used: Cluster.Strategy.Kubernetes with kubernetes_ip_lookup_mode: :pods.
  • Strategy Used: Cluster.Strategy.Kubernetes (pods mode).
  • Errors/Incorrect Behaviour Encountered: the terminating-pod policy is fixed. 3.6.0 excludes pods with a metadata.deletionTimestamp, which is the right default for deployments that want an unreachable target removed quickly.
Description of issue

This is an improvement request, not a bug: make the terminating-pod policy configurable in pods mode, keeping 3.6.0 as the default. 3.6.0 introduced the current behavior to address #114, but it also removed the ability to express the opposite case.

The use case is a distributed application where a node has to stay reachable while it shuts down. Process groups are one example: if a node leaves discovery as soon as its pod is marked for deletion, it can disappear from :pg before it has finished draining, and peers may start replacement processes while the old ones are still unwinding. Other examples are a node handing off a lease, or a supervised job it owns, before it goes away.

Today there is no way to keep that node visible: pods mode removes it, and endpoints and EndpointSlice modes drop terminating endpoints too. A field selector can't express it either, because a terminating pod keeps phase: Running and metadata.deletionTimestamp is not a selectable field.

Would an opt-in option be acceptable?

kubernetes_pod_terminating: :exclude | :include
  • :exclude (default): current behavior, remove a pod as soon as it has a deletionTimestamp.
  • :include: keep it until it is no longer Running, which is what a draining node needs.

The documentation is correct for the default; this would add an option instead of changing behavior.

Langage dominant
Elixir
Étoiles
2.2k
Forks
202
Merge moyen
2 min
PR mergées (30 j)
1

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de bitwalker/libcluster

Toutes les issues de bitwalker/libcluster

Issues similaires

Plus d'issues Elixir

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.