Skip to content

Commit 46e8028

Browse files
authored
Merge pull request kubernetes-csi#1238 from AndrewSirenko/fix-snapshot-controller
Fix Snapshot Controller's unbounded VolumeSnapshot list call on startup
2 parents 78efd29 + 965e259 commit 46e8028

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
@@ -88,9 +88,9 @@ var version = "unknown"
8888
func ensureCustomResourceDefinitionsExist(client *clientset.Clientset, enableVolumeGroupSnapshots bool) error {
8989
condition := func(ctx context.Context) (bool, error) {
9090
var err error
91-
// List calls should return faster with a limit of 0.
91+
// List calls should return faster with a limit of 1.
9292
// We do not care about what is returned and just want to make sure the CRDs exist.
93-
listOptions := metav1.ListOptions{Limit: 0}
93+
listOptions := metav1.ListOptions{Limit: 1}
9494

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

0 commit comments

Comments
 (0)