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

fix: allow for receiver service name override #600

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdcmarques
Copy link

Description

We want to be able to pick the name of the receiver service, but after the migration to alloy whenever we pass in
.Values.grafana-agent.fullnameOverride we get the following error

Error: execution error at (grafana-chart/charts/k8s-monitoring/templates/kubernetes-monitoring-telemetry.yaml:1:3): 

As of k8s-monitoring Chart version 1.0, Grafana Agent has been replaced with Grafana Alloy.
These sections in your values file will need to be renamed:
  grafana-agent          --> alloy
  grafana-agent-events   --> alloy-events
  grafana-agent-logs     --> alloy-logs
  grafana-agent-profiles --> alloy-profiles
  metrics.agent          --> metrics.alloy

For more information, see https://github.com/grafana/k8s-monitoring-helm/tree/main/charts/k8s-monitoring#breaking-change-announcements

Use --debug flag to render out invalid YAML

@CLAassistant
Copy link

CLAassistant commented Jun 27, 2024

CLA assistant check
All committers have signed the CLA.

@petewall
Copy link
Collaborator

Yeah, I agree that this is a problem, but changing this to use alloy will not really solve it.

When we released version 1.0, we moved from Grafana Agent to Alloy and added that deprecation warning. I then added a service that deploys using the existing Grafana Agent naming, with the idea that if you had applications configured to send data via OTLP to the agent, it wouldn't break those applications. It makes a duplicated service.

If you really want to pick the name of the service, you have a few options:

  1. Use alloy.fullnameOverride to rename Alloy itself. The associated service will be renamed.
  2. Use the extraObjects to deploy a service that points to Alloy.

@jdcmarques
Copy link
Author

Thanks for clearing that up!

I will double-check why the alloy service is not getting created when deploying with ArgoCD https://github.com/grafana/alloy/blob/main/operations/helm/charts/alloy/templates/service.yaml as that would allow for this to work by default. This is most likely due to having deployGrafanaAgentService as true by default

Can update this to look for a .Values.receivers.grafanaAgentService: object with fullNameOverride or nameOverride, would be right next to the value deployGrafanaAgentService that enables this.

@petewall petewall added this to the 2.0 milestone Sep 11, 2024
@petewall petewall self-requested a review as a code owner October 4, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants