Skip to content

Cherry-pick #14738 to 7.x: Refactor kubernetes autodiscover to enable different resource based discovery#14924

Merged
ChrsMark merged 1 commit intoelastic:7.xfrom
ChrsMark:backport_14738_7.x
Dec 4, 2019
Merged

Cherry-pick #14738 to 7.x: Refactor kubernetes autodiscover to enable different resource based discovery#14924
ChrsMark merged 1 commit intoelastic:7.xfrom
ChrsMark:backport_14738_7.x

Conversation

@ChrsMark
Copy link
Copy Markdown
Member

@ChrsMark ChrsMark commented Dec 3, 2019

Cherry-pick of PR #14738 to 7.x branch. Original message:

This PR tries to move around code in a way such that each resource has its own interface implementation and the autodiscover relies on a resource parameter to determine what the watcher to spin up and how to create hints. We also now add scope as a parameter to define if Beats is running either at a node level or at a cluster level.

metricbeat.autodiscover:
  providers:
    - type: kubernetes
      kube_config: ${HOME}/.kube/config
      resource: service
      hints.enabled: true

output.console.pretty: true

The above configuration would enable discovering service objects across the cluster.

metricbeat.autodiscover:
  providers:
    - type: kubernetes
      kube_config: ${HOME}/.kube/config
      resource: pod
      scope: cluster
      hints.enabled: true

The above configuration would allow doing pod discovery across the cluster.

closes #14044 and #10578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport review Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants