After new resources were introduced with the #14875, we need to update the mapping which is still behind and should be updated accordingly.
The major concern here is about the place of the labels. Should it be like kubernetes.labels.* for all the resources or it should go under each resource like kubernetes.pod.labels.*, kubernetes.service.labels.*?
Another option would be to have them duplicated in both places so as to be able to search both on resource level but also across resources level for instance:
- filter all resources with
kubernetes.labels.app==node-exporter , will return events for pods, services, nodes etc. This is an equivalent of kubectl query :
$kubectl get all -l app=node-exporter --show-labels
NAME READY STATUS RESTARTS AGE LABELS
pod/node-exporter-z2h4r 1/1 Running 0 3h19m app=node-exporter,controller-revision-hash=5ddc9599dc,name=node-exporter,pod-template-generation=1
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE LABELS
service/node-exporter ClusterIP None <none> 9100/TCP 3h19m app=node-exporter,name=node-exporter
- filter on resource level like
kubernetes.pod.labels.app==node-exporter which will return events only for pods. kubectl equivalent:
kubectl get pods -l app=node-exporter --show-labels
NAME READY STATUS RESTARTS AGE LABELS
node-exporter-z2h4r 1/1 Running 0 3h21m app=node-exporter,controller-revision-hash=5ddc9599dc,name=node-exporter,pod-template-generation=1
Let's discuss about it!
cc: @exekias @jsoriano
Related to: #16554, #16480, #16483
After new resources were introduced with the #14875, we need to update the mapping which is still behind and should be updated accordingly.
The major concern here is about the place of the labels. Should it be like
kubernetes.labels.*for all the resources or it should go under each resource likekubernetes.pod.labels.*,kubernetes.service.labels.*?Another option would be to have them duplicated in both places so as to be able to search both on resource level but also across resources level for instance:
kubernetes.labels.app==node-exporter, will return events for pods, services, nodes etc. This is an equivalent of kubectl query :kubernetes.pod.labels.app==node-exporterwhich will return events only for pods. kubectl equivalent:Let's discuss about it!
cc: @exekias @jsoriano
Related to: #16554, #16480, #16483