Skip to content

Commit

Permalink
feat: add gateway pid to user-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqingyun committed Mar 25, 2024
1 parent 7a52a11 commit 2a5e2f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/clusters/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"net"
"net/url"
"os"
"time"

"k8s.io/client-go/rest"
Expand Down Expand Up @@ -77,6 +78,6 @@ func newRESTConfig() *rest.Config {
}).DialContext,
}

rest.AddUserAgent(cfg, "kube-gateway")
rest.AddUserAgent(cfg, fmt.Sprintf("kube-gateway/pid-%v", os.Getpid()))
return cfg
}

0 comments on commit 2a5e2f4

Please sign in to comment.