Skip to content

Commit

Permalink
append filepath when compare cni config (#3923)
Browse files Browse the repository at this point in the history
Signed-off-by: 马洪贞 <hzma@alauda.io>
  • Loading branch information
hongzhen-ma committed Apr 17, 2024
1 parent 5893292 commit 4ed15b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/daemon/exporter_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package daemon
import (
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"

Expand Down Expand Up @@ -67,7 +68,7 @@ func (c *Controller) setCniConfigMetric() {

found := false
for _, file := range files {
if file == c.config.CniConfName {
if file == filepath.Join(c.config.CniConfDir, c.config.CniConfName) {
continue
}
found = true
Expand Down

0 comments on commit 4ed15b9

Please sign in to comment.