Skip to content

Commit

Permalink
update-tests
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <[email protected]>
  • Loading branch information
evacchi committed Jun 7, 2024
1 parent 20b05f3 commit 9f49761
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 128 deletions.

This file was deleted.

40 changes: 40 additions & 0 deletions internal/gatewayapi/testdata/envoyproxy-endpoint-routing.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
envoyproxy:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
namespace: envoy-gateway-system
name: test
spec:
routingType: endpoint
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: envoy-gateway
name: gateway-1
spec:
gatewayClassName: envoy-gateway-class
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: Same
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
namespace: default
name: httproute-1
spec:
parentRefs:
- namespace: envoy-gateway
name: gateway-1
rules:
- matches:
- path:
value: "/"
backendRefs:
- name: service-1
port: 8080

Check failure on line 40 in internal/gatewayapi/testdata/envoyproxy-endpoint-routing.in.yaml

View workflow job for this annotation

GitHub Actions / lint

40:25 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 40 in internal/gatewayapi/testdata/envoyproxy-endpoint-routing.in.yaml

View workflow job for this annotation

GitHub Actions / lint

40:25 [new-line-at-end-of-file] no new line character at the end of file
118 changes: 118 additions & 0 deletions internal/gatewayapi/testdata/envoyproxy-endpoint-routing.out.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
creationTimestamp: null
name: gateway-1
namespace: envoy-gateway
spec:
gatewayClassName: envoy-gateway-class
listeners:
- allowedRoutes:
namespaces:
from: Same
name: http
port: 80
protocol: HTTP
status:
listeners:
- attachedRoutes: 0
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
- lastTransitionTime: null
message: Listener references have been resolved
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
name: http
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
creationTimestamp: null
name: httproute-1
namespace: default
spec:
parentRefs:
- name: gateway-1
namespace: envoy-gateway
rules:
- backendRefs:
- name: service-1
port: 8080
matches:
- path:
value: /
status:
parents:
- conditions:
- lastTransitionTime: null
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parentRef:
name: gateway-1
namespace: envoy-gateway
infraIR:
envoy-gateway/gateway-1:
proxy:
config:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
creationTimestamp: null
name: test
namespace: envoy-gateway-system
spec:
logging: {}
routingType: endpoint
status: {}
listeners:
- address: null
name: envoy-gateway/gateway-1/http
ports:
- containerPort: 10080
name: http-80
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
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
path:
escapedSlashesAction: UnescapeAndRedirect
mergeSlashes: true
port: 10080
40 changes: 40 additions & 0 deletions internal/gatewayapi/testdata/envoyproxy-service-routing.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
envoyproxy:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
namespace: envoy-gateway-system
name: test
spec:
routingType: service
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: envoy-gateway
name: gateway-1
spec:
gatewayClassName: envoy-gateway-class
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: Same
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
namespace: default
name: httproute-1
spec:
parentRefs:
- namespace: envoy-gateway
name: gateway-1
rules:
- matches:
- path:
value: "/"
backendRefs:
- name: service-1
port: 8080

Check failure on line 40 in internal/gatewayapi/testdata/envoyproxy-service-routing.in.yaml

View workflow job for this annotation

GitHub Actions / lint

40:25 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 40 in internal/gatewayapi/testdata/envoyproxy-service-routing.in.yaml

View workflow job for this annotation

GitHub Actions / lint

40:25 [new-line-at-end-of-file] no new line character at the end of file
83 changes: 35 additions & 48 deletions ...yproxy-endpoint-routing-disabled.out.yaml → ...tdata/envoyproxy-service-routing.out.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,41 @@ gateways:
kind: HTTPRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
httpRoutes:
- apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
creationTimestamp: null
name: httproute-1
namespace: default
spec:
parentRefs:
- name: gateway-1
namespace: envoy-gateway
rules:
- backendRefs:
- name: service-1
port: 8080
matches:
- path:
value: /
status:
parents:
- conditions:
- lastTransitionTime: null
message: No listeners included by this parent ref allowed this attachment.
reason: NotAllowedByListeners
status: "False"
type: Accepted
- lastTransitionTime: null
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
type: ResolvedRefs
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parentRef:
name: gateway-1
namespace: envoy-gateway
infraIR:
envoy-gateway/gateway-1:
proxy:
Expand All @@ -51,54 +86,6 @@ infraIR:
namespace: envoy-gateway-system
spec:
logging: {}
provider:
kubernetes:
envoyDeployment:
container:
env:
- name: env_a
value: env_a_value
- name: env_b
value: env_b_name
image: envoyproxy/envoy:distroless-dev
resources:
requests:
cpu: 100m
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
runAsUser: 2000
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-nodepool
operator: In
values:
- router-node
annotations:
key1: val1
key2: val2
securityContext:
fsGroup: 2000
fsGroupChangePolicy: OnRootMismatch
runAsGroup: 3000
runAsUser: 1000
tolerations:
- effect: NoSchedule
key: node-type
operator: Exists
value: router
volumes:
- name: certs
secret:
secretName: envoy-cert
replicas: 2
envoyService:
type: LoadBalancer
type: Kubernetes
routingType: service
status: {}
listeners:
Expand Down
6 changes: 3 additions & 3 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3193,15 +3193,15 @@ _Appears in:_

_Underlying type:_ _string_


RoutingType defines the type of routing of this Envoy proxy.

_Appears in:_
- [EnvoyProxySpec](#envoyproxyspec)

| Value | Description |
| ----- | ----------- |
| `Service` | |
| `Endpoint` | |
| `Service` | ServiceRoutingType is the RoutingType for Service Cluster IP routing.<br /> |
| `Endpoint` | EndpointRoutingType is the RoutingType for Endpoint routing.<br /> |


#### SecurityPolicy
Expand Down
Loading

0 comments on commit 9f49761

Please sign in to comment.