Sensible agent check in defaults#5240
Open
weyfonk wants to merge 4 commits into
Open
Conversation
c9cb7f3 to
07c8930
Compare
Collaborator
|
@weyfonk tentatively setting milestone to 2.16. 🤔 |
07c8930 to
f652b15
Compare
This ensures that creating a new agent bundle fails with an agent check-in interval set to 0.
This adds a check on the agent check-in interval to cluster import, for consistency with agent bundle updates.
Patching the `fleet-controller` config map must include a non-zero agent check-in interval, otherwise cluster registration fails.
f652b15 to
d7367f7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds validation around the configured agent check-in interval to prevent a zero-duration value from being used, and updates unit/e2e tests to reflect the new behavior.
Changes:
- Add controller-side checks that reject a zero agent check-in interval during bundle generation and cluster import.
- Add/adjust unit tests to cover the new validation and keep existing tests passing.
- Update an e2e patch payload to include a non-zero
agentCheckinInterval.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent.go | Rejects zero check-in interval when generating agent bundles. |
| internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent_test.go | Adds a new test for the zero-interval error and updates existing tests to set a non-zero interval. |
| internal/cmd/controller/agentmanagement/controllers/cluster/import.go | Rejects zero check-in interval during manager-initiated cluster import flow. |
| e2e/multi-cluster/installation/agent_test.go | Ensures the e2e config patch sets a non-zero agentCheckinInterval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Negative durations are now also taken into account.
ae8a9fb to
53d3d65
Compare
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.
This ensures that an agent check-in interval cannot be set to a zero duration.
Additional Information
Checklist
- [ ] I have updated the documentation via a pull request in the fleet-product-docs repository.