Comments (3)
Hello, @foriequal0 ! We have rolled out this controller in both our staging and prod clusters and, indeed, so far it's working great. I'm scanning the issues list to see what might lie ahead, and am wondering if you could flesh out what gaps are currently known.
from pod-graceful-drain.
I should add, if the issues are well defined and we can reproduce them locally, we are likely to prioritize contributing to this controller, as it has solved a big problem for us.
from pod-graceful-drain.
Hello, @mihasya ! I'm glad to hear that!
I think it is a good-to-have issue, rather than an urgent one. Anyway, let me give you detailed explanations.
Pod can be deleted with these options: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#delete-delete-a-pod
Currently, the controller uses Client
from sigs.k8s.io/controller-runtime/pkg/client
and its Delete()
function. It can accept an optional client.DeleteOptions
: https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/options.go#L182
I think you can experiment with --grace-period
flag in kubectl delete
and kubectl apply
. It seems that --dry-run
is usually implemented in client side.
Also policyv1beta1.Eviction
can be created with optional DeleteOptions
in its fields: https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#eviction-v1beta1-policy
As you can see, these options are about gracePeriodSeconds
, propagationPolicy
, and preconditions
.
Their handling is missing in 2 places I think.
preconditions
are not checked when the pod deletion/eviction is intercepted https://github.com/foriequal0/pod-graceful-drain/blob/main/internal/pkg/webhooks/pod_validator.go
pod deletion is scheduled and the pod is successfully deleted even if it had falingpreconditions
.- These options are not passed to the scheduled deletion: https://github.com/foriequal0/pod-graceful-drain/blob/main/internal/pkg/core/pod_mutate.go#L185
Also, it calls Delete()
for both deletion/eviction. I assume that it might not respect pod disruption budget (I might be wrong).
I've stopped here since missing features are not critical in use cases that the controller is focused on.
But if you think they are critical to your workflow, then feel free to implement it. I'm willing to accept it.
from pod-graceful-drain.
Related Issues (18)
- Support other load balancers
- Eviction can be handled differently HOT 1
- Better logging
- What specifically should namespaceSelector values be? HOT 2
- deprecation of rbac.authorization.k8s.io/v1beta1 HOT 2
- Finalizer support HOT 2
- Which license does your project fall under? HOT 3
- Fix cert-manager HOT 1
- Unable to upgrade cluster because of a drain error related to admission webhook denied request: no kind "Eviction" is registered for version HOT 10
- Prevent 5xx error during evicting deployments that has small replica count HOT 2
- Proper HA setup HOT 17
- [Query] Is there a configuration to apply the deleteAfter configuration only to the specific pods and not to all the pods HOT 1
- Is the helm chart namespace sepecific? HOT 1
- Does we need to tweak any other variable to make this work HOT 3
- Make admission delay agnostic to webhook timeout
- Restrict namespace like `elbv2.k8s.aws/pod-readiness-gate-inject: enabled`
- Configure which labels are removed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pod-graceful-drain.