Skip to content

Commit 84c7402

Browse files
authored
Merge pull request #612 from KubeKyrie/optimize-comments
optimize-comments, convert comment language zh to en
2 parents 93bb3a9 + 899ec5e commit 84c7402

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/kubeapiserver/discovery/discovery.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ type ResourceDiscoveryAPI struct {
2626
Versions sets.Set[schema.GroupVersion]
2727
}
2828

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

3434
serializer runtime.NegotiatedSerializer
@@ -38,8 +38,8 @@ type DiscoveryManager struct {
3838
groupHandler *clusterGroupDiscoveryHandler
3939
versionHandler *clusterVersionDiscoveryHandler
4040

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

pkg/synchromanager/clustersynchro/queue/event.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func pressureEvents(older *Event, newer *Event) *Event {
3030
switch newer.Action {
3131
case Updated:
3232
if older.Action == Deleted {
33-
// TODO: 可以比对 resource version
34-
// 但是从 informer 中获取的数据应该是可以保证顺序的,所以可以不添加比对
33+
// TODO: can compare resource version
34+
// but the data obtained from the informer should be in order, so comparison is not needed.
3535
return older
3636
}
3737

0 commit comments

Comments
 (0)