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

feat(config): added config option to enable/disable autodiscovery #69

Merged
merged 3 commits into from
Aug 31, 2020

Conversation

paologallinaharbur
Copy link
Member

@paologallinaharbur paologallinaharbur commented Aug 28, 2020

Use Case
Sometimes we want to run the integration in an environment where autodiscovery is not needed or due to permission limitation cannot be performed. In this scenarios hundreds of error logs were shown together with failing request to k8s APIs.

Es: service account running the pod ha not visibility into the whole cluster.

time="2020-08-28T11:20:53Z" level=warning msg="couldn't list node resource, retrying" component=KubernetesAPI error="timeout reached, 60 retries executed. last error: nodes is forbidden: User \"system:serviceaccount:new-relic:nri-prometheus\" cannot list resource \"nodes\" in API group \"\" at the cluster scope"

Solution

  • A config option enable_autodiscovery has been added in order to add the possibility to enable/disable autodiscovery.
  • By default such config is set to true

UPDATE

After discussion the config option as been called disable_autodiscovery with default false

@paologallinaharbur paologallinaharbur requested a review from a team August 28, 2020 11:21
@paologallinaharbur paologallinaharbur changed the title feat(config): added config option to disable autodiscovery feat(config): added config option to enable/disable autodiscovery Aug 28, 2020
cmd/nri-prometheus/config.go Outdated Show resolved Hide resolved
@paologallinaharbur paologallinaharbur requested review from ardias and a team August 31, 2020 08:50
@paologallinaharbur paologallinaharbur merged commit 9099e99 into main Aug 31, 2020
@paologallinaharbur paologallinaharbur deleted the feat/disableAutodiscovery branch August 31, 2020 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants