istio / istio/api

workload selector should support set-based requirements

Open
#1,965 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
519
Forks
612
Avg merge
18h 35m
Merged PRs (30d)
23

Description

(This is used to request new product features, please visit 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 LabelSelector[1], 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.

[1]:https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

**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**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.