Skip to content

Commit

Permalink
feat: add gateway pid to user-agent (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqingyun authored Mar 26, 2024
1 parent d051695 commit 43b7830
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 43b7830

Please sign in to comment.