Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: default
name: managed-gateway
spec:
gatewayClassName: envoy-gateway-class
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: Same
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
namespace: default
name: unmanaged-gateway
spec:
gatewayClassName: other-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: mixed-parents-route
spec:
parentRefs:
- name: managed-gateway
sectionName: http
- name: unmanaged-gateway
sectionName: http
rules:
- matches:
- path:
value: "/"
backendRefs:
- name: service-1
port: 8080

securityPolicies:
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
namespace: default
name: route-policy
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: mixed-parents-route
authorization:
defaultAction: Deny
rules:
- action: Allow
principal:
clientCIDRs:
- 10.0.0.0/24
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
gateways:
- apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: managed-gateway
namespace: default
spec:
gatewayClassName: envoy-gateway-class
listeners:
- allowedRoutes:
namespaces:
from: Same
name: http
port: 80
protocol: HTTP
status:
listeners:
- attachedRoutes: 1
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:
name: mixed-parents-route
namespace: default
spec:
parentRefs:
- name: managed-gateway
sectionName: http
- name: unmanaged-gateway
sectionName: http
rules:
- backendRefs:
- name: service-1
port: 8080
matches:
- path:
value: /
status:
parents:
- conditions:
- lastTransitionTime: null
message: Route is accepted
reason: Accepted
status: "True"
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: managed-gateway
sectionName: http
infraIR:
default/managed-gateway:
proxy:
listeners:
- name: default/managed-gateway/http
ports:
- containerPort: 10080
name: http-80
protocol: HTTP
servicePort: 80
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: managed-gateway
gateway.envoyproxy.io/owning-gateway-namespace: default
ownerReference:
kind: GatewayClass
name: envoy-gateway-class
name: default/managed-gateway
namespace: envoy-gateway-system
securityPolicies:
- apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: route-policy
namespace: default
spec:
authorization:
defaultAction: Deny
rules:
- action: Allow
principal:
clientCIDRs:
- 10.0.0.0/24
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: mixed-parents-route
status:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: Gateway
name: managed-gateway
namespace: default
sectionName: http
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
reason: Accepted
status: "True"
type: Accepted
controllerName: gateway.envoyproxy.io/gatewayclass-controller
- ancestorRef:
group: gateway.networking.k8s.io
kind: Gateway
name: unmanaged-gateway

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unmanaged-gateway should not be in status.

namespace: default
sectionName: http
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
reason: Accepted
status: "True"
type: Accepted
controllerName: gateway.envoyproxy.io/gatewayclass-controller
xdsIR:
default/managed-gateway:
accessLog:
json:
- path: /dev/stdout
globalResources:
proxyServiceCluster:
metadata:
kind: Service
name: envoy-default-managed-gateway-f4161932
namespace: envoy-gateway-system
sectionName: "8080"
name: default/managed-gateway
settings:
- addressType: IP
endpoints:
- host: 7.6.5.4
port: 8080
zone: zone1
metadata:
kind: Service
name: envoy-default-managed-gateway-f4161932
namespace: envoy-gateway-system
sectionName: "8080"
name: default/managed-gateway
protocol: TCP
http:
- address: 0.0.0.0
externalPort: 80
hostnames:
- '*'
isHTTP2: false
metadata:
kind: Gateway
name: managed-gateway
namespace: default
sectionName: http
name: default/managed-gateway/http
path:
escapedSlashesAction: UnescapeAndRedirect
mergeSlashes: true
port: 10080
routes:
- destination:
metadata:
kind: HTTPRoute
name: mixed-parents-route
namespace: default
name: httproute/default/mixed-parents-route/rule/0
settings:
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8080
metadata:
kind: Service
name: service-1
namespace: default
sectionName: "8080"
name: httproute/default/mixed-parents-route/rule/0/backend/0
protocol: HTTP
weight: 1
hostname: '*'
isHTTP2: false
metadata:
kind: HTTPRoute
name: mixed-parents-route
namespace: default
name: httproute/default/mixed-parents-route/rule/0/match/0/*
pathMatch:
distinct: false
name: ""
prefix: /
security:
authorization:
defaultAction: Deny
rules:
- action: Allow
name: securitypolicy/default/route-policy/authorization/rule/0
principal:
clientCIDRs:
- cidr: 10.0.0.0/24
distinct: false
ip: 10.0.0.0
isIPv6: false
maskLen: 24
readyListener:
address: 0.0.0.0
ipFamily: IPv4
path: /ready
port: 19003
Loading