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

Conditions on podupdater function of kubernetes autodiscovery #37431

Merged
merged 26 commits into from
Jan 15, 2024

Conversation

gizas
Copy link
Contributor

@gizas gizas commented Dec 13, 2023

  • Enhancement

[Needs https://github.com/elastic/elastic-agent-autodiscover/pull/71 first to be merged and update go.mod file]

Proposed commit message

  • WHAT: Update the PodUpdater fucntion with additonal checks before actaully triggering Pod watcher restarts
  • WHY: There where node and namespace events that dont always inlcude Metadata changes. We want only update events that change labels and annotations of node and namespace to trigger pod updates. This leads to bettwr management of watchers

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

See info #37338

Related issues

@gizas gizas requested a review from a team as a code owner December 13, 2023 09:34
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 13, 2023
@mergify mergify bot assigned gizas Dec 13, 2023
Copy link
Contributor

mergify bot commented Dec 13, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @gizas? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@gizas gizas added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Dec 13, 2023
@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 Dec 13, 2023
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

Expand to view the summary

Build stats

  • Start Time: 2023-12-13T09:35:02.508+0000

  • Duration: 9 min 8 sec

Steps errors 1

Expand to view the steps failures

Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'org.jenkinsci.plugins.workflow.steps.FlowInterruptedException'

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

mergify bot commented Dec 13, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b conditionsonPodupdater upstream/conditionsonPodupdater
git merge upstream/main
git push upstream conditionsonPodupdater

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 35 min 11 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@gizas gizas added backport-v8.12.0 Automated backport with mergify v8.12.0 labels Dec 13, 2023
@gizas gizas requested a review from a team as a code owner January 15, 2024 09:39
@gizas gizas removed the backport-v8.12.0 Automated backport with mergify label Jan 15, 2024
Copy link
Contributor

mergify bot commented Jan 15, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @gizas? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@gizas gizas added the backport-skip Skip notification from the automated backport with mergify label Jan 15, 2024
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

Expand to view the summary

Build stats

  • Start Time: 2024-01-15T09:39:48.351+0000

  • Duration: 12 min 41 sec

Test stats 🧪

Test Results
Failed 0
Passed 3
Skipped 0
Total 3

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@gizas gizas requested a review from a team as a code owner January 15, 2024 10:10
@gizas gizas removed the request for review from ChrsMark January 15, 2024 10:15
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 7 min 51 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 6 min 43 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 33 min 45 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 31 min 37 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 38 min 8 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@gizas gizas enabled auto-merge (squash) January 15, 2024 11:28
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

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

Expand to view the summary

Build stats

  • Duration: 49 min 34 sec

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

There is a new build on-going so the previous on-going builds have been aborted.

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

Expand to view the summary

Build stats

  • Start Time: 2024-01-15T11:01:10.829+0000

  • Duration: 34 min 15 sec

Test stats 🧪

Test Results
Failed 6
Passed 16080
Skipped 554
Total 16640

Test errors 6

Expand to view the tests failures

Build&Test / x-pack/winlogbeat-windows-2016-windows-2016 / [empty] – TEST-go-unit.xml
  • no error details
  • Expand to view the stacktrace

     Test report file C:\Users\jenkins\workspace\PR-37431-18-7cdf1ed7-468b-4d42-9625-1bbb2323712a\src\github.com\elastic\beats\build\x-pack\winlogbeat\build\TEST-go-unit.xml was length 0 
    

Build&Test / metricbeat-windows-2016-windows-2016 / TestMain –
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     exit status 0xc000013a
    FAIL	github.com/elastic/beats/v7/metricbeat/module/ceph/monitor_health	0.118s
     
    

Build&Test / heartbeat-windows-2016-windows-2016 / TestMakeESClient – github.com/elastic/beats/v7/heartbeat/beater
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestMakeESClient
    === RUN   TestMakeESClient/should_not_modify_the_timeout_setting_from_original_config
     
    

Build&Test / heartbeat-windows-2016-windows-2016 / TestMakeESClient/should_not_modify_the_timeout_setting_from_original_config – github.com/elastic/beats/v7/heartbeat/beater
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestMakeESClient/should_not_modify_the_timeout_setting_from_original_config
     
    

Build&Test / libbeat-unitTest / [empty] – TEST-go-unit.xml
  • no error details
  • Expand to view the stacktrace

     Test report file /var/lib/jenkins/workspace/PR-37431-18-6454c193-035c-42f8-90b1-3b39058861e9/src/github.com/elastic/beats/build/libbeat/build/TEST-go-unit.xml was length 0 
    

Build&Test / libbeat-goIntegTest / [empty] – TEST-go-integration.xml
  • no error details
  • Expand to view the stacktrace

     Test report file /var/lib/jenkins/workspace/PR-37431-18-0cd4e70f-466c-4218-86bc-b6902bf5d181/src/github.com/elastic/beats/build/libbeat/build/TEST-go-integration.xml was length 0 
    

Steps errors 1

Expand to view the steps failures

Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'org.jenkinsci.plugins.workflow.steps.FlowInterruptedException'

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Collaborator

💚 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

  • Duration: 178 min 32 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@gizas gizas merged commit 10b1f7a into main Jan 15, 2024
126 checks passed
@gizas gizas deleted the conditionsonPodupdater branch January 15, 2024 14:24
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
…c#37431)


* first update for nodePodUpdater with key function

* first update for namespacePodUpdater

* updating elastic-agent-autodiscovery library to v0.6.7

* updating NOTICE.txt

* updating kubernetes_test.go interface functions

* updating pod_test.go by removing unused functions

* updating receiver name in tests

* fixing lint events

---------

Co-authored-by: Michal Pristas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodiscovery backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent Label for the Agent team Team:obs-ds-hosted-services Label for the Observability Hosted Services team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants