Skip to content

Commit

Permalink
Update pkg/scraper/client/resource/client.go
Browse files Browse the repository at this point in the history
Co-authored-by: Wei Huang <[email protected]>
  • Loading branch information
wzshiming and Huang-Wei committed Aug 14, 2023
1 parent 1e9efb2 commit a49293c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/scraper/client/resource/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ func (kc *kubeletClient) GetMetrics(ctx context.Context, node *corev1.Node) (*st
if kc.useNodeStatusPort && nodeStatusPort != 0 {
port = nodeStatusPort
}
if node.Annotations != nil &&
node.Annotations[AnnotationResourceMetricsPath] != "" {
path = node.Annotations[AnnotationResourceMetricsPath]
if metricsPath := node.Annotations[AnnotationResourceMetricsPath]; metricsPath != "" {
path = metricsPath
}
addr, err := kc.addrResolver.NodeAddress(node)
if err != nil {
Expand Down

0 comments on commit a49293c

Please sign in to comment.