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

kubectl metrics plugin cleanup #1414

Closed
devdattakulkarni opened this issue Mar 10, 2025 · 0 comments · Fixed by #1416
Closed

kubectl metrics plugin cleanup #1414

devdattakulkarni opened this issue Mar 10, 2025 · 0 comments · Fixed by #1416

Comments

@devdattakulkarni
Copy link
Contributor

kubectl metrics plugin has gone through several updates. It used to support retrieving metrics for a Service instance, Servcie Account, Helm release, building object graph to get all application Pods, and then using those for finding metrics, etc. Some of these features are no longer supported. This issue is to track the cleanup of this plugin. Specifically, we should make following changes to this plugin.

  1. In kubectl-metrics, remove the parameters "cr" and follow_connections.
  2. Remove commented code from kubectl-metrics
  3. In the help message, add description for the parameters. Specially, for the <Namespace> parameter, include description that this is the Namespace in which the <Instance> is deployed. (Note that the <Namespace> of the instance is the same <Namespace> where the corresponding resourcecomposition instance is created. And that is same as the <Namespace> in which KubePlus is installed. So then do we really need this parameter? The plugin can find out KubePlus namespace on its end. In fact, not requiring the <Namespace> parameter will make the plugin more intuitive since from usage pov, providing the app name and Kind name should be enough to get the metrics for that app instance).
  4. If crmetrics.py, delete the options for res_type = account, service, helmrelease.
  5. Update handling of input parameters as we won't be passing in the "res_type" parameter from kubectl-metrics
  6. Keep the method get_metrics_cr and only the methods that are reachable from it. Delete all the other methods.
  7. Update the parameters of the get_metrics_cr. We no longer need namespace and follow_connections parameters.
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 a pull request may close this issue.

1 participant