You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Wrong kubernetes client is used in plugin manager #3688
ray: [PluginInitializationFailed] Error getting informer for %!s(\u003cnil\u003e), caused by: no matches for kind \"RayJob\" in version \"ray.io/v1alpha1\""
Installing the ray crd in cluster A solved this problem. However, we would expect it to be enough for it to just be installed in cluster B.
After fixing that, we also hit another issue during startup where a permission is needed for Propeller service account to list rayjobs in cluster A, where this permission should only be needed in cluster B.
W0516 13:51:19.779009 1 reflector.go:324] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: failed to list *v1alpha1.RayJob: rayjobs.ray.io is forbidden: User "<service-account>" cannot list resource "rayjobs" in API group "ray.io" at the cluster scope
E0516 13:51:19.779088 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.24.1/tools/cache/reflector.go:167: Failed to watch *v1alpha1.RayJob: failed to list *v1alpha1.RayJob: rayjobs.ray.io is forbidden: User "<service-account>" cannot list resource "rayjobs" in API group "ray.io" at the cluster scope
The problem seem to be that the plugin manager doesn't use the correct k8 client (e.g., the k8 client in the plugin).
Expected behavior
The plugin manager should use the custom kubernetes client from the plugin if it exists.
This would be an interesting change for anyone does have inter-cluster setup because it has impact on how flytepropeller works and behaves, covering at least the following aspects:
Before the fix, RBAC for the custom resource is required by the cluster where flytepropller is deployed, even that custom resource never gets created into the cluster; after the fix, this is no longer needed
Before the fix, the informer/caching never works as expected for the inter-cluster setup because there is nothing to cache; after the fix, the cache will start being populated and there might be a noticeable change of memory usage pattern
There might be some metrics being impacted as well, but not very sure
Before the fix, a CRD has to be deployed to both the cluster where flytepropeller is deployed, and the actual cluster where the CRD operator runs; after the fix, not entirely sure whether this is still required (it might still be the case in order for informer to work)
So, I suggest we give very good highlight in release note to give users more context and possible actions to take.
@honnix this sounds great. I think this change makes inter-cluster work how it is supposed to (ie. same as how intra-cluster works) with the only caveat of some minor prometheus metrics. The resource monitor construct seems to work using a map of resource type to monitor, not taking the cluster into consideration. So if there are two plugins that operate over the same resource, where one is inter-cluster and the other intra-cluster, only the first to be registered will emit these metrics. This is quite a corner-case and, if I was a user, would probably get these metrics from the k8s api server more reliably.
Activity
sonjaer commentedon May 16, 2023
flyteorg/flytepropeller#563
honnix commentedon May 22, 2023
This would be an interesting change for anyone does have inter-cluster setup because it has impact on how flytepropeller works and behaves, covering at least the following aspects:
So, I suggest we give very good highlight in release note to give users more context and possible actions to take.
hamersaw commentedon May 22, 2023
@honnix this sounds great. I think this change makes inter-cluster work how it is supposed to (ie. same as how intra-cluster works) with the only caveat of some minor prometheus metrics. The resource monitor construct seems to work using a map of resource type to monitor, not taking the cluster into consideration. So if there are two plugins that operate over the same resource, where one is inter-cluster and the other intra-cluster, only the first to be registered will emit these metrics. This is quite a corner-case and, if I was a user, would probably get these metrics from the k8s api server more reliably.