Skip to content

Commit

Permalink
Merge pull request #612 from KubeKyrie/optimize-comments
Browse files Browse the repository at this point in the history
optimize-comments, convert comment language zh to en
  • Loading branch information
Iceber authored Dec 5, 2023
2 parents 93bb3a9 + 899ec5e commit 84c7402
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 84c7402

Please sign in to comment.