m/n/kubernetes: set PV inode quota relative to capacity

This removes the hardcoded 100k inode limit which is very low for large
PVs in favor of a scaled value dependent on its capacity. This
technically allows overcommit as the inode space is not accounted for on
the capacity side, but this was already the case before, just with a
static limit.

Change-Id: I48816cd904127397907c1372e7cbb4b9b5ea60f2
Reviewed-on: https://review.monogon.dev/c/monogon/+/3339
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/kubernetes/csi.go b/metropolis/node/kubernetes/csi.go
index 6f6c3a3..dfbd48c 100644
--- a/metropolis/node/kubernetes/csi.go
+++ b/metropolis/node/kubernetes/csi.go
@@ -219,7 +219,7 @@
 		}
 		return &csi.NodeExpandVolumeResponse{CapacityBytes: req.CapacityRange.LimitBytes}, nil
 	}
-	if err := fsquota.SetQuota(req.VolumePath, uint64(req.CapacityRange.LimitBytes), 0); err != nil {
+	if err := fsquota.SetQuota(req.VolumePath, uint64(req.CapacityRange.LimitBytes), uint64(req.CapacityRange.LimitBytes)/inodeCapacityRatio); err != nil {
 		return nil, status.Errorf(codes.Unavailable, "failed to update quota: %v", err)
 	}
 	return &csi.NodeExpandVolumeResponse{CapacityBytes: req.CapacityRange.LimitBytes}, nil