Skip to content

fix: checks every volume mount instead of the first one#13

Open
resendegu wants to merge 1 commit intocubos:mainfrom
resendegu:main
Open

fix: checks every volume mount instead of the first one#13
resendegu wants to merge 1 commit intocubos:mainfrom
resendegu:main

Conversation

@resendegu
Copy link

@resendegu resendegu commented Jan 20, 2026

Descriping the changes:

  • Add a array of mounts then loop through all containers and all their volume mounts that match the volume name
  • Skip if no mounts found
  • Check all the mounts for ready containers instead of checkinh only one container mount
  • If there are no ready containers then skip the resize check on this volume
  • Finally, check if the mount path (possibly with subPath) starts with the mount path from the df output

Summary:
All volumeMounts are checked: Previously only the first container with a matching volume was checked. Now all containers and all their mounts for that volume are collected.

subPath support: The df matching now handles cases where a volume is mounted with a subPath, meaning the actual mount point in df output is a parent directory of the mountPath in the pod spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants