apiVersion: v1
kind: ConfigMap
metadata:
  name: trickster-conf
  labels:
    name: trickster-conf
data:
  trickster-conf: |-
    [main]
        # instance_id allows you to run multiple trickster processes on the same host and log to separate files
        # Useful for baremetal, not so much for elastic deployments, so only uncomment if you really need it
        #instance_id = 1
    # Configuration options for the Proxy Server
    [proxy_server]
        # listen_port defines the port on which Trickster's Proxy server listens.
        # since this is a proxy for Prometheus, we use 9090 by default, just like Prometheus does
        listen_port = 9090
    [cache]
        # cache_type defines what kind of cache Trickster uses
        # options are 'boltdb, 'filesystem', 'memory', and 'redis'.  'memory' is the default
        cache_type = 'memory'
        # record_ttl_secs defines the relative expiration of cached queries. default is 6 hours (21600 seconds)
        record_ttl_secs = 21600
            # Configuration options when using a Redis Cache
            # [cache.redis]
            # protocol defines the protocol for connecting to redis ('unix' or 'tcp') 'tcp' is default
            # protocol = 'tcp'
            # endpoint defines the fqdn+port or path to a unix socket file for connecting to redis
            # default is 'redis:6379'
            # endpoint = 'trickster-redis.${namespace}.svc.cluster.local:6379'

    # Configuration options for mapping Origin(s)
    [origins]
        # The default origin
        [origins.default]
            # origin_url defines the URL of the origin. Default is http://prometheus:9090
            origin_url = ${PROMETHEUS_SVC_URL}
            # api path defines the path of the Prometheus API (usually '/api/v1')
            api_path = '/api/v1'
            # default_step defines the step (in seconds) of a query_range request if one is
            # not provided by the client. This helps to correct improperly formed client requests.
            default_step = 300
            # max_value_age_secs defines the maximum age of specific datapoints in seconds. Default is 86400 (24 hours)
            max_value_age_secs = 86400


    # Configuration Options for Metrics Instrumentation
    [metrics]
        # listen_port defines the port that Trickster's metrics server listens on at /metrics
        listen_port = 8082

    # Configuration Options for Logging Instrumentation
    [logging]
        # log_level defines the verbosity of the logger. Possible values are 'debug', 'info', 'warn', 'error'
        # default is info
        log_level = 'info'
