grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.41k stars 205 forks source link

wrong template #1864

Open nepia11 opened 4 weeks ago

nepia11 commented 4 weeks ago

The template may be wrong.

Additional volumes in controller.volumes.extra will result in strange rendering results.

This template: https://github.com/grafana/alloy/blob/62b6fb5f3aeba1cd48e09e9a5d9c01b4b944c801/operations/helm/charts/alloy/templates/containers/_agent.yaml#L82

values

controller:
  volumes:
    extra:
      - name: cluster-config
        configMap:
          name: cluster-config
      - name: sys
        hostPath:
          path: /sys
      - name: proc
        hostPath:
          path: /proc

rendered parts

          volumeMounts:
            - name: config
              mountPath: /etc/alloy
            - name: varlog
              mountPath: /var/log
              readOnly: true
            - name: dockercontainers
              mountPath: /var/lib/docker/containers
              readOnly: true
            -
              mountPath: /cluster-name
              name: cluster-config
              subPath: CLUSTER_NAME
            -
              mountPath: /sys
              name: sys
            -
              mountPath: /proc
              name: proc
nepia11 commented 4 weeks ago

So it's just weird, but the syntax is fine...