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

Use replicaset and Job MetaGen based on watchers #35483

Merged
merged 17 commits into from
May 30, 2023

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented May 16, 2023

Respective PR for elastic/elastic-agent-autodiscover#44 part of elastic/elastic-agent-autodiscover#31.

Blocked until elastic/elastic-agent-autodiscover#44 is merged and a new version of the autodiscovery library is released.

How to test this PR

  1. Build Metricbeat using DEV=true PLATFORMS=linux/amd64 PACKAGES=docker mage -v package
  2. Build a custom docker image out of the previous build using the file from build/package/metricbeat-oss/metricbeat-oss-linux-amd64.docker/docker-build directory.
  3. Load the image into a kind cluster using kind load docker-image custom-mb
  4. Deploy Metricbeat on k8s using the custom image
  5. Verify that k8s module works as expected and also adds the job/cronjob and deployment/replicaset metadata properly.
  6. Verify the same as above for the autodiscovery part (hints + templates)
  7. Verify the same for the add_kubernetes_metadata processor.

@ChrsMark ChrsMark self-assigned this May 16, 2023
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 16, 2023
@mergify
Copy link
Contributor

mergify bot commented May 16, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @ChrsMark? 🙏.
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

@ChrsMark ChrsMark changed the title Use replicaset MetaGen based on watchers Use replicaset and Job MetaGen based on watchers May 16, 2023
@ChrsMark ChrsMark requested a review from gizas May 16, 2023 14:11
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 16, 2023

💚 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-30T11:55:46.591+0000

  • Duration: 65 min 20 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!)

Signed-off-by: ChrsMark <[email protected]>
@mergify
Copy link
Contributor

mergify bot commented May 26, 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 rs_watchers upstream/rs_watchers
git merge upstream/main
git push upstream rs_watchers

@ChrsMark ChrsMark marked this pull request as ready for review May 26, 2023 12:35
@ChrsMark ChrsMark requested review from a team as code owners May 26, 2023 12:35
@ChrsMark ChrsMark requested review from MichaelKatsoulis and removed request for fearful-symmetry and leehinman May 26, 2023 12:39
ChrsMark added 6 commits May 26, 2023 16:44
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark added Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team 8.9-candidate 8.9 candidate labels May 29, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 29, 2023
@ChrsMark ChrsMark added needs_team Indicates that the issue/PR needs a Team:* label v8.9.0 labels May 29, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 29, 2023
@ChrsMark
Copy link
Member Author

ChrsMark commented May 29, 2023

@gizas it seems that I don't have permissions to merge this one? Have we changed anything?

BTW both failures are unrelated to this PR's changes.

EDIT: e2e testing suite was using k8s manifests that were missing the required Roles to watch for Jobs. That's the reason for the failing tests. Fixed at elastic/e2e-testing#3530.

@ChrsMark
Copy link
Member Author

@elastic/elastic-agent-data-plane could you approve/merge this one please?

@gizas
Copy link
Contributor

gizas commented May 30, 2023

/test

@gizas
Copy link
Contributor

gizas commented May 30, 2023

/package

1 similar comment
@gizas
Copy link
Contributor

gizas commented May 30, 2023

/package

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

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

LGTM
The linter issues seem to be false-positives.

@ChrsMark
Copy link
Member Author

e2e tests passed. Merging this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants