Add selector tags for service (kube_inventory)#7267
Add selector tags for service (kube_inventory)#7267danielnelson merged 8 commits intoinfluxdata:masterfrom
Conversation
|
This is a small change to the kube_inventory plugin to extract selector information for a given service. |
|
@danielnelson - this is a relatively small change. any chance we can get this low-hanging fruit reviewed and merged? |
bac2735 to
ff8958d
Compare
|
I'm concerned about this change producing a lot of new tags depending on how selectors are being used. Especially if certain bits of tooling are creating selectors automatically (perhaps Helm or Istio). I think we should add a selector whitelist so that only the wanted selectors are added, we could use a style similar to what is done in the docker input plugin: Another question is if this should be part of only the service type, or if we need similar behavior for all types? |
…cable k8s object types - daemonset - deployment - persistentvolumeclaim - pod - statefulset
|
thanks for the feedback, @danielnelson the potential influx of tags is a fair concern (similar to what we have with labels elsewhere). i think users can always configure their output plugin(s) to filter out undesired tags/selectors/labels, if needed. but, the ability to control this earlier at the input plugin level has its benefits. i've gone ahead, and implemented the filtering capability as you suggested. i think selector information for the other types supported by kube_inventory is more of a nice-to-have. with the consolidated bits of information we can gather via the kubernetes plugin and prometheus plugin (kube-state-metrics), we can connect the dots between the various kubernetes object types today. i don't think we currently have this with kubernetes services (i.e. the ability to connect services to/from pods). either way, i've gone ahead, and added this for the other applicable object types as well. |
|
hi @danielnelson - what do you think of the latest update? do they address your concerns? thanks. |
|
@danielnelson - just wanted to make sure this was still on your radar. thanks in advance. |
danielnelson
left a comment
There was a problem hiding this comment.
Just one minor thing and can you merge or rebase master since we merged a change that introduced some conflicts.
| //err = ki.createSelectorFilters() | ||
| //if err != nil { | ||
| // return err | ||
| //} |
…add-selector-tags-for-service
| ## selectors to include and exclude as tags. Globs accepted. | ||
| ## Note that an empty array for both will include all selectors as tags | ||
| ## selector_exclude overrides selector_include if both set. | ||
| selector_include = [] | ||
| selector_exclude = ["*"] |
There was a problem hiding this comment.
Sorry, missed this. Let's initialize these options down in func init() { so that upgrades doesn't accidentally get set to include all. We can then list these commented out here in the sample configuration.
|
Thanks! |
thanks, @danielnelson. is there a roadmap/timeline for 1.15.0? |
|
Hoping to do RC1 tomorrow, then a release in about a week depending on what issues come up. |
Required for all PRs: