From 7e316c5997ba32301bf6eda2bac9ccb3569d1cf7 Mon Sep 17 00:00:00 2001 From: Maisie Wang Date: Wed, 17 Jul 2019 17:23:23 -0700 Subject: [PATCH] Initialize @pods_to_services before timer_execute --- .../lib/sumologic/kubernetes/service_monitor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/fluent-plugin-enhance-k8s-metadata/lib/sumologic/kubernetes/service_monitor.rb b/fluent-plugin-enhance-k8s-metadata/lib/sumologic/kubernetes/service_monitor.rb index 4c8246c12c..6273f9fc8f 100644 --- a/fluent-plugin-enhance-k8s-metadata/lib/sumologic/kubernetes/service_monitor.rb +++ b/fluent-plugin-enhance-k8s-metadata/lib/sumologic/kubernetes/service_monitor.rb @@ -14,6 +14,7 @@ def start_service_monitor @last_recreated = Time.now.to_i log.debug "last_recreated initialized to #{@last_recreated}" + @pods_to_services = Concurrent::Map.new {|h, k| h[k] = []} timer_execute(:service_monitor, 10, &method(:run_monitor)) end