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

Remove journald mount by default #1424

Closed
wants to merge 2 commits into from
Closed

Remove journald mount by default #1424

wants to merge 2 commits into from

Conversation

hjet
Copy link
Contributor

@hjet hjet commented Feb 24, 2022

PR Description

Since these sample manifests are mostly used in tandem with the Cloud agent/logs quickstart ConfigMap and soon the K8s integration ConfigMap (which will be even more streamlined), and neither scrapes logs from the journal, I propose omitting the mount and volume from the default manifests entirely.

An alternative solution is changing the etcmachineid volume type to file but this is cleaner IMO. I prefer reducing the scope of our defaults.

Which issue(s) this PR fixes

Fixes #451
Also see #1178

Notes to the Reviewer

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

@hjet hjet requested a review from rfratto February 24, 2022 23:17
@hjet hjet requested a review from rlankfo February 25, 2022 16:03
@hjet hjet unassigned rgeyer Feb 25, 2022
@hjet hjet requested a review from rgeyer February 25, 2022 16:03

// For reading journald
k.util.hostVolumeMount('etcmachineid', '/etc/machine-id', '/etc/machine-id', readOnly=true),
//k.util.hostVolumeMount('etcmachineid', '/etc/machine-id', '/etc/machine-id', readOnly=true),
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about commenting this out, because people still might want it. Can we make it opt-in instead? i.e., logsJournaldMixin or something?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for making this a parameter, and off by default.

Copy link
Member

Choose a reason for hiding this comment

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

This also might be a good opportunity to pull the bandaid and migrate everything to the v2 jsonnet, removing the versions. This is already optionally configurable in v2.

Copy link
Contributor Author

@hjet hjet Feb 25, 2022

Choose a reason for hiding this comment

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

yeah, ok. agreed on pulling the bandaid and migrating to v2 jsonnet.

@rgeyer this will delay delivering pod logs a bit (but not by much). i think it's important as we still want to maintain this non-operator deployment path going forward.

another advantage is we can finally provide a statefulset as the default (and i can quickly write an optional/experimental config to turn on eventhandler that we can provide in the onboarding plugin)

closing this PR

@rfratto i couldn't find how to configure the machine-id vol in the v2 jsonnet (https://github.com/grafana/agent/blob/main/production/tanka/grafana-agent/v2/internal/helpers/logs.libsonnet#L13) - could you point me in the right direction?

@hjet hjet closed this Feb 25, 2022
@hjet hjet deleted the fix_k3d branch February 25, 2022 21:27
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grafana-agent-logs failing to boot on k3d
3 participants