Merge "Fix alerts when stack names contain '-'"
diff --git a/docker/meta/prometheus.yml b/docker/meta/prometheus.yml
index 14a6f1a..d5fed29 100644
--- a/docker/meta/prometheus.yml
+++ b/docker/meta/prometheus.yml
@@ -20,7 +20,7 @@
{%- for service_name, service in stack.get('service', {})|dictsort %}
{%- if service.get('deploy', {}).replicas is defined %}
{%- set full_service_name = "{}_{}".format(stack_name, service_name) %}
- {%- set camel_case_name = full_service_name.split('_')|map('capitalize')|join('') %}
+ {%- set camel_case_name = full_service_name.split('_')|map('capitalize')|join('')|replace('-', '') %}
{%- set label_selector = 'com_docker_swarm_service_name="{}_{}"'.format(stack_name, service_name) %}
{%- if service.deploy.replicas > 1 %}
DockerService{{ camel_case_name }}InvalidReplicasNumber: