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

feat: Add writer addr to loki canary #14291

Closed
wants to merge 3 commits into from

Conversation

yongzhang
Copy link

@yongzhang yongzhang commented Sep 27, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes:
Currently loki canary supports only one endpoint, when using it with a loki distributed cluster and push mode is enabled, there's no way to query/send logs by single endpoint.

This PR added a new flag write-addr to allow users define dedicated write endpoint to support above use case, by default, this write addr use the same value as addr.

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@yongzhang yongzhang requested a review from a team as a code owner September 27, 2024 07:04
@CLAassistant
Copy link

CLAassistant commented Sep 27, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Sep 27, 2024
@yongzhang yongzhang changed the title [Loki canary] Add writer addr feat: Add writer addr to loki canary Sep 27, 2024
@trevorwhitney
Copy link
Collaborator

Can you describe your use case a little more? We usually recommend running Loki behind a gateway to have a single address for both reads and writes. Is there a reason this topology doesn't work for you?

@yongzhang
Copy link
Author

Can you describe your use case a little more? We usually recommend running Loki behind a gateway to have a single address for both reads and writes. Is there a reason this topology doesn't work for you?

Seems like loki gateway is only introduced in Kubernetes deployment, I can't find any docs on it. If this is an optional component, probably it makes sense to allow push mode work with dedicated read/write endpoints without gateway?

@trevorwhitney
Copy link
Collaborator

@yongzhang yes, k8s is our most common deployment, but for OSS deployments we're just using an nginx reverse proxy in front of the cluster. You could borrow the nginx file from our helm chart and set something similar up for however you're deploying.

There are already so many config in Promtail/Loki/etc., I'd love to avoid another flag if possible 😄 , wdyt?

@yongzhang
Copy link
Author

@yongzhang yes, k8s is our most common deployment, but for OSS deployments we're just using an nginx reverse proxy in front of the cluster. You could borrow the nginx file from our helm chart and set something similar up for however you're deploying.

There are already so many config in Promtail/Loki/etc., I'd love to avoid another flag if possible 😄 , wdyt?

ok I can try, thanks.

@yongzhang yongzhang closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants