Closed andrewsykim closed 6 months ago
@kevin85421 PTAL
Would you mind sharing more details on why we need this change? I don't have the related context. Thanks!
It's mainly for auditing HTTP traffic in kube-apiserver. If we use the default user-agent from controller-runtime (manager/v0.0.0
), it will be hard to distinguish kuberay traffic from other clients that also use controller-runtime. Changing this to ray-operator
will make it easy to filter out HTTP logs that came from kuberay
How do I manually test this PR? I checked the apiserver logs in my local Kind cluster by running kubectl logs -n kube-system kube-apiserver-kind-control-plane, but I didn't find any log message similar to [...httplog.go:131] "HTTP" verb="PUT" .....
You need to increase log verbosity to see the HTTP logs.
Here's the kind cluster config I used:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
apiServer:
extraArgs:
v: "4"
cc @Yicheng-Lu-llll would you mind reviewing this PR? Thanks!
lgtm! I can reproduce it.
Why are these changes needed?
We are currently using the default controller-runtime user-agent which is
manager/v0.0.0
. This PR updates Kuberay's user-agent tokuberay-operator
.Note that it does not include the version of kuberay yet, but we should add that in a follow-up PR. Here's example HTTP log from apiserver that shows the new user-agent being used:
Related issue number
Checks