Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CSI-252): implement kubelet PVC stats #322

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Sep 9, 2024

TL;DR

Implemented NodeGetVolumeStats functionality and added new node service capabilities.

What changed?

  • Implemented NodeGetVolumeStats method in the NodeServer struct.
  • Added getVolumeStats helper function to fetch filesystem statistics.
  • Updated NewNodeServer to include new node service capabilities:
    • SINGLE_NODE_MULTI_WRITER
    • GET_VOLUME_STATS
    • VOLUME_CONDITION

How to test?

  1. Mount a Weka volume to a node.
  2. Call the NodeGetVolumeStats method with the volume ID and path.
  3. Verify that the method returns correct capacity, used, and available bytes.
  4. Test error cases by providing invalid volume IDs or non-existent paths.
  5. Verify that the new node service capabilities are reported correctly.

Why make this change?

This change enhances the CSI driver's functionality by implementing volume statistics retrieval. It allows Kubernetes to query volume usage information, which is crucial for monitoring and managing storage resources. The added node service capabilities also improve the driver's feature set, making it more compliant with CSI specifications and providing better support for various storage operations.

Following this improvement, the following metrics become available for Weka CSI volumes:

kubelet_volume_stats_capacity_bytes
kubelet_volume_stats_available_bytes
kubelet_volume_stats_used_bytes
kubelet_volume_stats_inodes
kubelet_volume_stats_inodes_free
kubelet_volume_stats_inodes_used

@graphite-app graphite-app bot requested a review from tigrawap September 9, 2024 10:28
Copy link

graphite-app bot commented Sep 9, 2024

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (09/09/24)

1 reviewer was added to this PR based on Sergey Berezansky's automation.

@sergeyberezansky sergeyberezansky force-pushed the sergey/node-vol-stats branch 3 times, most recently from d15fd74 to 174c52d Compare September 9, 2024 11:30
Copy link
Collaborator Author

sergeyberezansky commented Sep 12, 2024

Merge activity

@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/322 to dev September 12, 2024 13:28
@sergeyberezansky sergeyberezansky merged commit 74cb32a into dev Sep 12, 2024
10 of 12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/node-vol-stats branch September 12, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant