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

Adding inforamtion for CRI-O configuration and enhancing our manifest… #32151

Merged
merged 23 commits into from
Jul 11, 2022

Conversation

gizas
Copy link
Contributor

@gizas gizas commented Jun 29, 2022

… comments

What does this PR do?

This PR adds documentation reference for CRI-O paths in container input and also in our kubernetes manifests.
Comments added in our manifests to guide user to config CRI-O running environment

Why is it important?

https://github.com/elastic/sdh-beats/issues/2210

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@gizas gizas requested review from a team as code owners June 29, 2022 11:47
@gizas gizas requested review from cmacknz and kvch and removed request for a team June 29, 2022 11:47
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 29, 2022
@mergify mergify bot assigned gizas Jun 29, 2022
@gizas gizas removed request for cmacknz and kvch June 29, 2022 11:50
@gizas gizas added the Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team label Jun 29, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 29, 2022
@gizas gizas added docs needs_team Indicates that the issue/PR needs a Team:* label labels Jun 29, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 29, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 29, 2022

💚 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: 2022-07-11T12:32:36.895+0000

  • Duration: 77 min 24 sec

Test stats 🧪

Test Results
Failed 0
Passed 6286
Skipped 737
Total 7023

💚 Flaky test report

Tests succeeded.

🤖 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
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.

Thanks for adding this! Keep in mind that in pure input's configs providers' content is not available so we should structure the patterns accordingly.

Also I would consider adding a note regarding CRI-O in https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html.

@@ -11,6 +11,8 @@ data:
filebeat.inputs:
- type: container
paths:
#Uncomment below line if you want to enable CRI-O based logs autodiscover
#- /var/log/pods/${data.kubernetes.pod.uid}/${data.kubernetes.container.name}/*.log
Copy link
Member

Choose a reason for hiding this comment

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

Content like ${data.kubernetes.*} is only available in configurations generated by the kubernetes provider, template based or hint's based. Here the configuration is the container input so the path should be sth like /var/log/pods/*/*/*.log. Haven't test it so it should be safe to make a test to ensure it's working.

Copy link
Contributor

Choose a reason for hiding this comment

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

is there any issue with /var/log/containers/*.log when used cri-o?
/var/log/containers/*.log is usually just a symlink of /var/log/pods/*/*/*.log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me test it.

If that is the case @tetianakravchenko then we dont need to do any changes at all. Not sure I was only following what we have in the code. Let me first test /var/log/pods/*/*/*.log and we can sync

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tetianakravchenko You are correct, symlink it is.

So removed it from here, I like better the /var/log/containers/*.log as have no subfolders.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gizas do we then need this PR if the default path /var/log/containers/*.log should work for different runtimes, including cri-o?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also /var/log/containers/*.log is symlink in containerd envs, checked it in docker.

On one hand our examples in doc show /var/log/pods/ and /var/lib/docker in each case. So we need to make sure that users have this info seperate per environment if they want to use actual links

Now the /var/log/containers/*.log is what we will propose in general, correct but I am not 100% sure that symlink is always the case in all envs. Just to be on safe side.

Does it make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

On one hand our examples in doc show /var/log/pods/ and /var/lib/docker in each case

you mean /var/log/containers/, instead of /var/log/pods/?

Now the /var/log/containers/*.log is what we will propose in general, correct but I am not 100% sure that symlink is always the case in all envs. Just to be on safe side.
Does it make sense?

to be on safe side - fine, but in this PR is emphasized that for cri-o runtime must be used /var/log/pods/* path, that is not correct and is misleading, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tetianakravchenko updated based on our discussion. Let me know if ok now?

@gizas
Copy link
Contributor Author

gizas commented Jul 5, 2022

Also I would consider adding a note regarding CRI-O in https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html.

It was in this PR: filebeat/docs/running-on-kubernetes.asciidoc @ChrsMark, is not it ok?

@mergify
Copy link
Contributor

mergify bot commented Jul 8, 2022

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 docs_for_crio upstream/docs_for_crio
git merge upstream/main
git push upstream docs_for_crio

@gizas gizas merged commit c47ef26 into main Jul 11, 2022
@gizas gizas deleted the docs_for_crio branch July 11, 2022 14:23
bmorelli25 added a commit to bmorelli25/beats that referenced this pull request Jul 11, 2022
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
#32151)

* [DOCS] Removed reference to the Stack GS (#32083)

* [DOCS] Removed reference to the Stack GS (#32119)

* Adding inforamtion for CRI-O configuration and enhancing our manifest comments

* Adding CHANGELOG.asciidoc info

* Adding CHANGELOG.next.asciidoc info

* Keeping only containers path

* Keeping only containers path

* Keeping only containers path

* Adding note

* Adding note

* Adding note

* Adding note

* Adding note

* Update input-container.asciidoc

* Update running-on-kubernetes.asciidoc

* Fixing Conflicts

* Fixing Conflicts

* Removig other path references and kept only /var/log/containers/

* Removig other path references and kept only /var/log/containers/

* Adding generated files

Co-authored-by: debadair <debadair@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for CRI-O paths
5 participants