From 60359b695c47521a0232b68ee036ef72db08ec33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Marques?= Date: Thu, 27 Jun 2024 10:46:58 +0000 Subject: [PATCH] fix: allow for receiver service name override --- charts/k8s-monitoring/templates/_helpers.tpl | 8 ++++---- .../templates/grafana-agent-receiver-service.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/k8s-monitoring/templates/_helpers.tpl b/charts/k8s-monitoring/templates/_helpers.tpl index e795785d9..1cefa54a1 100644 --- a/charts/k8s-monitoring/templates/_helpers.tpl +++ b/charts/k8s-monitoring/templates/_helpers.tpl @@ -96,11 +96,11 @@ {{ . | replace "-" "_" | replace "." "_" | replace "/" "_" }} {{- end }} -{{- define "grafana-agent.fullname" -}} -{{- if (index .Values "grafana-agent").fullnameOverride }} -{{- (index .Values "grafana-agent").fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- define "alloy.fullname" -}} +{{- if (index .Values "alloy").fullnameOverride }} +{{- (index .Values "alloy").fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default "grafana-agent" (index .Values "grafana-agent").nameOverride }} +{{- $name := default "alloy" (index .Values "alloy").nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} diff --git a/charts/k8s-monitoring/templates/grafana-agent-receiver-service.yaml b/charts/k8s-monitoring/templates/grafana-agent-receiver-service.yaml index c6a446087..84be3cb50 100644 --- a/charts/k8s-monitoring/templates/grafana-agent-receiver-service.yaml +++ b/charts/k8s-monitoring/templates/grafana-agent-receiver-service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "grafana-agent.fullname" . }} + name: {{ include "alloy.fullname" . }} labels: {{- include "alloy.labels" .Subcharts.alloy | nindent 4 }} {{- with .Values.alloy.service.annotations }}