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

Allow service.enabled=false for deployment #811

Closed
devurandom opened this issue Jun 13, 2023 · 0 comments · Fixed by #843
Closed

Allow service.enabled=false for deployment #811

devurandom opened this issue Jun 13, 2023 · 0 comments · Fixed by #843
Labels
chart:collector Issue related to opentelemetry-collector helm chart

Comments

@devurandom
Copy link

Currently the service is always enabled unless we deploy in "daemonset" mode:

{{/*
Compute Service creation on mode
*/}}
{{- define "opentelemetry-collector.serviceEnabled" }}
{{- $serviceEnabled := true -}}
{{- if and (eq .Values.mode "daemonset") (not .Values.service.enabled) }}
{{- $serviceEnabled = false -}}
{{- end }}
{{- print $serviceEnabled }}
{{- end -}}

I deploy a OpenTelemetry collector just for scraping Kubernetes cluster data:

presets:
  clusterMetrics:
    enabled: true
  kubernetesAttributes:
    enabled: true
  kubernetesEvents:
    enabled: true

I have all receivers disabled:

config:
  receivers:
    otlp: null
    jaeger: null
    zipkin: null

As far as I can tell, no ports need to be exposed in this setup. It would be nice if service.enabled=false would also disable the service object in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:collector Issue related to opentelemetry-collector helm chart
Projects
None yet
2 participants