Merge pull request #123359 from kerthcet/cleanup/add-miseed-events
Add missed clusterEvents to UnrollWildCardResource
This commit is contained in:
		| @@ -76,13 +76,13 @@ const ( | |||||||
| 	Node                  GVK = "Node" | 	Node                  GVK = "Node" | ||||||
| 	PersistentVolume      GVK = "PersistentVolume" | 	PersistentVolume      GVK = "PersistentVolume" | ||||||
| 	PersistentVolumeClaim GVK = "PersistentVolumeClaim" | 	PersistentVolumeClaim GVK = "PersistentVolumeClaim" | ||||||
| 	PodSchedulingContext  GVK = "PodSchedulingContext" |  | ||||||
| 	ResourceClaim         GVK = "ResourceClaim" |  | ||||||
| 	ResourceClass         GVK = "ResourceClass" |  | ||||||
| 	StorageClass          GVK = "storage.k8s.io/StorageClass" |  | ||||||
| 	CSINode               GVK = "storage.k8s.io/CSINode" | 	CSINode               GVK = "storage.k8s.io/CSINode" | ||||||
| 	CSIDriver             GVK = "storage.k8s.io/CSIDriver" | 	CSIDriver             GVK = "storage.k8s.io/CSIDriver" | ||||||
| 	CSIStorageCapacity    GVK = "storage.k8s.io/CSIStorageCapacity" | 	CSIStorageCapacity    GVK = "storage.k8s.io/CSIStorageCapacity" | ||||||
|  | 	StorageClass          GVK = "storage.k8s.io/StorageClass" | ||||||
|  | 	PodSchedulingContext  GVK = "PodSchedulingContext" | ||||||
|  | 	ResourceClaim         GVK = "ResourceClaim" | ||||||
|  | 	ResourceClass         GVK = "ResourceClass" | ||||||
|  |  | ||||||
| 	// WildCard is a special GVK to match all resources. | 	// WildCard is a special GVK to match all resources. | ||||||
| 	// e.g., If you register `{Resource: "*", ActionType: All}` in EventsToRegister, | 	// e.g., If you register `{Resource: "*", ActionType: All}` in EventsToRegister, | ||||||
| @@ -167,13 +167,15 @@ func UnrollWildCardResource() []ClusterEventWithHint { | |||||||
| 	return []ClusterEventWithHint{ | 	return []ClusterEventWithHint{ | ||||||
| 		{Event: ClusterEvent{Resource: Pod, ActionType: All}}, | 		{Event: ClusterEvent{Resource: Pod, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: Node, ActionType: All}}, | 		{Event: ClusterEvent{Resource: Node, ActionType: All}}, | ||||||
|  | 		{Event: ClusterEvent{Resource: PersistentVolume, ActionType: All}}, | ||||||
|  | 		{Event: ClusterEvent{Resource: PersistentVolumeClaim, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: CSINode, ActionType: All}}, | 		{Event: ClusterEvent{Resource: CSINode, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: CSIDriver, ActionType: All}}, | 		{Event: ClusterEvent{Resource: CSIDriver, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: CSIStorageCapacity, ActionType: All}}, | 		{Event: ClusterEvent{Resource: CSIStorageCapacity, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: PersistentVolume, ActionType: All}}, |  | ||||||
| 		{Event: ClusterEvent{Resource: PersistentVolumeClaim, ActionType: All}}, |  | ||||||
| 		{Event: ClusterEvent{Resource: StorageClass, ActionType: All}}, | 		{Event: ClusterEvent{Resource: StorageClass, ActionType: All}}, | ||||||
| 		{Event: ClusterEvent{Resource: PodSchedulingContext, ActionType: All}}, | 		{Event: ClusterEvent{Resource: PodSchedulingContext, ActionType: All}}, | ||||||
|  | 		{Event: ClusterEvent{Resource: ResourceClaim, ActionType: All}}, | ||||||
|  | 		{Event: ClusterEvent{Resource: ResourceClass, ActionType: All}}, | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -637,6 +637,12 @@ func Test_buildQueueingHintMap(t *testing.T) { | |||||||
| 				{Resource: framework.PodSchedulingContext, ActionType: framework.All}: { | 				{Resource: framework.PodSchedulingContext, ActionType: framework.All}: { | ||||||
| 					{PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, | 					{PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, | ||||||
| 				}, | 				}, | ||||||
|  | 				{Resource: framework.ResourceClaim, ActionType: framework.All}: { | ||||||
|  | 					{PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, | ||||||
|  | 				}, | ||||||
|  | 				{Resource: framework.ResourceClass, ActionType: framework.All}: { | ||||||
|  | 					{PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, | ||||||
|  | 				}, | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| @@ -770,6 +776,8 @@ func Test_UnionedGVKs(t *testing.T) { | |||||||
| 				framework.PersistentVolumeClaim: framework.All, | 				framework.PersistentVolumeClaim: framework.All, | ||||||
| 				framework.StorageClass:          framework.All, | 				framework.StorageClass:          framework.All, | ||||||
| 				framework.PodSchedulingContext:  framework.All, | 				framework.PodSchedulingContext:  framework.All, | ||||||
|  | 				framework.ResourceClaim:         framework.All, | ||||||
|  | 				framework.ResourceClass:         framework.All, | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Prow Robot
					Kubernetes Prow Robot