Add an experimental prepared blue-green Agent rollout - #3355
Draft
AliDatadog wants to merge 19 commits into
Draft
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: 6b02ba7 | Docs | View more details | Give us feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A DaemonSet update can delete a working Agent before Kubernetes pulls and starts its replacement. A slow or failed pull can leave a node without an Agent.
Native surge cannot complete this handoff when the replacement must wait for the old Agent to release host resources. This experiment keeps rollout control in the Operator.
Design
The feature uses this opt-in annotation:
The Operator maintains two
OnDeleteDaemonSets. One slot serves. The other slot prepares the next revision. A one-time conventional rollout installs the lock wrapper before the Operator allows overlap.A small init container copies
s6-setlockfrom the core Agent image into a shared Pod volume. Each Agent container then waits on two locks:The Operator observes a Running target with no restarts twice. It then removes the source on a bounded set of nodes. Each target component starts as soon as its matching source component exits. The target must become Available before the Operator starts another batch.
The Operator uses the existing
maxUnavailablevalue as a per-profile budget. Capacity fallback can use the same budget to remove a source that blocks target scheduling. This fallback is delete-first.For
hostNetwork: true, the Operator removes declared ports that would block scheduling. Processes still bind the node ports after lock handoff. Green uses a different core command port to prevent mixed-generation control traffic.Trade-offs
Validation
go test ./... -count=1passed.make lintpassed with 0 issues.No Agent code change is required.
Related PR