Prototype prepared Agent surge with capacity fallback - #3298
Draft
AliDatadog wants to merge 15 commits into
Draft
Conversation
…ource-fallback # Conflicts: # internal/controller/datadogagent/controller_v2_test.go # internal/controller/datadogagentinternal/controller.go # pkg/config/config.go
This comment has been minimized.
This comment has been minimized.
Bits found no code fix to applyWarning This comment is related to an earlier commit. 🟢 Investigated · ⚪ No code fix needed No failing CI job or test is currently reported for the PR head View in Datadog | Reviewed commit 6f8af44 · Any feedback? Reach out in #deveng-pr-agent |
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.
What does this PR do?
Prototypes a default-off prepared Agent rollout using native DaemonSet
maxSurge.The Operator renders a compatible Pod, injects its Pod UID, mounts private rollout state, treats
preparedas Ready, and sets surge from the existingmaxUnavailablebudget while forcing rolloutmaxUnavailableto zero. Kubernetes performs the normal handoff by deleting the old Pod after the replacement is Ready; the Operator does not orchestrate that handoff.For profile-managed DaemonSets, the Operator first performs a conventional rollout that narrows the existing broad required anti-affinity, waits for it to become fully Available, and only then enables surge.
If a surged replacement is Pending solely because of node CPU or memory, the Operator can fall back to delete-before-create for that node. It revalidates scheduling, affinity, taints, resource fit, Pod and DaemonSet identities, and consumes the existing
maxUnavailablebudget before deleting the old Pod with a UID precondition.Motivation
Slow image pulls and process construction should not force collection downtime. Native surge already supplies the create-before-delete lifecycle; this PoC removes the scheduling and process-start conflicts that prevent two Agent Pods from overlapping on one node.
Compatibility boundary
hostNetwork: true: declared ports are removed; Agent processes still bind after activation. Admission must not add ports back.hostPort: supported for direct Pod-IP and UDS traffic. Node-local Services can select the sleeping Ready Pod and are excluded from the pilot.hostPort: rejected.agent, directtrace-agent,init-volume, andinit-configare supported initially.Describe how you validated your changes
make lintreported 0 issues/procstart timeCoordinated branches:
Checklist