feat(resmonitor): Allow custom-endpoint metrics via appendpoint config (Issue #1220)
Addresses #1220 (Support for application-specific metrics tracking)
Changes:
- Extend ResourceMonitor CRD (deploy/kubeplus-chart/crds/kubeplus-crds.yaml) to accept
appendpointsection for custom nodePort endpoints and metrics - Update Go API (platform-operator/pkg/apis/workflowcontroller/v1alpha1/types.go) to include new struct fields for appendpoint
- Enhance plugin (plugins/crmetrics.py) with _get_custom_metrics() to detect and fetch metrics from the configured endpoint
- Add example managed-service "custom-hello-world" under examples/managed-service/appmetrics to demonstrate custom metrics use case
- Expand tests (tests/tests.py) to cover both default metrics (test_metrics()) and custom-endpoint metrics (test_metrics_custom())
@tonyn10 Overall the PR looks good. I have added one small comment.
Also -- what were the files that got generated after running update-codegen.sh? Can you list the files here. I know we have not included them in the PR, but it will be good to know which files are supposed to be generated when I run update-codegen once the PR is merged. (Or, may be there is a case to include those files in the PR as well -- that way, there is no need to re-run update-codegen again). In any case, it will be good to know what are the new scaffolding files that were generated.
@tonyn10 Overall the PR looks good. I have added one small comment.
Also -- what were the files that got generated after running update-codegen.sh? Can you list the files here. I know we have not included them in the PR, but it will be good to know which files are supposed to be generated when I run update-codegen once the PR is merged. (Or, may be there is a case to include those files in the PR as well -- that way, there is no need to re-run update-codegen again). In any case, it will be good to know what are the new scaffolding files that were generated.
update-codegen.sh created the platform/vendor/ directory. In this directory, there are a lot of files. These are all the files in the vendor directory (I did ls -R platform/vendor/ > platform_vendor_files.txt):
platform_vendor_files.txt
Since there's so much, I'm not sure if it's a good idea to have it all tracked on git but let me know if there are certain ones that we should track.
I'll also fix the comment you have regarding the implementation in crmetrics.py