[Doc] Add example of Custom Metrics via Kube-state-metrics CustomResourceStateMetrics #1159
Labels
carvel-accepted
This issue should be considered for future work and that the triage process has been completed
documentation
This issue indicates a change to the docs should be considered
enhancement
This issue is a feature request
good first issue
An issue that will be a good candidate for a new contributor
Describe the problem/challenge you have
The controller it self has a small number of Metrics available. This should be extended for proper Monitoring/Alerting.
I mostly use the APP resource and there a only some total counter, which does not represent the proper state of the app.
One solution would be to add them to the controller library, but that would need some coding and testing.
There is a easy solution to add metrics on CustomResources via the kube-state-metrics CustomResourceStateMetrics project.
The kube-state-metrics is a K8S addons that is widely installed and already used for a lot of standard components like Deployments or Satefullsets.
Describe the solution you'd like
So the easies way would be to provide a predefined CustomResourceStateMetrics file for the controller.
bsp for app.kappctrl.k14s.io:
This will result in two different Metrics per APP.
0
unpaused1
pausedWill add all the valid types from api definition
Or a
0
if nostatus.condition.type
is setThe spec file can be extended to all possible metrics some one need and all used resources f.e. package, packageRepositoy can be added.
For Adding it to any cluster use the kube-state-metrics documentation
The text was updated successfully, but these errors were encountered: