grafana / alloy

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

add support for Extra Manifest Objects #1061

Open nickgrafana opened 3 months ago

nickgrafana commented 3 months ago

PR Description

Adds the ability to provide additional adhoc Kubernetes manifests. One of my use cases was injecting ConfigMaps to be mounted as volumes, this could simplify adding dependencies when deploying Alloy.

For example:

controller:
  volumes:
    extra:
      - name: test-volume
        configMap:
          name: hosts
alloy:
  mounts:
    extra:
      - name: test-volume
        mountPath: /etc/test

extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: hosts
    data:
      conf.ini: |-
        [hosts]
        localhost = 127.0.0.1

Which issue(s) this PR fixes

n/a

Notes to the Reviewer

It seemed reasonable to me to add the property at root level. No changelog No version updated [x] tested locally

PR Checklist

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.