mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
GC: update required verbs for deletable resources
The garbage collector controller currently needs to list, watch, get, patch, update, and delete resources. Update the criteria for deletable resources to reflect this.
This commit is contained in:
parent
8bee44b65f
commit
d30fb0d9d5
@ -178,7 +178,7 @@ func startGarbageCollectorController(ctx ControllerContext) (bool, error) {
|
||||
if err != nil {
|
||||
return true, fmt.Errorf("failed to get supported resources from server: %v", err)
|
||||
}
|
||||
deletableResources := discovery.FilteredBy(discovery.SupportsAllVerbs{Verbs: []string{"delete"}}, preferredResources)
|
||||
deletableResources := discovery.FilteredBy(discovery.SupportsAllVerbs{Verbs: []string{"get", "list", "watch", "patch", "update", "delete"}}, preferredResources)
|
||||
deletableGroupVersionResources, err := discovery.GroupVersionResources(deletableResources)
|
||||
if err != nil {
|
||||
return true, fmt.Errorf("Failed to parse resources from server: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user