Skip to content

Instantly share code, notes, and snippets.

@burnsie7
Created August 6, 2019 20:57
Show Gist options
  • Save burnsie7/b7a122ab70c1cc722e23633dbc4fc55d to your computer and use it in GitHub Desktop.
Save burnsie7/b7a122ab70c1cc722e23633dbc4fc55d to your computer and use it in GitHub Desktop.
Custom AD names w/ Config Map Example

Example config map for redis where the redis image name is customized as redis-test or redis-stage:

---
kind: ConfigMap
apiVersion: v1
metadata:
  name: redis-config
  namespace: default
data:
  redis_ad: |-
    ad_identifiers:
      - redis-test
      - redis-stage
    init_config:
    instances:
    - host: "%%host%%"
      port: "6379"
    logs:
      source: redis
      service: redis

volumeMounts for the agent manifest:

        [...]
        volumeMounts:
          - name: redis-config
            mountPath: /conf.d/redisdb.d
        [...]
        volumes:
        [...]
          - name: redis-config
            configMap:
              name: redis-config
              items:
              - key: redis_ad
                path: conf.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment