Skip to content

Commit

Permalink
Use a default user agent 'kuberay-operator' instead of the default us…
Browse files Browse the repository at this point in the history
…er-agent from controller-runtime (#1982)
  • Loading branch information
andrewsykim authored Mar 13, 2024
1 parent c1dbdf1 commit 838bc19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ray-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ var (
_commitId_ = ""
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
// TODO: include the kuberay version in the user-agent. E.g. ray-operator/v1.1.0
userAgent = "kuberay-operator"
)

func init() {
Expand Down Expand Up @@ -208,7 +210,9 @@ func main() {
}

setupLog.Info("Setup manager")
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)
restConfig := ctrl.GetConfigOrDie()
restConfig.UserAgent = userAgent
mgr, err := ctrl.NewManager(restConfig, options)
exitOnError(err, "unable to start manager")

rayClusterOptions := ray.RayClusterReconcilerOptions{
Expand Down

0 comments on commit 838bc19

Please sign in to comment.