-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[filebeat] deployment support feature #964
[filebeat] deployment support feature #964
Conversation
This commit indtroduces the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a `values.yaml` syntax as below: `values.yaml` --- ```yaml [...] deploymentType: [daemonset|deployment] [...] ``` Specifically, this is used for creation of Filebeat instances not bound to each Worker, conducting non-Worker-related work, such as collection of AWS CloudTrail logs as described in [1]. [1]:elastic#821
This commit adds a default value test for `deploymentType`. Additionally, * `test_deployment_type_deployment` Checks if a `Deployment` is created but NOT a `DaemonSet` * `test_deployment_type_daemonset` Checks if a `DaemonSet` is created but NOT a `Deployment` * `test_deployment_type_case_insensitive` Checks if `deploymentType` value is accepted in a case-insensitive way.
This commit uses the MetricBeat Helm chart to create a Daemonset/Deployment Helm chart for Filebeat. Uses the ```yaml daemonset: [...] deployment: [...] ``` structure falling back to root key defaults.
The value: ```yaml serviceAccount: "" ``` was existing twice in the `filebeat/values.yaml` file.
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
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? |
…atorequals/helm-charts into filebeat-deployment-support-feature
1a5d368
to
d82ad0d
Compare
Hello @jmlrt ! To sum up, I revised all your comments and suggestions (you left in the previous PR: #822), and reworked tests to include both Deployment and Daemonset, by merging the current test script with the Metricbeat's test script. I hope I eased your life a bit, as these Daemonset/Deployment hybrid Helm Charts are quite tedius :) $ pytest -v
============================================================================================= test session starts ==============================================================================================
platform darwin -- Python 3.9.0, pytest-4.1.0, py-1.8.0, pluggy-0.13.0 -- [...]
collected 39 items
tests/filebeat_test.py::test_defaults PASSED [ 2%]
tests/filebeat_test.py::test_adding_a_extra_container PASSED [ 5%]
tests/filebeat_test.py::test_adding_init_containers_as_yaml PASSED [ 7%]
tests/filebeat_test.py::test_adding_a_extra_init_container PASSED [ 10%]
tests/filebeat_test.py::test_adding_envs PASSED [ 12%]
tests/filebeat_test.py::test_adding_deprecated_envs PASSED [ 15%]
tests/filebeat_test.py::test_adding_image_pull_secrets PASSED [ 17%]
tests/filebeat_test.py::test_adding_host_networking PASSED [ 20%]
tests/filebeat_test.py::test_adding_tolerations PASSED [ 23%]
tests/filebeat_test.py::test_adding_deprecated_tolerations PASSED [ 25%]
tests/filebeat_test.py::test_override_the_default_update_strategy PASSED [ 28%]
tests/filebeat_test.py::test_setting_a_custom_service_account PASSED [ 30%]
tests/filebeat_test.py::test_self_managing_rbac_resources PASSED [ 33%]
tests/filebeat_test.py::test_setting_pod_security_context PASSED [ 35%]
tests/filebeat_test.py::test_setting_deprecated_pod_security_context PASSED [ 38%]
tests/filebeat_test.py::test_adding_in_filebeat_config PASSED [ 41%]
tests/filebeat_test.py::test_adding_in_deprecated_filebeat_config PASSED [ 43%]
tests/filebeat_test.py::test_adding_a_secret_mount PASSED [ 46%]
tests/filebeat_test.py::test_adding_a_deprecated_secret_mount PASSED [ 48%]
tests/filebeat_test.py::test_adding_a_extra_volume_with_volume_mount PASSED [ 51%]
tests/filebeat_test.py::test_adding_a_deprecated_extra_volume_with_volume_mount PASSED [ 53%]
tests/filebeat_test.py::test_adding_a_node_selector PASSED [ 56%]
tests/filebeat_test.py::test_adding_deprecated_node_selector PASSED [ 58%]
tests/filebeat_test.py::test_adding_an_affinity_rule PASSED [ 61%]
tests/filebeat_test.py::test_priority_class_name PASSED [ 64%]
tests/filebeat_test.py::test_adding_deprecated_labels PASSED [ 66%]
tests/filebeat_test.py::test_adding_daemonset_labels PASSED [ 69%]
tests/filebeat_test.py::test_adding_daemonset_labels_surpasses_root_labels PASSED [ 71%]
tests/filebeat_test.py::test_adding_deployment_labels PASSED [ 74%]
tests/filebeat_test.py::test_adding_deployment_labels_surpasses_root_labels PASSED [ 76%]
tests/filebeat_test.py::test_adding_serviceaccount_annotations PASSED [ 79%]
tests/filebeat_test.py::test_adding_env_from PASSED [ 82%]
tests/filebeat_test.py::test_adding_deprecated_env_from PASSED [ 84%]
tests/filebeat_test.py::test_overriding_resources PASSED [ 87%]
tests/filebeat_test.py::test_adding_deprecated_resources PASSED [ 89%]
tests/filebeat_test.py::test_setting_fullnameOverride PASSED [ 92%]
tests/filebeat_test.py::test_adding_annotations PASSED [ 94%]
tests/filebeat_test.py::test_disable_daemonset PASSED [ 97%]
tests/filebeat_test.py::test_disable_deployment PASSED [100%] |
Great! I'll to take a look this week. Again thanks for your work here 👍 |
jenkins test this please |
jenkins test this please |
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
* chore: bump helm charts version * chore: bump helm version * chore: bump kind version * fix: support filebeat deployment elastic/helm-charts#964 introduced the feature of deploying a Kubernetes deployment instead of a Daemonset using Filebeat, using a values.yaml syntax equivalent to Metricbeat * chore: update version to 7.11.2 # Conflicts: # .ci/Jenkinsfile
This PR is a duplicate of #822, which I lost control of because I deleted my fork by accident
This PR introduces the feature of deploying a Kubernetes deployment
instead of a Daemonset using Filebeat, using a
values.yaml
syntaxequivalent to Metricbeat.
Specifically, this is used for creation of Filebeat instances not
bound to each Worker, conducting non-Worker-related work, such as
collection of AWS CloudTrail logs as described in [1].
[1] :#821
${CHART}/tests/*.py
${CHART}/examples/*/test/goss.yaml
Fix #821