Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Updating beats Clusteroles to allow job,daemonset discovery #3530

Merged
merged 1 commit into from
May 30, 2023

Conversation

gizas
Copy link
Contributor

@gizas gizas commented May 30, 2023

Bug fix for the failing E2E tests that was found here: https://beats-ci.elastic.co/blue/organizations/jenkins/e2e-tests%2Fe2e-testing-mbp/detail/main/3080/pipeline

What does this PR do?

This PR updates the beats (filebeat, metricbeat, hearbeat) templates and agent templates of e2e test framework used in Autodiscovery scenarios.

The mentioned templates did not have all the needed Clusteroles in order to allow monitoring of resources

Why is it important?

It affects all the CI pipelines where we trigger the E2E tests with autodiscovery

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 run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

How to test this PR locally

1.Download the e2e framework
1.Navigate to e2e/_suites/kubernetes-autodiscover

Run the following

export BEAT_VERSION=8.9.0-SNAPSHOT                                                  
export GITHUB_CHECK_SHA1="22382ca036edce9827672013a0870df6f8583724"
export KIND_VERSION=“0.17.0”
export GITHUB_CHECK_REPO=beats
export KUBERNETES_VERSION="1.26.3"

OP_LOG_LEVEL=DEBUG go test -timeout 90m -v --godog.tags='@filebeat'
OP_LOG_LEVEL=DEBUG go test -timeout 90m -v --godog.tags='@metricbeat'

Logs

DEBU[0168] Not processing custom binaries for pod: a failing pod. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
..DEBU[0197] Running scenario Logs collection from short-living cronjobs in namespace: test-151d8b4a-15d6-49ac-9d1b-d5951f10583a
.DEBU[0207] Not processing custom binaries for pod: a short-living cronjob. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
...DEBU[0304] Running scenario Logs collection from a pod with an init container in namespace: test-418c8e2c-db9a-4631-9920-2826458bf51b
.DEBU[0314] Not processing custom binaries for pod: a pod. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
...DEBU[0375] Running scenario Logs collection from a pod with an ephemeral container in namespace: test-d466f5b7-6a3d-42fb-b58a-61b9822078fa
.DEBU[0385] Not processing custom binaries for pod: a pod. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
....DEBU[0452] Running scenario Logs collection from running pod and metadata enrichment using add_kubernetes_metadata in namespace: test-584153c8-f249-44f0-84bf-11ec832a5abe
.DEBU[0462] Not processing custom binaries for pod: a pod. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
..DEBU[0526] Running scenario Enrichment of normal input using add_kubernetes_metadata in namespace: test-19bba0f2-faf1-49e0-a444-258823556e42
.DEBU[0537] Not processing custom binaries for pod: a pod. Only [elasticsearch, filebeat, heartbeat, metricbeat, elastic-agent] will be processed
..INFO[0602] Kind cluster logs exported                    cluster=kind-36cfac49-3d88-4c39-8364-612b94678e64 path=/Users/andreasgkizas/elastic/e2e-testing/outputs/kubernetes-autodiscover/kind-36cfac49-3d88-4c39-8364-612b94678e64
INFO[0603] kind cluster  was deleted
 25


7 scenarios (7 passed)
25 steps (25 passed)
11m11.929302625s
testing: warning: no tests to run
PASS
ok  	github.com/elastic/e2e-testing/e2e/_suites/kubernetes-autodiscover	673.009s

@mergify
Copy link
Contributor

mergify bot commented May 30, 2023

This pull request does not have a backport label. Could you fix it @gizas? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label May 30, 2023
@gizas gizas added the bug Something isn't working label May 30, 2023
Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

Lgtm.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-05-30T10:44:25.252+0000

  • Duration: 70 min 16 sec

Test stats 🧪

Test Results
Failed 0
Passed 28
Skipped 0
Total 28

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@gizas gizas merged commit 7a88389 into main May 30, 2023
@gizas gizas deleted the Autodiscoveryfix branch May 30, 2023 11:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-skip Skip notification from the automated backport with mergify bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants