cncf / cncf/xds

Matching an element in a list

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
271
Forks
85
PR merge metrics
No merged PRs in 30d

Description

There are several use cases in Envoy when we need to iterate over a list of items and match each item individually:
* selecting the first ALPN for which a nested filter chain matcher accepts;
* matching an item in DNS SAN list in a TLS cert;
* matching an IP value in XFF header.

Ideally, we want to support all existing matchers for these use cases, instead of adapting all matchers to expect a list.

How should we define this in xds?

Option 1: Add a common input that takes another input and produces an iterator of data items. This requires some changes in the implementations to return an iterator for data inputs.
Option 2: Add a custom matcher that takes another matcher as input. The nested matcher can be any of string, custom input, prefix map, exact map, or custom sub-linear matcher. The custom matcher parses the input and then attempts to match elements one by one.

Ref: https://github.com/envoyproxy/envoy/issues/20666

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.