Make drain delay configurable via drainDelaySeconds field#96
Make drain delay configurable via drainDelaySeconds field#96lukebond merged 2 commits intorestatedev:mainfrom
Conversation
There was a problem hiding this comment.
thanks for this @mt-bt, really clean change. it's a purely additive optional field with nullable: true and skip_serializing_if, so existing RestateDeployment resources are completely unaffected since they'll just get the 300s default; appreciated.
a few things before merging:
crd/RestateDeployment.pklfile needs updating to match. adddrainDelaySeconds: Int?to theRestateclass around line 67, alongsideuseHttp11. you can look at howuseHttp11was added there as a reference. then runjust generate-examplesto make sure everything stays in sync.- we have a release notes process now, please add a file at
release-notes/unreleased/96-configurable-drain-delay.md. seerelease-notes/README.mdfor the format, the "New Feature Example" section is probably closest to what you need here. - in
knative.rsyou nicely log the drain delay when scheduling removal, but the equivalent code path inreplicaset.rsdoesn't log anything. could you add a similarinfo!()line there so both deployment modes have consistent logging?
for the CLA you just need to comment on the PR with the exact text:
I have read the CLA Document and I hereby sign the CLA
(CLA Document is here)
1e95544 to
037de63
Compare
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@lukebond thanks for the review! I've addressed all three points:
When running +++ b/crd/examples/restatecluster.yaml
@@ -3,11 +3,7 @@ kind: RestateCluster
metadata:
name: restate-test
spec:
- cluster:
- autoProvision: true
compute:
- image: restatedev/restate:1.5.6
+ image: restatedev/restate:1.4
storage:
storageRequestBytes: 2147483648
- config: |
- auto-provision = false |
|
@mt-bt i have a couple of other changes lined up and, once merged, i'll do another release |
Summary
drainDelaySecondsfield toRestateSpecso the delay before removing old drained versions can be configuredMotivation
There was already a
// todo configurable?comment on the hardcodedTimeDelta::minutes(5)inreplicaset.rs.In resource-constrained environments, a shorter drain delay lets the operator evict old pods more quickly, freeing capacity for incoming ones.