-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Define mapping for new k8s resources #16558
Comments
I think that we should have them at least in To retrieve resources of an specific kind we can use other fields as |
I see that point, and my thoughts go in the same direction. It's important that we are able to correlate labels, even from different resources. That said, we have another problem, when we enrich a Pod with namespace metadata, we end up with both pod & namespace labels in the same document. Which somehow forces us to put namespace labels under a different key (ie |
For reference, this is an example of where it's useful to have namespace labels/annotations around with the Pod: #16321 |
Well, namespaces are a bit special, because most resources belong to some namespace. It can be a good option to have all the labels in |
After investigating into #16834 I'm putting some thoughts together so as to move it forward: I see 2 cases here: Pure resource metadata and embedded resource metadata. For pure resources' metadata like
For embedded resource metadata, like when in
options are:
My current opinion is to go with options no_3 for pure and embedded resources. I think it simplifies the understanding of the feature and is more robust. An example would be:
The breaking change goes only on the |
Thank you for the research and explanation! For "pure resource" metadata I think option 1 is best. Is what we were doing already for Pods. It would be interesting to double check that we do the same when we enrich info about services/nodes. As I suspect these are going under As per embedded, in my opinion having all kind's labels merged defeats their purpose, as there is no way to differentiate a label source (except by manual inspection). Put for example, if I want to find all the kinds with a certain label, I will filter by them under Option 2 makes more sense to me, where you report labels for the monitored resource, while keeping the rest for context. @jsoriano & @blakerouse, any thouhgs ? |
This is right we don't do this for |
I think Option 2 makes the most sense as well. Being that the event is for a specific kind it makes sense that the labels for that kind be at |
+1 to option 2, |
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-exporter
which will return events only for pods. kubectl equivalent:Let's discuss about it!
cc: @exekias @jsoriano
Related to: #16554, #16480, #16483
The text was updated successfully, but these errors were encountered: