Skip to content

Commit

Permalink
Fix deprecation warning on A5 (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfpierre authored and ofek committed Sep 28, 2018
1 parent f3377bd commit b0fe095
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ def __init__(self, name, init_config, agentConfig, instances=None):
super(KubernetesState, self).__init__(name, init_config, agentConfig, instances=generic_instances)

self.send_pod_phase_service_checks = is_affirmative(instance.get('send_pod_phase_service_checks', True))
self._deprecations['send_pod_phase_service_checks'] = [
False,
"DEPRECATION NOTICE: pod phase service checks are deprecated. Please set "
"`send_pod_phase_service_checks` to false and rely on corresponding gauges instead",
]
if self.send_pod_phase_service_checks:
self.warning("DEPRECATION NOTICE: pod phase service checks are deprecated. Please set "
"`send_pod_phase_service_checks` to false and rely on corresponding gauges instead")

self.pod_phase_to_status = {
'Pending': self.WARNING,
Expand Down Expand Up @@ -400,7 +398,6 @@ def kube_pod_status_phase(self, metric, scraper_config):
if self.send_pod_phase_service_checks:
pod_tag = self._label_to_tag('pod', sample[self.SAMPLE_LABELS], scraper_config)
namespace_tag = self._label_to_tag('namespace', sample[self.SAMPLE_LABELS], scraper_config)
self._log_deprecation('send_pod_phase_service_checks')
self._condition_to_tag_check(sample, check_basename, self.pod_phase_to_status, scraper_config,
tags=[pod_tag, namespace_tag] + scraper_config['custom_tags'])

Expand Down

0 comments on commit b0fe095

Please sign in to comment.