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

[8.x](backport #40301) Disable kubeadm for filebeat (both filbeat.input and filbeat.autodiscover) #40889

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 18, 2024

  • Enhancement

NOTE: Dont merge until elastic/elastic-agent-autodiscover#98 is also merged

Proposed commit message

WHAT: Provide a configuration option to disable /api/v1/namespaces/kube-system/configmaps/kubeadm-config for filebeat autodiscovery and add_kubernetes_metadata processor. In more details user will disable the api requests by using configuration use_kubeadm: false

In this PR we added the option in order to support both filbeat.input and filebeat.autodiscover blocks of configuration.

WHY: https://github.com/elastic/enhancements/issues/21172

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  1. Follow same steps as described [Kubernetes - Metricbeat] Providing config option to disable Kubeadm config api requests #40086
  2. The filebeat configuration should contain only autodiscover config: https://github.com/elastic/beats/blob/main/deploy/kubernetes/filebeat-kubernetes.yaml#L133C1-L150C42

Related issues

Screenshots

Screenshot 2024-09-10 at 11 27 21 AM

LOG processing continues successfully:

Screenshot 2024-09-10 at 11 51 22 AM

For the filebeat.input block:

Screenshot 2024-09-10 at 2 17 25 PM

LOG processing continues successfully:
Screenshot 2024-09-10 at 2 30 40 PM


This is an automatic backport of pull request #40301 done by [Mergify](https://mergify.com).

…over) (#40301)

* disable kubeadm for filebeat autodiscover

* Update filebeat/_meta/test/docs/01_playground/filebeat.yaml

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>

* Update libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>

* Update dev-tools/kubernetes/filebeat/Dockerfile.debug

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>

* fixing docs and adding mericbeat references

* fixing docs and adding mericbeat references

* Update filebeat/_meta/config/filebeat.autodiscover.reference.yml.tmpl

Co-authored-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

---------

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
Co-authored-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
(cherry picked from commit 89cd840)

# Conflicts:
#	metricbeat/module/kubernetes/util/kubernetes.go
@mergify mergify bot requested a review from a team as a code owner September 18, 2024 15:20
@mergify mergify bot added the backport label Sep 18, 2024
@mergify mergify bot requested a review from a team as a code owner September 18, 2024 15:20
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Sep 18, 2024
@mergify mergify bot requested a review from a team as a code owner September 18, 2024 15:20
@mergify mergify bot requested review from mauri870, khushijain21, gizas and constanca-m and removed request for a team September 18, 2024 15:20
@mergify mergify bot assigned gizas Sep 18, 2024
Copy link
Contributor Author

mergify bot commented Sep 18, 2024

Cherry-pick of 89cd840 has failed:

On branch mergify/bp/8.x/pr-40301
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit 89cd840997.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.next.asciidoc
	modified:   dev-tools/kubernetes/filebeat/Dockerfile.debug
	modified:   dev-tools/kubernetes/heartbeat/Dockerfile.debug
	modified:   dev-tools/kubernetes/metricbeat/Dockerfile.debug
	modified:   filebeat/_meta/config/filebeat.autodiscover.reference.yml.tmpl
	modified:   filebeat/_meta/test/docs/01_playground/filebeat.yaml
	modified:   filebeat/filebeat.reference.yml
	modified:   libbeat/autodiscover/providers/kubernetes/config.go
	modified:   libbeat/autodiscover/providers/kubernetes/pod.go
	modified:   libbeat/autodiscover/providers/kubernetes/service.go
	modified:   libbeat/processors/add_kubernetes_metadata/config.go
	modified:   libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc
	modified:   libbeat/processors/add_kubernetes_metadata/kubernetes.go
	modified:   metricbeat/docs/modules/kubernetes.asciidoc
	modified:   metricbeat/metricbeat.reference.yml
	modified:   metricbeat/module/kubernetes/_meta/config.reference.yml
	modified:   x-pack/filebeat/filebeat.reference.yml
	modified:   x-pack/metricbeat/metricbeat.reference.yml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   metricbeat/module/kubernetes/util/kubernetes.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 18, 2024
@pierrehilbert pierrehilbert added Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Sep 18, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 18, 2024
@gizas gizas enabled auto-merge (squash) September 19, 2024 13:08
@gizas gizas merged commit 1ebbe64 into 8.x Sep 19, 2024
131 checks passed
@gizas gizas deleted the mergify/bp/8.x/pr-40301 branch September 19, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants