Tyk pump configuration file combined with env variable

Hi,

I have the following tyk pump configuration with tyk ce. We are deploying the solution in kubernetes and using config map for the conf file. I am wondering if it’s possible to make use of environment variable within the config file like below.

{
    "analytics_storage_type": "redis",
    "analytics_storage_config": {
        "type": "redis",
        "host": "url",
        "port": 6379,
        "username": "",
        "password": "${REDIS_PASSWORD}",
        "database": 0,
        "optimisation_max_idle": 100,
        "optimisation_max_active": 0,
        "enable_cluster": false,
        "redis_use_ssl": false,
        "redis_ssl_insecure_skip_verify": false
    },
    "purge_delay": 5,
    "pumps": {
        "elasticsearch": {
            "type": "elasticsearch",
            "meta": {
                "index_name": "tyk_analytics",
                "elasticsearch_url": "",
                "enable_sniffing": false,
                "auth_basic_username": "${ELASTIC_USERNAME}",
                "auth_basic_password": "${ELASTIC_PASSWORD}",
                "document_type": "tyk_analytics",
                "rolling_index": true,
                "extended_stats": true,
                "version": "7",
                "bulk_config": {
                    "workers": 2,
                    "flush_interval": 60
                }
            }
        }
    },
    "dont_purge_uptime_data": true
}
}

Thanks,

Rudy

Hello @rudytreasure, we recommend you to use the environment variables to configure pump rather than directly editing the configMap. Please have a look at the Environment Variable for pump to know the format of using the env vars for pumps.