Skip to content
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

Collect k8s endpoints, ingress, and services in kube_inventory plugin #6105

Merged
merged 11 commits into from
Jul 19, 2019

Conversation

glinton
Copy link
Contributor

@glinton glinton commented Jul 10, 2019

Closes #5822

Adds support for collecting ingress, endpoint, and service information from kubernetes.

A few questions regarding what to collect:

  • serivces: do we wish to add external_ips to the metrics
  • endpoints: do we wish to add hostnames/ready state to the metrics
  • ingress: do we wish to add ips to the metrics

Each of these additions would replicate the current metrics for each ip/hostname.

- kubernetes_endpoint,name=test,namespace=default,port_name=server,port_protocol=TCP created=1544102222000000000i,generation=0i,port=1234i 1562790821000000000
+ kubernetes_endpoint,hostname=127.0.0.1,name=storage,namespace=default,port_name=server,port_protocol=TCP created=1544102222000000000i,generation=0i,port=1234i,ready=true 1562790821000000000

- kubernetes_ingress,backend_service_name=test,name=test,namespace=default,path=/ backend_service_port=1234i,created=1544103262000000000i,generation=26i 1562790821000000000
+ kubernetes_ingress,backend_service_name=test,ip=1.0.0.127,name=test,namespace=default,path=/ backend_service_port=1234i,created=1544103262000000000i,generation=26i 1562790821000000000

- kubernetes_service,cluster_ip=127.0.0.1,name=test,namespace=default,port_name=diagnostic,port_protocol=TCP created=1551199644000000000i,generation=0i,port=1234i 1562790821000000000
+ kubernetes_service,ip=1.0.0.1,cluster_ip=127.0.0.1,name=test,namespace=default,port_name=diagnostic,port_protocol=TCP created=1551199644000000000i,generation=0i,port=1234i 1562790821000000000

Required for all PRs:

  • Associated README.md updated.
  • Has appropriate unit tests.

@glinton glinton added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/k8s labels Jul 10, 2019
@danielnelson
Copy link
Contributor

I would try to avoid adding the IPs, do we have enough information to omit them and still have uniqueness? Is there a dns name that could be used instead? Hostnames on the other hand are probably good to collect, and the ready flag also seems useful (so long as there are only two states).

@danielnelson danielnelson requested a review from goller July 17, 2019 23:06
@danielnelson danielnelson added this to the 1.12.0 milestone Jul 19, 2019
@danielnelson danielnelson merged commit 877c423 into master Jul 19, 2019
@danielnelson danielnelson deleted the feat/5822 branch July 19, 2019 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrape Kubernetes service, endpoints, and ingress
2 participants