cluster-api icon indicating copy to clipboard operation
cluster-api copied to clipboard

🌱 Promtail to alloy migration

Open irapandey opened this issue 8 months ago • 13 comments

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 # https://github.com/kubernetes-sigs/cluster-api/issues/11881

irapandey avatar Mar 10 '25 09:03 irapandey

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

k8s-ci-robot avatar Mar 10 '25 09:03 k8s-ci-robot

Screenshot 2025-03-10 at 3 09 48 PM

irapandey avatar Mar 10 '25 09:03 irapandey

Hey @chrischdi

I have opened this PR for promtail/alloy migration Please take a look here.

Thanks 😄

irapandey avatar Mar 10 '25 11:03 irapandey

/ok-to-test

/area devtools

Can you also check grafana if you're able to query logs?

chrischdi avatar Mar 13 '25 14:03 chrischdi

I ran tilt-up and accessed grafana.

I'm not able to see any logs so looks like alloy does not work in that configuration which is currently on the PR.

image

chrischdi avatar Apr 15 '25 09:04 chrischdi

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.

chrischdi avatar Apr 15 '25 09:04 chrischdi

Screenshot 2025-04-27 at 1 02 47 AM

irapandey avatar Apr 26 '25 19:04 irapandey

Hey @chrischdi

I made those changes and didn't see any logs - Added a configmap separately and got logs

I tried creating it from the ./alloy/values.yaml but it didn't see to create what we were expecting

Hope this works

Thanks

irapandey avatar Apr 27 '25 08:04 irapandey

Hey @chrischdi

I made those changes and didn't see any logs - Added a configmap separately and got logs

I tried creating it from the ./alloy/values.yaml but it didn't see to create what we were expecting

Hope this works

Thanks

Let's try this again, this should normally work :-) Let me know if you need help on it.

chrischdi avatar May 09 '25 14:05 chrischdi

Sure - now that I know where the problem was - this will be a easier fix

irapandey avatar May 14 '25 10:05 irapandey

Hey @chrischdi - I might be missing something here for sure

I have been referring to this file for values.yaml that are used by the alloy helm chart - https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/values.yaml

## Various Alloy settings. For backwards compatibility with the grafana-agent
## chart, this field may also be called "agent". Naming this field "agent" is
## deprecated and will be removed in a future release.
alloy:
  configMap:
    # -- Create a new ConfigMap for the config file.
    create: true
    # -- Content to assign to the new ConfigMap.  This is passed into `tpl` allowing for templating from values.
    content: ''

    # -- Name of existing ConfigMap to use. Used when create is false.
    name: null
    # -- Key in ConfigMap to get config from.
    key: null

Looking at this above - I have been trying to generate a configmap with the name alloy-config, based on the comments in the code above

qq - do we want to use alloy.config to generate the configmap or adding alloy.config.content would suffice

Screenshot 2025-05-20 at 6 56 38 PM

irapandey avatar May 20 '25 13:05 irapandey

Hey @chrischdi - waiting on input from you here Please take a look when you get some time Thanks 😃

irapandey avatar Jun 11 '25 18:06 irapandey

I'll take a look the next few days & after lgtm from Christian

sbueringer avatar Jul 31 '25 15:07 sbueringer

/lgtm

chrischdi avatar Aug 04 '25 08:08 chrischdi

LGTM label has been added.

Git tree hash: a788ebd72894ba4d4ab3c33dd63a986d815d9952

k8s-ci-robot avatar Aug 04 '25 08:08 k8s-ci-robot

Played around with it locally, looks good to me!

Thx both of you!

/lgtm /approve

sbueringer avatar Aug 07 '25 14:08 sbueringer

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Aug 07 '25 14:08 k8s-ci-robot