-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Promtail to alloy migration #11945
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
base: main
Are you sure you want to change the base?
🌱 Promtail to alloy migration #11945
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @irapandey. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hey @chrischdi I have opened this PR for promtail/alloy migration Thanks 😄 |
/ok-to-test /area devtools Can you also check grafana if you're able to query logs? |
@@ -1,5 +1,3 @@ | |||
# Configuration for promtail chart, see https://github.com/grafana/helm-charts/tree/main/charts/promtail |
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.
Can we add the right link for alloy?
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.
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.
❯ helm show chart grafana/alloy
apiVersion: v2
appVersion: v1.7.2
dependencies:
- condition: crds.create
name: crds
repository: ""
version: 0.0.0
description: Grafana Alloy
icon: https://raw.githubusercontent.com/grafana/alloy/main/docs/sources/assets/alloy_icon_orange.svg
name: alloy
type: application
version: 0.12.3
@@ -1,5 +1,3 @@ | |||
# Configuration for promtail chart, see https://github.com/grafana/helm-charts/tree/main/charts/promtail | |||
|
|||
config: |
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.
Pretty sure we have to change things here as its a different helm chart.
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 couldn't find dedicated charts for alloy like for promtail - https://grafana.com/docs/alloy/latest/set-up/install/kubernetes/
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.
helm show values grafana/alloy
does not even have a config
field.
So all configuration below would be not used (and we want them to work).
So I'm curious if this even shows us logs.
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.
This page maybe helps: https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/
Note: the values.yaml
is not the promtail configuration.
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.
You should get the promtail.yaml via: kustomize build --enable-helm --load-restrictor LoadRestrictionsNone hack/observability/promtail | grep stringData -A 38 | yq '.stringData[]' > promtail.yaml
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.
Let me take a look and get back - I kinda had the same feeling but needed some input
Thanks 😄
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.
Apologies for being MIA
I believe since Alloy used .alloy
files to run - we simply add the converted promtail config to ./alloy
dir and run alloy using this file
I commiting the file so you can review
Co-authored-by: Christian Schlotter <[email protected]>
@@ -1,5 +1,4 @@ | |||
# Configuration for promtail chart, see https://github.com/grafana/helm-charts/tree/main/charts/promtail | |||
|
|||
# Configuration for alloy - https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml | |||
config: |
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 think we need to replace the file with this content:
# Configuration for alloy - https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml
alloy:
configMap:
create: true
name: alloy-config
key: config.alloy
mounts:
varlog: true
namespace: observability | ||
valuesFile: values.yaml | ||
version: 6.16.6 | ||
version: 0.12.3 | ||
|
||
helmGlobals: | ||
# Store chart in ".charts" folder instead of "charts". |
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.
We need to add the following at the end to create the configmap which contaings the data of config.alloy:
namespace: observability
configMapGenerator:
- name: alloy-config
files:
- config.alloy
Let's have these two changes, then please check in grafana if we get logs. After that works we can start to verify that the new config has the same effect as the previous promtail config. |
What this PR does / why we need it:
This PR is to migrate from promtail to alloy
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
#11881