foriequal0 / pod-graceful-drain

You don't need `lifecycle: { preStop: { exec: { command: ["sleep", "30"] } } }`
Apache License 2.0
246 stars 16 forks source link

Configure which labels are removed #7

Open foriequal0 opened 3 years ago

foriequal0 commented 3 years ago

Add annotations to the service like this pod-graceful-drain/patchLabels: removethis-,setthis=other

ajaykumarmandapati commented 3 years ago

Thanks for this brilliant work! @foriequal0 However we were wondering can this be achieved for the current release? i.e. we do not want to remove certain labels during the termination phase of the pod. Thanks!

foriequal0 commented 3 years ago

@ajaykumarmandapati Hi! I currently don't have a concrete plan to implement this, and I'm a little bit busy for now. Also, such options have a lot of choice of implementation. I need more concrete use-cases since I want to make this controller simple as possible. I think you could try to retain labels with an another mutating admission controller such as Kyverno.