workload selector should support set-based requirements

Open
#1,965 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start with type/v1beta1/selector.pb.go at the WorkloadSelector definition and inspect the other Istio API types that use it. Compare the current selector shape with Kubernetes LabelSelector and trace the affected API definitions. Done means set-based matchExpressions are supported while existing matchLabels behavior remains compatible.

Written by the indexing model from the issue text.

Description

(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)

Describe the feature request

The type WorkloadSelector, used in many Istio type definitions, and defined here (https://github.com/istio/api/blob/1c84260bf409683cc7602dff2cd838d772f7f43b/type/v1beta1/selector.pb.go#L32) should align to the kubernetes LabelSelector1, which supports set based requirements.

so it would be possible to not only write expressions like:

 selector:
   matchLabels:
     serving.kubeflow.org/inferenceservice: test-service 

but also expressions like:

        selector:
          matchExpressions:
            - key: "serving.knative.dev/service"
              operator: Exists

Note that this enhancement would 100% back compatible and would like the istio behavior with the more general kubernetes behavior.

Describe alternatives you've considered
There isn't really an alternative for the problem I'm trying to serve.

Affected product area (please put an X in all that apply)

This api type appears in many APIs, not sure which all are, but like I said the change would be backward compatible.

[ ] Configuration Infrastructure
[x] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience

Additional context

Dominant language
Go
Stars
523
Forks
623
Avg merge
5d 20h
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from istio/api

All issues in istio/api

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.