Skip to content
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

scale client: support non-namespaced resources #81380

Open
eloyekunle opened this issue Aug 13, 2019 · 5 comments

Comments

@eloyekunle
Copy link
Contributor

commented Aug 13, 2019

What would you like to be added:
The scale client (k8s.io/client-go/scale) currently works fine with namespaced resources. However, it doesn't work for non-namespaced resources e.g. cluster-scoped CRDs. The current implementation should be extended in order to support non-namespaced resources.

The current ScalesGetter interface:

// ScalesGetter can produce a ScaleInterface
// for a particular namespace.
type ScalesGetter interface {
Scales(namespace string) ScaleInterface
}

/area custom-resources
/sig autoscaling

@eloyekunle eloyekunle changed the title scale-client: support non-namespaced resources scale client: support non-namespaced resources Aug 13, 2019

@MaciekPytel

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

I think scale subresource support for CRDs falls more into sig-apimachinery domain. After DirectXMan12 moved on from sig-autoscaling I don't think there is anyone in our sig-autoscaling with knowledge of scale subresource internals.

/sig api-machinery

@fedebongio

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

/assign @roycaihw

@roycaihw

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

The bug report sounds legit. Does the generic scale client need to be changed (I think so), or does kubernetes/dashboard#4195 solve your issue?

@eloyekunle

This comment has been minimized.

Copy link
Contributor Author

commented Aug 15, 2019

No, the dashboard PR doesn't solve this. I discovered this issue while working on that PR so when kubernetes/dashboard#4195 gets merged, it will only work for namespaced CRDs.

I think the generic scale client needs to be updated, maybe by adding another getter to the ScalesGetter interface:

ScalesIfScoped(namespace string, isScoped bool) ScaleInterface

/kind bug

@eloyekunle

This comment has been minimized.

Copy link
Contributor Author

commented Aug 16, 2019

PR: #81507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.