fix(endpoints): check environment type before start metrics detection EE-4944 (#8391)

pull/8255/head
matias-portainer 2 years ago committed by GitHub
parent 851a3346a9
commit cfdb9c126f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,7 +53,7 @@ func (handler *Handler) endpointInspect(w http.ResponseWriter, r *http.Request)
}
isServerMetricsDetected := endpoint.Kubernetes.Flags.IsServerMetricsDetected
if !isServerMetricsDetected && handler.K8sClientFactory != nil {
if endpointutils.IsKubernetesEndpoint(endpoint) && !isServerMetricsDetected && handler.K8sClientFactory != nil {
endpointutils.InitialMetricsDetection(
endpoint,
handler.DataStore.Endpoint(),

Loading…
Cancel
Save