diff --git a/IM/connectors/Kubernetes.py b/IM/connectors/Kubernetes.py index 95c88cf4..8e9c7822 100644 --- a/IM/connectors/Kubernetes.py +++ b/IM/connectors/Kubernetes.py @@ -18,6 +18,7 @@ import json import requests import time +import re from netaddr import IPNetwork, IPAddress try: from urlparse import urlparse @@ -312,7 +313,7 @@ def _generate_pod_data(self, namespace, name, outports, system, volumes, tags): # Add instance tags if tags: for k, v in tags.items(): - pod_data['metadata']['labels'][k] = v + pod_data['metadata']['labels'][k] = re.sub('[!"#$%&\'()*+,/:;<=>?@[\\]^`{|}~]', '', v) containers = [{ 'name': name,