Fix env vars for sf-notifer and gainsight
- paste env var as is
- fixes quoting issues with passwords
- single-quoting all string vars
Change-Id: Id9ce82718ea27c02a7cc415e0cda174ad5077ebf
Related-bug: PROD-35072
diff --git a/docker/swarm/stack/monitoring/gainsight.yml b/docker/swarm/stack/monitoring/gainsight.yml
index 4cd45f7..472b047 100644
--- a/docker/swarm/stack/monitoring/gainsight.yml
+++ b/docker/swarm/stack/monitoring/gainsight.yml
@@ -2,10 +2,10 @@
- system.prometheus.gainsight.container
parameters:
_param:
- gainsight_cluster_id: '${_param:cluster_domain}'
+ gainsight_cluster_id: "${_param:cluster_domain}"
gainsight_prometheus_url: "http://${_param:stacklight_monitor_address}:15010"
- gainsight_config_directory: '/srv/gainsight'
- gainsight_crontab_directory: '/etc/cron.d'
+ gainsight_config_directory: "/srv/gainsight"
+ gainsight_crontab_directory: "/etc/cron.d"
gainsight_config_path: "${_param:gainsight_config_directory}/config.ini"
gainsight_sfdc_auth_url: "${_param:sf_notifier_sfdc_auth_url}"
gainsight_sfdc_username: "${_param:sf_notifier_sfdc_username}"
@@ -39,12 +39,12 @@
- ${prometheus:gainsight:dir:config}:${_param:gainsight_config_directory}
- ${prometheus:gainsight:dir:crontab}:${_param:gainsight_crontab_directory}
environment:
- CLUSTER_ID: "${_param:gainsight_cluster_id}"
- PROMETHEUS_URL: "${_param:gainsight_prometheus_url}"
- CONFIG_PATH: "${_param:gainsight_config_path}"
- SFDC_AUTH_URL: "${_param:gainsight_sfdc_auth_url}"
- SFDC_USERNAME: "${_param:gainsight_sfdc_username}"
- SFDC_PASSWORD: "${_param:gainsight_sfdc_password}"
- SFDC_ORGANIZATION_ID: "${_param:gainsight_sfdc_organization_id}"
- SFDC_ENVIRONMENT_ID: "${_param:gainsight_sfdc_environment_id}"
- SFDC_SANDBOX_ENABLED: "${_param:gainsight_sfdc_sandbox_enabled}"
+ - CLUSTER_ID='${_param:gainsight_cluster_id}'
+ - PROMETHEUS_URL='${_param:gainsight_prometheus_url}'
+ - CONFIG_PATH='${_param:gainsight_config_path}'
+ - SFDC_AUTH_URL='${_param:gainsight_sfdc_auth_url}'
+ - SFDC_USERNAME='${_param:gainsight_sfdc_username}'
+ - SFDC_PASSWORD='${_param:gainsight_sfdc_password}'
+ - SFDC_ORGANIZATION_ID='${_param:gainsight_sfdc_organization_id}'
+ - SFDC_ENVIRONMENT_ID='${_param:gainsight_sfdc_environment_id}'
+ - SFDC_SANDBOX_ENABLED='${_param:gainsight_sfdc_sandbox_enabled}'
diff --git a/docker/swarm/stack/monitoring/sf_notifier.yml b/docker/swarm/stack/monitoring/sf_notifier.yml
index b8b2dd6..a77b457 100644
--- a/docker/swarm/stack/monitoring/sf_notifier.yml
+++ b/docker/swarm/stack/monitoring/sf_notifier.yml
@@ -30,13 +30,13 @@
ports:
- 15018:5000
environment:
- SF_NOTIFIER_WORKERS: ${_param:sf_notifier_workers}
- SF_NOTIFIER_BUFFER_SIZE: ${_param:sf_notifier_buffer_size}
- SF_NOTIFIER_APP_PORT: ${prometheus:sf_notifier:uwsgi:bind_port}
- SF_NOTIFIER_ALERT_ID_HASH_FUNC: ${_param:sf_notifier_alert_id_hash_func}
- SFDC_AUTH_URL: "${_param:sf_notifier_sfdc_auth_url}"
- SFDC_USERNAME: "${_param:sf_notifier_sfdc_username}"
- SFDC_PASSWORD: "${_param:sf_notifier_sfdc_password}"
- SFDC_ORGANIZATION_ID: "${_param:sf_notifier_sfdc_organization_id}"
- SFDC_ENVIRONMENT_ID: "${_param:sf_notifier_sfdc_environment_id}"
- SFDC_SANDBOX_ENABLED: "${_param:sf_notifier_sfdc_sandbox_enabled}"
+ - SF_NOTIFIER_WORKERS=${_param:sf_notifier_workers}
+ - SF_NOTIFIER_BUFFER_SIZE=${_param:sf_notifier_buffer_size}
+ - SF_NOTIFIER_APP_PORT=${prometheus:sf_notifier:uwsgi:bind_port}
+ - SF_NOTIFIER_ALERT_ID_HASH_FUNC='${_param:sf_notifier_alert_id_hash_func}'
+ - SFDC_AUTH_URL='${_param:sf_notifier_sfdc_auth_url}'
+ - SFDC_USERNAME='${_param:sf_notifier_sfdc_username}'
+ - SFDC_PASSWORD='${_param:sf_notifier_sfdc_password}'
+ - SFDC_ORGANIZATION_ID='${_param:sf_notifier_sfdc_organization_id}'
+ - SFDC_ENVIRONMENT_ID='${_param:sf_notifier_sfdc_environment_id}'
+ - SFDC_SANDBOX_ENABLED='${_param:sf_notifier_sfdc_sandbox_enabled}'