-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Scaling StatefulSet filtered using label selectors #3948
Comments
// This was not possible (should I create a separate issue for this?) That won't be possible because we don't know the type of Resource to return. At a minimum you'd have to specify Alternatively fabric8 6 will support: client.apps().statefulSets().withItem(sts).scale(4); @manusa @rohanKanojia is resource a better method name than withItem here? For now you would do something like:
I think we can easily make that better with an enhancement that would add a resourceList or similar method that would return a List of the Resource subclasses:
|
Right, that makes sense. This new method seems to be useful. Thank you for the Does it makes sense to add an example for this in the docs/examples directory (I can add it if we agree to do so). |
Yes, an example would be good. Then either this issue or a new one could be for adding a resourceList method to clean this up a bit. |
a resources method was added with #3973
|
That's great, thanks! I have been away for a while, I will send PR for docs/example entry next week. With my PR we can close this issue. |
Fixes fabric8io#3948 Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
Fixes fabric8io#3948 Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
Fixes fabric8io#3948 Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
Fixes fabric8io#3948 Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
Fixes #3948 Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
Is your enhancement related to a problem? Please describe
I'm trying scale a StatefulSet by selecting it using its labels. For example, kubectl allows following:
But when we filter StatefulSets with label selectors, the
scale()
method is not there.Describe the solution you'd like
I'm thinking of something similar like this:
Describe alternatives you've considered
So far I have tried using
list()
, and then getting the first StatefulSet out of it. But when I tried to load the StatefulSet into client, thescale()
method was not present. So, I had to use themetadata.name
.Additional context
When
kubectl
finds multiple StatefulSets filtered the label selectors, it just scales all of them.The text was updated successfully, but these errors were encountered: