-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ansible: how to expose CR status condition in metrics? #2576
Comments
Hey Guys, any thoughts on this one? |
Disclaimer: not an authoritative source when it comes to controller metrics. I have only tied into the work that @lilic had done to expose custom resource metrics (#1277) for Ansible based operators specifically #1723 and have looked at the metrics provided by controller-runtime. Short answer: No. I do not believe that this is currently possible for operator-sdk based operators in general; this issue isn't specific to Ansible. It looks like kube-state-metrics does something similar for deployments kubernetes/kube-state-metrics#889 but handling this generically for custom resources would probably take some investigation. |
Thanks for checking this. I think it would be a great feature to have :) |
Another possible route for having a feature like this would be the hybrid operator approach that we're considering. Basically, the idea is that we would work toward making the Ansible (and Helm) operator Go code more reusable and extensible. Then, for example, folks would be able to instantiate an Ansible controller in a Go operator and add custom code to support this kind of thing. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Type of question
how to implement a specific feature
Question
I can see there are some built in metrics endpoints but they provide some overall counts only (like: ansible_operator_reconciles_count or controller_runtime_reconcile_errors_total).
But Is there any way to expose metrics which would allow to quantify how many CRs in Status Condition True|False|Unknown? I think this is sort of a standard as per:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
If we have it as part of the metric label together with CR name and namespace, then one could easily monitor the situation when CR changes status to False|Unknown for example.
The text was updated successfully, but these errors were encountered: