@@ -42,11 +42,9 @@ def __init__(self, name, init_config, agentConfig, instances=None):
42
42
super (KubernetesState , self ).__init__ (name , init_config , agentConfig , instances = generic_instances )
43
43
44
44
self .send_pod_phase_service_checks = is_affirmative (instance .get ('send_pod_phase_service_checks' , True ))
45
- self ._deprecations ['send_pod_phase_service_checks' ] = [
46
- False ,
47
- "DEPRECATION NOTICE: pod phase service checks are deprecated. Please set "
48
- "`send_pod_phase_service_checks` to false and rely on corresponding gauges instead" ,
49
- ]
45
+ if self .send_pod_phase_service_checks :
46
+ self .warning ("DEPRECATION NOTICE: pod phase service checks are deprecated. Please set "
47
+ "`send_pod_phase_service_checks` to false and rely on corresponding gauges instead" )
50
48
51
49
self .pod_phase_to_status = {
52
50
'Pending' : self .WARNING ,
@@ -400,7 +398,6 @@ def kube_pod_status_phase(self, metric, scraper_config):
400
398
if self .send_pod_phase_service_checks :
401
399
pod_tag = self ._label_to_tag ('pod' , sample [self .SAMPLE_LABELS ], scraper_config )
402
400
namespace_tag = self ._label_to_tag ('namespace' , sample [self .SAMPLE_LABELS ], scraper_config )
403
- self ._log_deprecation ('send_pod_phase_service_checks' )
404
401
self ._condition_to_tag_check (sample , check_basename , self .pod_phase_to_status , scraper_config ,
405
402
tags = [pod_tag , namespace_tag ] + scraper_config ['custom_tags' ])
406
403
0 commit comments