Skip to content

Commit 6907e94

Browse files
authored
Merge pull request #1240 from k8s-infra-cherrypick-robot/cherry-pick-1238-to-release-8.0
[release-8.0] Fix Snapshot Controller's unbounded VolumeSnapshot list call on startup
2 parents 84b3b39 + 8531b4e commit 6907e94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/snapshot-controller/main.go

+2-2
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)