-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Telemetry] KubeRay version and CRD #2024
Conversation
@@ -629,6 +629,13 @@ func setContainerEnvVars(pod *corev1.Pod, rayNodeType rayv1.RayNodeType, rayStar | |||
usageEnv := corev1.EnvVar{Name: utils.RAY_USAGE_STATS_KUBERAY_IN_USE, Value: "1"} | |||
container.Env = append(container.Env, usageEnv) | |||
} | |||
if rayNodeType == rayv1.HeadNode { | |||
extraTagsEnv := corev1.EnvVar{ | |||
Name: utils.RAY_USAGE_STATS_EXTRA_TAGS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to inject this env var to worker nodes? @jjyao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, head node is enough.
@@ -37,11 +37,8 @@ import ( | |||
) | |||
|
|||
var ( | |||
_version_ = "0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file are unrelated to the telemetry. I simply deleted some unused code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's test it manually
if rayNodeType == rayv1.HeadNode { | ||
extraTagsEnv := corev1.EnvVar{ | ||
Name: utils.RAY_USAGE_STATS_EXTRA_TAGS, | ||
Value: fmt.Sprintf("kuberay_version=%s,crd=%s", utils.KUBERAY_VERSION, string(creatorCRDType)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make the key kuberay_version and kuberay_crd
@@ -167,6 +168,9 @@ const ( | |||
|
|||
// RayNodeHeadGroupLabelValue is the value for the RayNodeGroupLabelKey label on a head node | |||
RayNodeHeadGroupLabelValue = "headgroup" | |||
|
|||
// Telemetry | |||
KUBERAY_VERSION = "nightly" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevin85421 since this is defined as a constant, it will always be nightly
instead of the actual kuberay version. Is that expected or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a PR to the release branch to update it #2036.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha. I opeend #2042 to also include this constant in the user-agent
It's a minor change, no need to cherry-pick to 1.1
Why are these changes needed?
Related issue number
Checks