-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge gateways support in translator
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
- Loading branch information
1 parent
a785be8
commit 152eae3
Showing
8 changed files
with
363 additions
and
23 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
37 changes: 37 additions & 0 deletions
37
internal/gatewayapi/testdata/merge-multiple-gateways.in.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,37 @@ | ||
envoyproxy: | ||
apiVersion: config.gateway.envoyproxy.io/v1alpha1 | ||
kind: EnvoyProxy | ||
metadata: | ||
namespace: envoy-gateway-system | ||
name: test | ||
spec: | ||
mergeGateways: true | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: gateway-1 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
port: 80 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: gateway-2 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http-2 | ||
port: 8888 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same |
117 changes: 117 additions & 0 deletions
117
internal/gatewayapi/testdata/merge-multiple-gateways.out.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,117 @@ | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
creationTimestamp: null | ||
name: gateway-1 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
port: 80 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
status: | ||
listeners: | ||
- attachedRoutes: 0 | ||
name: http | ||
conditions: | ||
- lastTransitionTime: null | ||
message: Sending translated listener configuration to the data plane | ||
reason: Programmed | ||
status: "True" | ||
type: Programmed | ||
- lastTransitionTime: null | ||
message: Listener has been successfully translated | ||
reason: Accepted | ||
status: "True" | ||
type: Accepted | ||
supportedKinds: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
- group: gateway.networking.k8s.io | ||
kind: GRPCRoute | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
creationTimestamp: null | ||
name: gateway-2 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http-2 | ||
port: 8888 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
status: | ||
listeners: | ||
- attachedRoutes: 0 | ||
name: http-2 | ||
conditions: | ||
- lastTransitionTime: null | ||
message: Sending translated listener configuration to the data plane | ||
reason: Programmed | ||
status: "True" | ||
type: Programmed | ||
- lastTransitionTime: null | ||
message: Listener has been successfully translated | ||
reason: Accepted | ||
status: "True" | ||
type: Accepted | ||
supportedKinds: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
- group: gateway.networking.k8s.io | ||
kind: GRPCRoute | ||
infraIR: | ||
envoy-gateway-class: | ||
proxy: | ||
config: | ||
apiVersion: config.gateway.envoyproxy.io/v1alpha1 | ||
kind: EnvoyProxy | ||
metadata: | ||
creationTimestamp: null | ||
name: test | ||
namespace: envoy-gateway-system | ||
spec: | ||
mergeGateways: true | ||
listeners: | ||
- address: "" | ||
ports: | ||
- containerPort: 10080 | ||
name: http | ||
protocol: HTTP | ||
servicePort: 80 | ||
- containerPort: 8888 | ||
name: http-2 | ||
protocol: HTTP | ||
servicePort: 8888 | ||
metadata: | ||
labels: | ||
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class | ||
name: envoy-gateway-class | ||
xdsIR: | ||
envoy-gateway-class: | ||
accessLog: | ||
text: | ||
- path: /dev/stdout | ||
http: | ||
- address: 0.0.0.0 | ||
hostnames: | ||
- '*' | ||
isHTTP2: false | ||
name: envoy-gateway/gateway-1/http | ||
port: 10080 | ||
- address: 0.0.0.0 | ||
hostnames: | ||
- '*' | ||
isHTTP2: false | ||
name: envoy-gateway/gateway-2/http-2 | ||
port: 8888 | ||
|
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,29 @@ | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: gateway-1 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
port: 80 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: gateway-2 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http-2 | ||
port: 8888 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same |
123 changes: 123 additions & 0 deletions
123
internal/gatewayapi/testdata/multiple-gateways.out.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,123 @@ | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
creationTimestamp: null | ||
name: gateway-1 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
port: 80 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
status: | ||
listeners: | ||
- attachedRoutes: 0 | ||
name: http | ||
conditions: | ||
- lastTransitionTime: null | ||
message: Sending translated listener configuration to the data plane | ||
reason: Programmed | ||
status: "True" | ||
type: Programmed | ||
- lastTransitionTime: null | ||
message: Listener has been successfully translated | ||
reason: Accepted | ||
status: "True" | ||
type: Accepted | ||
supportedKinds: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
- group: gateway.networking.k8s.io | ||
kind: GRPCRoute | ||
- apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
creationTimestamp: null | ||
name: gateway-2 | ||
namespace: envoy-gateway | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http-2 | ||
port: 8888 | ||
protocol: HTTP | ||
allowedRoutes: | ||
namespaces: | ||
from: Same | ||
status: | ||
listeners: | ||
- attachedRoutes: 0 | ||
name: http-2 | ||
conditions: | ||
- lastTransitionTime: null | ||
message: Sending translated listener configuration to the data plane | ||
reason: Programmed | ||
status: "True" | ||
type: Programmed | ||
- lastTransitionTime: null | ||
message: Listener has been successfully translated | ||
reason: Accepted | ||
status: "True" | ||
type: Accepted | ||
supportedKinds: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
- group: gateway.networking.k8s.io | ||
kind: GRPCRoute | ||
infraIR: | ||
envoy-gateway/gateway-1: | ||
proxy: | ||
listeners: | ||
- address: "" | ||
ports: | ||
- containerPort: 10080 | ||
name: http | ||
protocol: HTTP | ||
servicePort: 80 | ||
metadata: | ||
labels: | ||
gateway.envoyproxy.io/owning-gateway-name: gateway-1 | ||
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway | ||
name: envoy-gateway/gateway-1 | ||
envoy-gateway/gateway-2: | ||
proxy: | ||
listeners: | ||
- address: "" | ||
ports: | ||
- containerPort: 8888 | ||
name: http-2 | ||
protocol: HTTP | ||
servicePort: 8888 | ||
metadata: | ||
labels: | ||
gateway.envoyproxy.io/owning-gateway-name: gateway-2 | ||
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway | ||
name: envoy-gateway/gateway-2 | ||
xdsIR: | ||
envoy-gateway/gateway-1: | ||
accessLog: | ||
text: | ||
- path: /dev/stdout | ||
http: | ||
- address: 0.0.0.0 | ||
hostnames: | ||
- '*' | ||
isHTTP2: false | ||
name: envoy-gateway/gateway-1/http | ||
port: 10080 | ||
envoy-gateway/gateway-2: | ||
accessLog: | ||
text: | ||
- path: /dev/stdout | ||
http: | ||
- address: 0.0.0.0 | ||
hostnames: | ||
- '*' | ||
isHTTP2: false | ||
name: envoy-gateway/gateway-2/http-2 | ||
port: 8888 | ||
Oops, something went wrong.