From 8531b4e8833d4e53a94173f0e410ecb4f1f4a6ef Mon Sep 17 00:00:00 2001 From: Drew Sirenko <68304519+AndrewSirenko@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:33:36 +0000 Subject: [PATCH] wip: Snapshot Controller startup should not LIST all volumesnapshots --- cmd/snapshot-controller/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/snapshot-controller/main.go b/cmd/snapshot-controller/main.go index 346d51d4b..7e4bf7089 100644 --- a/cmd/snapshot-controller/main.go +++ b/cmd/snapshot-controller/main.go @@ -83,9 +83,9 @@ var version = "unknown" func ensureCustomResourceDefinitionsExist(client *clientset.Clientset, enableVolumeGroupSnapshots bool) error { condition := func(ctx context.Context) (bool, error) { var err error - // List calls should return faster with a limit of 0. + // List calls should return faster with a limit of 1. // We do not care about what is returned and just want to make sure the CRDs exist. - listOptions := metav1.ListOptions{Limit: 0} + listOptions := metav1.ListOptions{Limit: 1} // scoping to an empty namespace makes `List` work across all namespaces _, err = client.SnapshotV1().VolumeSnapshots("").List(ctx, listOptions)