Skip to content

Commit

Permalink
fix state update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Sumkin committed Oct 22, 2023
1 parent cb34742 commit 0f5251a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions connectors/kubernetes-connector/kubernetesConnector.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ func (connector *KubernetesConnector) collectNodeMetrics(state *MonitoredState)
}
if monitoredService != nil {
resource.Services[metricBuilder.Name] = *monitoredService
state.State[stateKey] = resource
}
}
state.State[stateKey] = resource
} else if _, ok = state.Mismatched[stateKey]; !ok {
log.Warn().Msgf("node not found in monitored state: %v", stateKey)
}
Expand Down Expand Up @@ -647,10 +647,10 @@ func (connector *KubernetesConnector) collectPodMetricsPerReplica(state *Monitor
}
if monitoredService != nil {
resource.Services[metricBuilder.Name] = *monitoredService
state.State[stateKey] = resource
}
}
}
state.State[stateKey] = resource
} else if _, ok = state.Mismatched[stateKey]; !ok {
log.Warn().Msgf("pod not found in monitored state: %v", stateKey)
}
Expand Down Expand Up @@ -733,8 +733,8 @@ func (connector *KubernetesConnector) collectPodMetricsPerContainer(state *Monit
}
if monitoredService != nil {
resource.Services[metricDefinition.Name] = *monitoredService
state.State[stateKey] = resource
}
state.State[stateKey] = resource
} else if _, ok = state.Mismatched[stateKey]; !ok {
log.Debug().Msgf("pod container not found in monitored state: %v", stateKey)
debugDetails = true
Expand Down

0 comments on commit 0f5251a

Please sign in to comment.