1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

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

This commit is contained in:
matias-portainer 2023-01-25 10:29:11 -03:00 committed by GitHub
parent 851a3346a9
commit cfdb9c126f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(),