-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Guy Daich <guy.daich@sap.com>
- Loading branch information
Showing
8 changed files
with
291 additions
and
0 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
55 changes: 55 additions & 0 deletions
55
internal/xds/translator/testdata/in/extension-xds-ir/multiple-listeners-same-port-error.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,55 @@ | ||
http: | ||
- name: "first-listener-error" | ||
address: "::" | ||
port: 10080 | ||
hostnames: | ||
- "foo.com" | ||
path: | ||
mergeSlashes: true | ||
escapedSlashesAction: UnescapeAndRedirect | ||
tls: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
certificates: | ||
- name: first-listener | ||
# byte slice representation of "cert-data" | ||
serverCertificate: [99, 101, 114, 116, 45, 100, 97, 116, 97] | ||
# byte slice representation of "key-data" | ||
privateKey: [107, 101, 121, 45, 100, 97, 116, 97] | ||
routes: | ||
- name: "first-route" | ||
hostname: "*" | ||
destination: | ||
name: "first-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "second-listener" | ||
address: "::" | ||
port: 10080 | ||
hostnames: | ||
- "foo.net" | ||
path: | ||
mergeSlashes: true | ||
escapedSlashesAction: UnescapeAndRedirect | ||
tls: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
certificates: | ||
- name: second-listener | ||
# byte slice representation of "cert-data" | ||
serverCertificate: [99, 101, 114, 116, 45, 100, 97, 116, 97] | ||
# byte slice representation of "key-data" | ||
privateKey: [107, 101, 121, 45, 100, 97, 116, 97] | ||
routes: | ||
- name: "second-route" | ||
hostname: "*" | ||
destination: | ||
name: "second-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 |
44 changes: 44 additions & 0 deletions
44
...translator/testdata/out/extension-xds-ir/multiple-listeners-same-port-error.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,44 @@ | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_PREFERRED | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: first-route-dest | ||
ignoreHealthOnHostRemoval: true | ||
lbPolicy: LEAST_REQUEST | ||
name: first-route-dest | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_PREFERRED | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: second-route-dest | ||
ignoreHealthOnHostRemoval: true | ||
lbPolicy: LEAST_REQUEST | ||
name: second-route-dest | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- loadAssignment: | ||
clusterName: mock-extension-injected-cluster | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: exampleservice.examplenamespace.svc.cluster.local | ||
portValue: 5000 | ||
name: mock-extension-injected-cluster |
24 changes: 24 additions & 0 deletions
24
...ranslator/testdata/out/extension-xds-ir/multiple-listeners-same-port-error.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,24 @@ | ||
- clusterName: first-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: first-route-dest/backend/0 | ||
- clusterName: second-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: second-route-dest/backend/0 |
115 changes: 115 additions & 0 deletions
115
...ranslator/testdata/out/extension-xds-ir/multiple-listeners-same-port-error.listeners.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,115 @@ | ||
- address: | ||
socketAddress: | ||
address: '::' | ||
portValue: 10080 | ||
filterChains: | ||
- filterChainMatch: | ||
serverNames: | ||
- foo.com | ||
filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
commonHttpProtocolOptions: | ||
headersWithUnderscoresAction: REJECT_REQUEST | ||
http2ProtocolOptions: | ||
initialConnectionWindowSize: 1048576 | ||
initialStreamWindowSize: 65536 | ||
maxConcurrentStreams: 100 | ||
httpFilters: | ||
- name: envoy.filters.http.router | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
suppressEnvoyHeaders: true | ||
mergeSlashes: true | ||
normalizePath: true | ||
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT | ||
routeConfig: | ||
name: error_route_configuration | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: error_vhost | ||
routes: | ||
- directResponse: | ||
status: 500 | ||
match: | ||
prefix: / | ||
name: error_route | ||
serverHeaderTransformation: PASS_THROUGH | ||
statPrefix: https-10080 | ||
useRemoteAddress: true | ||
name: first-listener-error | ||
transportSocket: | ||
name: envoy.transport_sockets.tls | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext | ||
commonTlsContext: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
tlsCertificateSdsSecretConfigs: | ||
- name: first-listener | ||
sdsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
disableStatefulSessionResumption: true | ||
disableStatelessSessionResumption: true | ||
- filterChainMatch: | ||
serverNames: | ||
- foo.net | ||
filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
commonHttpProtocolOptions: | ||
headersWithUnderscoresAction: REJECT_REQUEST | ||
http2ProtocolOptions: | ||
initialConnectionWindowSize: 1048576 | ||
initialStreamWindowSize: 65536 | ||
maxConcurrentStreams: 100 | ||
httpFilters: | ||
- name: envoy.filters.http.router | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
suppressEnvoyHeaders: true | ||
mergeSlashes: true | ||
normalizePath: true | ||
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT | ||
routeConfig: | ||
name: error_route_configuration | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: error_vhost | ||
routes: | ||
- directResponse: | ||
status: 500 | ||
match: | ||
prefix: / | ||
name: error_route | ||
serverHeaderTransformation: PASS_THROUGH | ||
statPrefix: https-10080 | ||
useRemoteAddress: true | ||
name: second-listener | ||
transportSocket: | ||
name: envoy.transport_sockets.tls | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext | ||
commonTlsContext: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
tlsCertificateSdsSecretConfigs: | ||
- name: second-listener | ||
sdsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
disableStatefulSessionResumption: true | ||
disableStatelessSessionResumption: true | ||
listenerFilters: | ||
- name: envoy.filters.listener.tls_inspector | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector | ||
name: first-listener-error | ||
perConnectionBufferLimitBytes: 32768 |
28 changes: 28 additions & 0 deletions
28
...s/translator/testdata/out/extension-xds-ir/multiple-listeners-same-port-error.routes.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,28 @@ | ||
- ignorePortInHostMatching: true | ||
name: first-listener-error | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: first-listener-error/* | ||
routes: | ||
- match: | ||
prefix: / | ||
name: first-route | ||
route: | ||
cluster: first-route-dest | ||
upgradeConfigs: | ||
- upgradeType: websocket | ||
- ignorePortInHostMatching: true | ||
name: second-listener | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: second-listener/* | ||
routes: | ||
- match: | ||
prefix: / | ||
name: second-route | ||
route: | ||
cluster: second-route-dest | ||
upgradeConfigs: | ||
- upgradeType: websocket |
16 changes: 16 additions & 0 deletions
16
.../translator/testdata/out/extension-xds-ir/multiple-listeners-same-port-error.secrets.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,16 @@ | ||
- name: first-listener | ||
tlsCertificate: | ||
certificateChain: | ||
inlineBytes: Y2VydC1kYXRh | ||
privateKey: | ||
inlineBytes: a2V5LWRhdGE= | ||
- name: second-listener | ||
tlsCertificate: | ||
certificateChain: | ||
inlineBytes: Y2VydC1kYXRh | ||
privateKey: | ||
inlineBytes: a2V5LWRhdGE= | ||
- genericSecret: | ||
secret: | ||
inlineString: super-secret-extension-secret | ||
name: mock-extension-injected-secret |
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