open-telemetry / opentelemetry-helm-charts

OpenTelemetry Helm Charts
https://opentelemetry.io
Apache License 2.0
385 stars 463 forks source link

[collector] Changes inside subchart not impact on output #752

Open artem-zherdiev-ingio opened 1 year ago

artem-zherdiev-ingio commented 1 year ago

Hello, it seems like subchart doesn't work as expected.

When I am trying change values in opentelemetry-collector chart all goes smooth, but in subchart it simple not change things. Could you help with understanding if I do something wrong? Thanks

values.yaml:

mode: "daemonset"

... default values ... 

# Base collector configuration.
# Supports templating. To escape existing instances of {{ }}, use {{` <original content> `}}.
# For example, {{ REDACTED_EMAIL }} becomes {{` {{ REDACTED_EMAIL }} `}}.
config:
  exporters:
    logging: {}
  extensions:
    # The health_check extension is mandatory for this chart.
    # Without the health_check extension the collector will fail the readiness and liveliness probes.
    # The health_check extension can be modified, but should never be removed.
    health_check: {}
    memory_ballast: {}
  processors:
    batch: {}
    # If set to null, will be overridden with values based on k8s resource limits
    memory_limiter: null
  receivers:
    jaeger: null
      # protocols:
      #   grpc:
      #     endpoint: ${MY_POD_IP}:14250
      #   thrift_http:
      #     endpoint: ${MY_POD_IP}:14268
      #   thrift_compact:
      #     endpoint: ${MY_POD_IP}:6831
    otlp:
      protocols:
        grpc:
          endpoint: ${MY_POD_IP}:4317
        http:
          endpoint: ${MY_POD_IP}:4318
    prometheus: null
      # config:
      #   scrape_configs:
      #     - job_name: opentelemetry-collector
      #       scrape_interval: 10s
      #       static_configs:
      #         - targets:
      #             - ${MY_POD_IP}:8888
    zipkin: null
      # endpoint: ${MY_POD_IP}:9411
  service:
    telemetry: null
      # metrics:
        # address: ${MY_POD_IP}:8888
    extensions:
      - health_check
      - memory_ballast
    pipelines:
      logs: null
        # exporters:
        #   - logging
        # processors:
        #   - memory_limiter
        #   - batch
        # receivers:
        #   - otlp
      metrics: null
        # exporters:
        #   - logging
        # processors:
        #   - memory_limiter
        #   - batch
        # receivers:
        #   - otlp
        #   - prometheus
      traces:
        exporters: null
        processors:
          - memory_limiter
          - batch
        receivers:
          - otlp

output configmap-agent.yaml:

data:
  relay: |
    exporters:
      logging: {}
    extensions:
      health_check: {}
      memory_ballast:
        size_in_percentage: 40
    processors:
      batch: {}
      memory_limiter:
        check_interval: 5s
        limit_percentage: 80
        spike_limit_percentage: 25
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: ${MY_POD_IP}:4317
          http:
            endpoint: ${MY_POD_IP}:4318
    service:
      extensions:
      - health_check
      - memory_ballast
      pipelines:
        traces:
          processors:
          - memory_limiter
          - batch
          receivers:
          - otlp

when I am trying as subchart configmap-agent.yaml output:

data:
  relay: |
    exporters:
      logging: {}
    extensions:
      health_check: {}
      memory_ballast:
        size_in_percentage: 40
    processors:
      batch: {}
      memory_limiter:
        check_interval: 5s
        limit_percentage: 80
        spike_limit_percentage: 25
    receivers:
      jaeger:
        protocols:
          grpc:
            endpoint: ${MY_POD_IP}:14250
          thrift_compact:
            endpoint: ${MY_POD_IP}:6831
          thrift_http:
            endpoint: ${MY_POD_IP}:14268
      otlp:
        protocols:
          grpc:
            endpoint: ${MY_POD_IP}:4317
          http:
            endpoint: ${MY_POD_IP}:4318
      prometheus:
        config:
          scrape_configs:
          - job_name: opentelemetry-collector
            scrape_interval: 10s
            static_configs:
            - targets:
              - ${MY_POD_IP}:8888
      zipkin:
        endpoint: ${MY_POD_IP}:9411
    service:
      extensions:
      - health_check
      - memory_ballast
      pipelines:
        logs:
          exporters:
          - logging
          processors:
          - memory_limiter
          - batch
          receivers:
          - otlp
        metrics:
          exporters:
          - logging
          processors:
          - memory_limiter
          - batch
          receivers:
          - otlp
          - prometheus
        traces:
          exporters:
          - logging
          processors:
          - memory_limiter
          - batch
          receivers:
          - otlp
      telemetry:
        metrics:
          address: ${MY_POD_IP}:8888
TylerHelmuth commented 1 year ago

There is a known helm issue where null does not properly remove defaults when the chart is being used as a subchart: https://github.com/helm/helm/pull/11440