Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add a condition of clock sync. #296

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cluster/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ const (
// cluster is available, the kube-apiserver is healthy and the Klusterlet agent is
// running with the minimum deployment on this managed cluster
ManagedClusterConditionAvailable string = "ManagedClusterConditionAvailable"
// ManagedClusterConditionClockSynced means the clock between the hub and the agent is synced.
ManagedClusterConditionClockSynced string = "ManagedClusterConditionClockSynced"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could it be a reason under available condition?

Copy link
Member Author

@xuezhaojun xuezhaojun Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concern here is clock out-of-sync doesn't equal to Available = Unknown.

The trigger point of ClockSynced = False is that hub is 1 leaseDuration faster than the agent(the default gracePeriod is 5 * leaseDuration). At that point, the managed cluster is still available but we already want to get users attention and want to warn they to check on NTP status in their environment.

Making OutOfSync a reason of UnKnown is also a choice, but from user experience perspective, kind of feel there should be an independent condition to warn the user before things really go wrong and can't function.

)

// ResourceName is the name identifying various resources in a ResourceList.
Expand Down
Loading