@@ -65,6 +65,7 @@ public void eventReceived(Action action, Pod resource) {
65
65
// If we're not watching all namespaces or the event is from a namespace we're not watching, do nothing
66
66
return ;
67
67
}
68
+ LOG .info ("WATCHING NAMESPACE" );
68
69
69
70
if (resource .getMetadata ().getLabels ().containsKey (config .pod ().identifier ())) {
70
71
// Get/Create metric
@@ -74,6 +75,7 @@ public void eventReceived(Action action, Pod resource) {
74
75
switch (action ) {
75
76
case ADDED :
76
77
if (includePod (config , resource .getMetadata ().getLabels (), spec )) {
78
+ LOG .info ("CREATING METRIC, POD INCLUDED" );
77
79
if (podGroup == null ) {
78
80
podGroup = new PodGroup ();
79
81
podGroup .addPod (resource .getMetadata ().getName (), resource .getMetadata ().getNamespace ());
@@ -91,6 +93,7 @@ public void eventReceived(Action action, Pod resource) {
91
93
break ;
92
94
case DELETED :
93
95
if (podGroup != null ) {
96
+ LOG .info ("POD DELETE EVENT. REMOVING" );
94
97
podGroup .removePod (resource .getMetadata ().getName ());
95
98
96
99
if (podGroup .list ().size () == 0 ) {
@@ -252,6 +255,7 @@ public double applyAsDouble(PodGroup value) {
252
255
}
253
256
} catch (KubernetesClientException kce ) {
254
257
// Ignore, as it likely means a pod is "ready", but no metrics available yet
258
+ LOG .info ("EXCEPTION RETRIEVING METRICS" , kce );
255
259
}
256
260
} else {
257
261
// Ignore, as the pod is not "ready"
0 commit comments