Add containerd container_fs_usage_bytes metrics#3730
Open
nenych wants to merge 1 commit intogoogle:masterfrom
Open
Add containerd container_fs_usage_bytes metrics#3730nenych wants to merge 1 commit intogoogle:masterfrom
nenych wants to merge 1 commit intogoogle:masterfrom
Conversation
* Add CRI stats API integration for containerd filesystem usage - Enable filesystem stats collection using CRI ContainerStats API - Replace inefficient directory walking with proper CRI stats calls - Add memory-efficient caching (30s) to minimize API overhead - Support containerd 2.x with k8s.io/cri-api dependency - Only collect stats for regular containers (exclude sandbox containers) - Maintain backward compatibility and existing design patterns * Fix Docker build: ensure dependencies are resolved after adding source code - Add go mod download && go mod tidy step after ADD . . - This ensures k8s.io/cri-api dependency is properly resolved in Docker build context * Add explicit k8s.io/cri-api dependency in Dockerfile - Explicitly get k8s.io/cri-api@v0.29.0 before build step - This ensures the dependency is available in Docker build context * Add k8s.io/cri-api dependency to cmd module - Add k8s.io/cri-api v0.29.0 to cmd/go.mod - Run go mod tidy to update cmd/go.sum - This fixes Docker build module resolution for CRI stats API * Remove unwanted Dockerfile module download * Update k8s.io/cri-api to v0.34.1 - Upgrade from v0.29.0 to v0.34.1 for latest CRI API features - Update both root and cmd module dependencies - Run go mod tidy to update checksums * Fix tests * Update collectFilesystemUsage function --------- Co-authored-by: nenych <mykhailo.nenych@aspira.global>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the CRI stats api to gather the containerd disk usage metrics