Skip to content

Define mapping for new k8s resources #16558

@ChrsMark

Description

@ChrsMark

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:

  1. 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
  1. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions