-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix service filtering by name on Kubernetes #1101
Conversation
46ebc27
to
f91df41
Compare
@@ -140,3 +133,27 @@ func RunServices(dockerCli *KubeCli, opts options.Services) error { | |||
} | |||
return formatter.ServiceListWrite(servicesCtx, services, info) | |||
} | |||
|
|||
func filterServicesByName(services []swarm.Service, f filters.Args, stackName string) []swarm.Service { | |||
names := f.Get("name") |
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.
Would it be clearer to pass names []string
as argument instead of the filter-set?
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.
SGTM with @thaJeztah's comment taken care of :)
* Kubernetes native filtering (server side) is an exact match, now filtering on name is made client-side to add prefix-matching Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
f91df41
to
b1ff199
Compare
PTAL |
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.
LGTM
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.
LGTM 🐯
- What I did
Fix #1092 by filtering services by name but client side.
- How to verify it
- Description for the changelog
Fix #1092 filtering stack service name by prefix
- A picture of a cute animal (not mandatory but encouraged)