Skip to content

helm: Replace internal agent with Grafana Agent #2304

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

Merged
merged 22 commits into from
Aug 25, 2023

Conversation

cyriltovena
Copy link
Contributor

@cyriltovena cyriltovena commented Aug 24, 2023

This replace the old agent module with Grafana Agent (as a subchart) in helm.

I decided to keep the agent on by default as it was before. I suspect this whole logic might be better in the agent helm chart.

I still needs to verify if the documentation needs edit.

@cyriltovena cyriltovena marked this pull request as ready for review August 25, 2023 11:36
@cyriltovena cyriltovena requested review from korniltsev and a team as code owners August 25, 2023 11:36
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

{{- range $profileTypes }}

discovery.relabel "kubernetes_pods_{{.}}_default_name" {
targets = concat(discovery.relabel.kubernetes_pods.output)
Copy link
Contributor

@simonswine simonswine Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth leaving a comment why those need to be tabs, vs. the ones in lines 36-65 which are spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is because of the river linter.

{{- if hasKey .Values.pyroscope.components "query-frontend" }}
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "pyroscope.fullname" . }}-query-frontend {{ .Values.pyroscope.service.port }}:{{ .Values.pyroscope.service.port }}
http://{{ include "pyroscope.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc.cluster.local.:{{ .Values.pyroscope.service.port }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This port is wrong when you override the port only for that one component.

You would need to do the default thing here, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah not easy with the dash. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{ $port := ((index .Values.pyroscope.components "query-frontend").service).port | default .Values.pyroscope.service.port }}

did the trick :mindblowing:

@cyriltovena cyriltovena enabled auto-merge (squash) August 25, 2023 21:17
@cyriltovena cyriltovena merged commit 4d90dcc into next Aug 25, 2023
@cyriltovena cyriltovena deleted the feat/helm-grafana-agent branch August 25, 2023 21:28
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.

2 participants