-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubernetes: support custom cluster dns domain (#1375)
* kubernetes: support custom dns domain Signed-off-by: hejianpeng <[email protected]>
- Loading branch information
Showing
16 changed files
with
303 additions
and
54 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
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
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
49 changes: 49 additions & 0 deletions
49
internal/xds/translator/testdata/in/xds-ir/ratelimit-custom-domain.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,49 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
hostnames: | ||
- "*" | ||
routes: | ||
- name: "first-route" | ||
rateLimit: | ||
global: | ||
rules: | ||
- headerMatches: | ||
- name: "x-user-id" | ||
exact: "one" | ||
limit: | ||
requests: 5 | ||
unit: second | ||
pathMatch: | ||
exact: "foo/bar" | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "second-route" | ||
rateLimit: | ||
global: | ||
rules: | ||
- headerMatches: | ||
- name: "x-user-id" | ||
distinct: true | ||
limit: | ||
requests: 5 | ||
unit: second | ||
pathMatch: | ||
exact: "example" | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 | ||
- name: "third-route" | ||
rateLimit: | ||
global: | ||
rules: | ||
- limit: | ||
requests: 5 | ||
unit: second | ||
pathMatch: | ||
exact: "test" | ||
destinations: | ||
- host: "1.2.3.4" | ||
port: 50000 |
62 changes: 62 additions & 0 deletions
62
internal/xds/translator/testdata/out/xds-ir/ratelimit-custom-domain.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,62 @@ | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
name: first-route | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
name: second-route | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
name: third-route | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS | ||
- commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
dnsRefreshRate: 30s | ||
loadAssignment: | ||
clusterName: ratelimit_cluster | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: envoy-ratelimit.envoy-gateway-system.svc.example-cluster.local | ||
portValue: 8081 | ||
loadBalancingWeight: 1 | ||
locality: {} | ||
name: ratelimit_cluster | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
respectDnsTtl: true | ||
type: STRICT_DNS | ||
typedExtensionProtocolOptions: | ||
envoy.extensions.upstreams.http.v3.HttpProtocolOptions: | ||
'@type': type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions | ||
explicitHttpConfig: | ||
http2ProtocolOptions: {} |
30 changes: 30 additions & 0 deletions
30
internal/xds/translator/testdata/out/xds-ir/ratelimit-custom-domain.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,30 @@ | ||
- clusterName: first-route | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
locality: {} | ||
- clusterName: second-route | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
locality: {} | ||
- clusterName: third-route | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
locality: {} |
Oops, something went wrong.