Skip to content

fix resources parameter to accept just cpu and/or memory #377

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickdallavalentina
Copy link

Issue #, if available:

There is no validation on the parameter that are passed to -resources then you can pass whatever parameter,
example how to replicate:

eks-node-viewer -resources memories

image

image

Description of changes:

This change adds validation for the -resources flag to ensure that only the values "cpu" and/or "memory" are accepted. If any invalid resource is provided (e.g., "memoryss"), the application will return an error. The update includes a helper function to validate the comma-separated list of resources

@nickdallavalentina nickdallavalentina requested a review from a team as a code owner February 19, 2025 12:08
@tzneal
Copy link
Contributor

tzneal commented Apr 3, 2025

There are other resource types (e.g. pods, ephemeral-storage or GPU resources) that might be useful to display. I don't think we should limit it to just cpu and memory.

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.

3 participants