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

optimize-comments, convert comment language zh to en #612

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions pkg/kubeapiserver/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type ResourceDiscoveryAPI struct {
Versions sets.Set[schema.GroupVersion]
}

// DiscoveryManager 管理集群的 discovery api,并处理 /api /apis 的请求
// DiscoveryManager manage the cluster's discovery api and handle requests for /api and /apis
type DiscoveryManager struct {
// groupSource 用来保证所有集群的 API Group 保持一致
// groupSource used to ensure that the API Groups of all clusters are consistent
groupSource APIGroupSource

serializer runtime.NegotiatedSerializer
Expand All @@ -38,8 +38,8 @@ type DiscoveryManager struct {
groupHandler *clusterGroupDiscoveryHandler
versionHandler *clusterVersionDiscoveryHandler

// groups 保存了所有集群支持的 API Group
// clusterGroups 保存了每个集群的 API Group
// apigroups is an apiGroup list supported by all clusters
// clusterGroups API Groups supported by each cluster
apigroups atomic.Value // type: []metav1.APIGroup
clusterAPIGroups atomic.Value // type: map[string][]metav1.APIGroup

Expand Down
4 changes: 2 additions & 2 deletions pkg/synchromanager/clustersynchro/queue/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func pressureEvents(older *Event, newer *Event) *Event {
switch newer.Action {
case Updated:
if older.Action == Deleted {
// TODO: 可以比对 resource version
// 但是从 informer 中获取的数据应该是可以保证顺序的,所以可以不添加比对
// TODO: can compare resource version
// but the data obtained from the informer should be in order, so comparison is not needed.
return older
}

Expand Down
Loading