-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add await logic for DaemonSets (#2953)
This adds await logic for DaemonSets with RollingUpdate or OnDelete update strategies. The implementation is largely based on the existing StatefulSet logic with two high-level simplifications: 1. We use [kstatus](https://pkg.go.dev/sigs.k8s.io/cli-utils/pkg/kstatus/status) to decide when a DaemonSet is ready. 2. We use a `PodAggregator` to handle reporting pod statuses. Importantly, unlike StatefulSet this means we do not currently inspect pods to decide readiness -- we only use them for informational purposes. I _think_ this is sufficient but I could easily be missing something. I haven't been able to simulate situations where this logic doesn't fully capture readiness and we would need to inspect pod statuses. A failing e2e test was added in YAML under the awkwardly name `tests/sdk/java` path. Unit tests were added around the public `Creation`, `Update`, etc. methods in order to more fully exercise timeouts and retries. To that end I introduced a mock clock package which might be controversial. IMO Go doesn't have a great OSS mock clock but something like this can be very helpful for testing. I'm still somewhat confused by the role of `await.Read` since it doesn't actually await anything, but it's implemented similar to StatefulSet as a one-shot read + readiness check. Fixes #609 Refs #2800 Refs #2799 Refs #2798
- Loading branch information
Showing
20 changed files
with
1,897 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.