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

Helm chart: do not override excluded services unless explicitly set #1454

Open
mariomac opened this issue Dec 13, 2024 · 2 comments · May be fixed by #1473
Open

Helm chart: do not override excluded services unless explicitly set #1454

mariomac opened this issue Dec 13, 2024 · 2 comments · May be fixed by #1473

Comments

@mariomac
Copy link
Contributor

Our default configuration in the helm chart includes:

      exclude_services:
        - exe_path: ".*alloy.*|.*otelcol.*|.*beyla.*"

But if a user overrides the discovery section, the exclude_services section won't be included and they would starting be charged by "meta-instrumentation".

We should rework the configuration helm template to keep these values unless the user explicitly indicate to want "meta-instrumentation".

@marevers
Copy link
Contributor

marevers commented Dec 17, 2024

I had a look at this, but with how the ConfigMap is currently built it is quite difficult to do.

    {{- if eq .Values.preset "network" }}
    {{- if not .Values.config.data.network }}
    network:
      enable: true
    {{- end }}
    {{- end }}
    {{- if eq .Values.preset "application" }}
    {{- if not .Values.config.data.discovery }}
    discovery:
      services:
        - k8s_namespace: .
      exclude_services:
        - exe_path: ".*alloy.*|.*otelcol.*|.*beyla.*"
    {{- end }}
    {{- end }}
  {{- toYaml .Values.config.data | nindent 4}}
{{- end }}

The {{- if not .Values.config.data.discovery }} is the cause, but removing this entirely makes two discovery properties to appear in the resulting ConfigMap.

It might be possible to do this cleanly (without introducing breaking changes) by using the merge templating function.

@marevers
Copy link
Contributor

@mariomac I've created a PR with a 'fix' but I am honestly not entirely happy with it. Looking forward to your comments.

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 a pull request may close this issue.

2 participants