-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fluent-plugin-loki: Restructuring and CI #2006
fluent-plugin-loki: Restructuring and CI #2006
Conversation
Wow we really needed that !! I’ll take a look this week, thank you ! |
@Skeen Thanks for this PR. @cyriltovena I think we should also include publishing the fluentd gem to gem repository in this PR and also we can move both |
@adityacs as for publishing the Flutentd gem, I'm alfraid that I won't be able to help with that. I don't have any experience with Ruby. Also, do we want to move them right away, or would we rather do it using two PRs:
I'd personally argue for two seperate PRs, mainly to keep changes simple and traceable. |
It's ok for the gem, I can take over. Yeah @adityacs this is a good idea, but let's send another PR for it. |
@cyriltovena Sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if the default conf we are providing in the container is a good one.
Good job on the PR. I'm happy to merge it as is although I'd like to see what you think could be a better default config for fluentd.
Alternatively we can update the doc in https://github.com/grafana/loki/tree/master/docs/clients/fluentd#docker-image it's a bit out of date and could use a configuration example.
No idea why but on the second run of make fluentd-image
I'm getting
bundle install --gemfile=cmd/fluentd/Gemfile --path=cmd/fluentd/vendor/bundle
You must use Bundler 2 or greater with this lockfile.
make: *** [Makefile:425: fluentd-plugin] Error 20
The command '/bin/sh -c make BUILD_IN_CONTAINER=false fluentd-plugin' returned a non-zero code: 2
make: *** [fluentd-image] Error 2
PS: would be nice to update the image in the doc too.
Co-authored-by: Cyril Tovena <cyril.tovena@gmail.com>
Co-authored-by: Cyril Tovena <cyril.tovena@gmail.com>
Providing default configuration files are a difficult task as usage patterns are so diverse.
If it was purely up to me, i think I'd just go with the default configuration that ships with FluentD, appended with the The argument for this approach would be, that we do not in fact take a stand with regards to the default configuration, but rather outsource this decision to upstream, and as such, if people are displased with the default configuration, it is not our issue, but rather an issue for them to take with upstream. The default configuration for upstream looks like this (as of
Assuming we switched to using upstreams default configuration file, we may also be able to refer people to upstreams documentation, and purely document the However changing the default configuration file in general (which is already done in this PR, by eliminating the systemd dependency), has the issue of breaking backwards compatability for users running with the default configuration file. I don't know if this is a big issue, but it could be. An alternative solution to breaking backwards compatability, would be to deprecate the old docker registry, and create a new one with this change. - But I don't know how likely it is that users are actually using the default configuration in production environments. |
I'm afraid I have little to no experience with Ruby or it's toolchains, but I imagine a very crude workaround would be to simply remove the lockfile if it exists before trying to |
Could not find a lock file, I'll figure this out.
Nobody is really using that image since it's wasn't pushed first, I'm not worried that you go with the suggestion you have, I like it. |
…ta-aps/loki into feature/docker-image-fluentd-amd64
Codecov Report
@@ Coverage Diff @@
## master #2006 +/- ##
==========================================
- Coverage 63.83% 63.76% -0.07%
==========================================
Files 132 132
Lines 10150 10150
==========================================
- Hits 6479 6472 -7
- Misses 3189 3193 +4
- Partials 482 485 +3
|
@cyriltovena Am I right in assuming, that you do not expect me to make other changes before this is mergeable, or did I miss something? |
cmd/fluentd/docker/conf/loki.conf
Outdated
<match loki.**> | ||
@type loki | ||
url "#{ENV['LOKI_URL']}" | ||
extra_labels {"env":"dev"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe job="fluentd" is a better default ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 244f196
No just have a look at the question I have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If you're up for a bit of documentation improvement that would greatly help again Thank you for this ! |
What this PR does / why we need it:
This PR:
fluentd/fluent-plugin-grafana-loki
tocmd/fluentd
, as to follow the standard for the other integrations.Makefile
, such that the commandsfluentd-plugin
,fluentd-image
,fluentd-push
andfluentd-test
are added, as they are for thefluent-bit
plugin.Which issue(s) this PR fixes:
Fixes #1724.
Special notes for your reviewer:
I have removed the dependency on systemd, as it seems to have only been needed for the specific configuration in
systemd.conf
, assuming a user needs this, they will need to create a derivative image with this as base image.Checklist