CatherineF-dev
CatherineF-dev
cel should be a `complete` language, which means it can extract every field. cel is more powerful than current APIs and is capable of extracting more things.
Verified that can convert k8s objects into yamls https://github.com/kubernetes/kube-state-metrics/compare/main...CatherineF-dev:kube-state-metrics:cr-metrics-2?expand=1.
## Existing problems for KSM custom resource ### 1. Custom resource API is complicated and not flexible Now, it supports 7 operations: each, path, labelFromKey, labelsFromPath, valueFrom, commonLabels and *....
cc @dgrisonnet, What else do I need to add into https://github.com/kubernetes/kube-state-metrics/issues/1978#issuecomment-1507076370? Thx!
Reply @nathanperkins, I think [CEL](https://github.com/google/cel-go) can parse annotation values as json. So it's feasible. Design doc is here: Simplify custom resource state metrics API using CEL(https://github.com/kubernetes/kube-state-metrics/pull/2059) Also, it can support...
I find we can reuse some codes from `Custom Resource Field Selectors` https://github.com/kubernetes/enhancements/blob/b3f29fe1223ebf09858ad3289dbfe3f652dd6069/keps/sig-api-machinery/4358-custom-resource-field-selectors/README.md
The metric name should be kube_pod_container_ready_time. You can add this new metric @bharathvenkatrajan with container label. Example PR is https://github.com/kubernetes/kube-state-metrics/pull/1932
QQ: have you enabled custom state resource metrics feature?
Since you are not using CustomResourceStateMetrics feature `spec: {}`, could you disable this feature and try again?