Skip to content

Commit 8531b4e

Browse files
AndrewSirenkok8s-infra-cherrypick-robot
authored andcommitted
wip: Snapshot Controller startup should not LIST all volumesnapshots
1 parent 84b3b39 commit 8531b4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/snapshot-controller/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ var version = "unknown"
8383
func ensureCustomResourceDefinitionsExist(client *clientset.Clientset, enableVolumeGroupSnapshots bool) error {
8484
condition := func(ctx context.Context) (bool, error) {
8585
var err error
86-
// List calls should return faster with a limit of 0.
86+
// List calls should return faster with a limit of 1.
8787
// We do not care about what is returned and just want to make sure the CRDs exist.
88-
listOptions := metav1.ListOptions{Limit: 0}
88+
listOptions := metav1.ListOptions{Limit: 1}
8989

9090
// scoping to an empty namespace makes `List` work across all namespaces
9191
_, err = client.SnapshotV1().VolumeSnapshots("").List(ctx, listOptions)

0 commit comments

Comments
 (0)