forked from envoyproxy/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: HeadersWithUnderscoreActions on ClientTrafficPolicy (envoyproxy…
…#3052) * feat: HeadersWithUnderscoreActions on ClientTrafficPolicy Signed-off-by: David Alger <[email protected]> * Add XDS translator test Signed-off-by: David Alger <[email protected]> * Rename using preferred func prefix Signed-off-by: David Alger <[email protected]> --------- Signed-off-by: David Alger <[email protected]>
- Loading branch information
1 parent
ac683da
commit 69ddc66
Showing
15 changed files
with
448 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
internal/xds/translator/testdata/in/xds-ir/headers-with-underscores-action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 8081 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "first-route" | ||
hostname: "*" | ||
destination: | ||
name: "first-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.1.1.1" | ||
port: 8081 | ||
- name: "second-listener" | ||
address: "0.0.0.0" | ||
port: 8082 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "second-route" | ||
hostname: "*" | ||
destination: | ||
name: "second-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "2.2.2.2" | ||
port: 8082 | ||
headers: | ||
withUnderscoresAction: Allow | ||
- name: "third-listener" | ||
address: "0.0.0.0" | ||
port: 8083 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "third-route" | ||
hostname: "*" | ||
destination: | ||
name: "third-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "3.3.3.3" | ||
port: 8083 | ||
headers: | ||
withUnderscoresAction: RejectRequest | ||
- name: "fourth-listener" | ||
address: "0.0.0.0" | ||
port: 8084 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "fourth-route" | ||
hostname: "*" | ||
destination: | ||
name: "fourth-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "4.4.4.4" | ||
port: 8084 | ||
headers: | ||
withUnderscoresAction: DropHeader | ||
|
68 changes: 68 additions & 0 deletions
68
internal/xds/translator/testdata/out/xds-ir/headers-with-underscores-action.clusters.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: first-route-dest | ||
lbPolicy: LEAST_REQUEST | ||
name: first-route-dest | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: second-route-dest | ||
lbPolicy: LEAST_REQUEST | ||
name: second-route-dest | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: third-route-dest | ||
lbPolicy: LEAST_REQUEST | ||
name: third-route-dest | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: fourth-route-dest | ||
lbPolicy: LEAST_REQUEST | ||
name: fourth-route-dest | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS |
48 changes: 48 additions & 0 deletions
48
internal/xds/translator/testdata/out/xds-ir/headers-with-underscores-action.endpoints.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
- clusterName: first-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.1.1.1 | ||
portValue: 8081 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: first-route-dest/backend/0 | ||
- clusterName: second-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 2.2.2.2 | ||
portValue: 8082 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: second-route-dest/backend/0 | ||
- clusterName: third-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 3.3.3.3 | ||
portValue: 8083 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: third-route-dest/backend/0 | ||
- clusterName: fourth-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 4.4.4.4 | ||
portValue: 8084 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: fourth-route-dest/backend/0 |
Oops, something went wrong.