Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[Metricbeat] Dont generate config if not enabled #767

Merged
merged 1 commit into from Oct 20, 2020
Merged

[Metricbeat] Dont generate config if not enabled #767

merged 1 commit into from Oct 20, 2020

Conversation

ebuildy
Copy link
Contributor

@ebuildy ebuildy commented Aug 4, 2020

If for daemonset/deployment is not enabled, dont generate useless config YAML.

  • Chart version not bumped (the versions are all bumped and released at the same time)
  • README.md updated with any new values or changes
  • Updated template tests in ${CHART}/tests/*.py
  • Updated integration tests in ${CHART}/examples/*/test/goss.yaml

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@jmlrt jmlrt added enhancement New feature or request metricbeat labels Aug 25, 2020
@jmlrt
Copy link
Member

jmlrt commented Aug 25, 2020

cla/check

@jmlrt
Copy link
Member

jmlrt commented Sep 23, 2020

jenkins test this please

Copy link
Member

@jmlrt jmlrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ebuildy, thanks for this PR.

Do you think you could update the following tests to ensure that the config map aren't generated when one daemonset or deployment isn't enabled:

def test_disable_daemonset():
config = """
daemonset:
enabled: false
"""
r = helm_template(config)
assert name not in r.get("daemonset", {})
def test_disable_deployment():
config = """
deployment:
enabled: false
"""
r = helm_template(config)
assert name + "-metrics" not in r.get("deployment", {})

If for daemonset/deployment is not enabled, dont generate useless config YAML.

[metricbeat] Add tests
Copy link
Member

@jmlrt jmlrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM⛴

@jmlrt
Copy link
Member

jmlrt commented Oct 20, 2020

jenkins test this please

@jmlrt jmlrt changed the title Dont generate config if not enabled [Metricbeat] Dont generate config if not enabled Oct 20, 2020
@jmlrt jmlrt merged commit 5090830 into elastic:master Oct 20, 2020
jmlrt pushed a commit that referenced this pull request Oct 20, 2020
If for daemonset/deployment is not enabled, dont generate useless config YAML.
jmlrt pushed a commit that referenced this pull request Oct 20, 2020
If for daemonset/deployment is not enabled, dont generate useless config YAML.
jmlrt pushed a commit that referenced this pull request Oct 20, 2020
If for daemonset/deployment is not enabled, dont generate useless config YAML.
@jmlrt
Copy link
Member

jmlrt commented Oct 20, 2020

backported to 6.8, 7.9 and 7.x branches

@jmlrt jmlrt mentioned this pull request Oct 28, 2020
This was referenced Nov 17, 2020
@jmlrt jmlrt mentioned this pull request Nov 23, 2020
@jmlrt jmlrt mentioned this pull request Feb 8, 2021
@jmlrt jmlrt mentioned this pull request Mar 15, 2021
@jmlrt jmlrt mentioned this pull request Mar 18, 2021
@jmlrt jmlrt mentioned this pull request May 25, 2021
@jmlrt jmlrt mentioned this pull request Mar 8, 2022
@jmlrt jmlrt mentioned this pull request Apr 21, 2022
This was referenced Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants