Skip to content

Commit

Permalink
rename config variables
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello committed Aug 10, 2017
1 parent 343e8d8 commit 3f99823
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions utils/service_discovery/abstract_config_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ def get_checks_to_refresh(self, identifier, **kwargs):

# then from docker labels
if docker_labels:
kube_config = self._get_docker_config(identifier, docker_labels)
if kube_config is not None:
to_check.update(kube_config[0])
docker_config = self._get_docker_config(identifier, docker_labels)
if docker_config is not None:
to_check.update(docker_config[0])
# lastly, try with legacy name for auto-conf
to_check.update(self.template_cache.get_check_names(self._get_image_ident(identifier)))

Expand All @@ -300,16 +300,16 @@ def get_check_tpls(self, identifier, **kwargs):
docker_labels = kwargs.get(DOCKER_LABELS)
source = ""

kube_config = None
config = None
if kube_annotations:
kube_config = self._get_kube_config(identifier, kube_annotations, kube_container_name)
config = self._get_kube_config(identifier, kube_annotations, kube_container_name)
source = CONFIG_FROM_KUBE
if kube_config is None and docker_labels is not None:
kube_config = self._get_docker_config(identifier, docker_labels)
if config is None and docker_labels is not None:
config = self._get_docker_config(identifier, docker_labels)
source = CONFIG_FROM_LABELS

if kube_config is not None:
check_names, init_config_tpls, instance_tpls = kube_config
if config is not None:
check_names, init_config_tpls, instance_tpls = config
return [(source, vs)
for vs in zip(check_names, init_config_tpls, instance_tpls)]

Expand Down

0 comments on commit 3f99823

Please sign in to comment.