-
Notifications
You must be signed in to change notification settings - Fork 423
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
DELETE_RAYJOB_CR_AFTER_JOB_FINISHES doesn't work with Configuration API #2260
base: master
Are you sure you want to change the base?
Conversation
type RayClientProvider struct { | ||
configapi.Configuration | ||
} | ||
|
||
func (r *RayClientProvider) GetDashboardClient(mgr manager.Manager) func() RayDashboardClientInterface { | ||
return GetRayDashboardClientFunc(mgr, r.UseKubernetesProxy) | ||
} | ||
|
||
func (r *RayClientProvider) GetHttpProxyClient(mgr manager.Manager) func() RayHttpProxyClientInterface { | ||
return GetRayHttpProxyClientFunc(mgr, r.UseKubernetesProxy) | ||
} | ||
|
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.
Why a new type RayClientProvider
is introduced here? Is this for refactoring purpose to make sure that the type Configuration
has no other methods except for deepcopy? If yes it might be better to put this in a separate PR or at least mentioned this in the PR description.
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.
This refactor was needed because otherwise in NewRayJobReconciler
we pass in two copies of the Configuration, one implementing util.ClientProvider and one containing the actual type. Also as you mentioned, Kubernetes API types should not implement other methods outside standrdard DeepCopy and other generated methods.
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.
Got it. Thanks.
Signed-off-by: Andrew Sy Kim <[email protected]>
5de9dab
to
5f06fa8
Compare
@MortalHappiness @kevin85421 should we include this in v1.2? |
I am okay to defer this given we don't have much usage of the Configuration API. We can revisit if/when we want to promote it |
This PR looks good to me. I think it can be included in v1.2 |
Why are these changes needed?
This is a follow-up to #2225
The
deleteRayJobAfterJobFinishes
field in the Configuration API does not actually work because the controller only checks for environment variables. This PR changes the behavior so that KubeRay checks both environment variables and the Configuration API.Related issue number
Checks