Skip to content

Commit

Permalink
make gateway as the ancestor of btp if it is targeting to the gateway
Browse files Browse the repository at this point in the history
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
  • Loading branch information
shawnh2 committed Mar 10, 2024
1 parent 7ebc378 commit 7fdeee3
Show file tree
Hide file tree
Showing 23 changed files with 388 additions and 457 deletions.
627 changes: 265 additions & 362 deletions internal/gatewayapi/backendtrafficpolicy.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down Expand Up @@ -166,8 +167,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Unable to target Gateway, another BackendTrafficPolicy has already
Expand Down Expand Up @@ -206,8 +208,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: not-same-namespace-gateway
namespace: another-namespace
conditions:
- lastTransitionTime: null
message: Namespace:envoy-gateway TargetRef.Namespace:another-namespace, BackendTrafficPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-2
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ backendTrafficPolicies:
sectionName: http
conditions:
- lastTransitionTime: null
message: 'Unable to translate Circuit Breaker: Invalid MaxRequestsPerConnection
value -1.'
message: 'CircuitBreaker: invalid MaxRequestsPerConnection value -1'
reason: Invalid
status: "False"
type: Accepted
Expand Down Expand Up @@ -53,8 +52,7 @@ backendTrafficPolicies:
sectionName: http
conditions:
- lastTransitionTime: null
message: 'Unable to translate Circuit Breaker: Invalid MaxParallelRetries
value -1.'
message: 'CircuitBreaker: invalid MaxParallelRetries value -1'
reason: Invalid
status: "False"
type: Accepted
Expand All @@ -77,12 +75,12 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate Circuit Breaker: Invalid MaxConnections value
-1.'
message: 'CircuitBreaker: invalid MaxConnections value -1'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down Expand Up @@ -108,8 +109,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-2
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate Local Rate Limit: Local rateLimit rule limit
unit must be a multiple of the default limit unit.'
message: 'RateLimit: local rateLimit rule limit unit must be a multiple of
the default limit unit'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate Local Rate Limit: Local rateLimit does not support
distinct HeaderMatch.'
message: 'RateLimit: local rateLimit does not support distinct HeaderMatch'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate Local Rate Limit: Local rateLimit can not have
more than one rule without clientSelectors.'
message: 'RateLimit: local rateLimit can not have more than one rule without
clientSelectors'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate Global Rate Limit: Regex "*.illegal.regex" is
invalid: error parsing regexp: missing argument to repetition operator:
`*`'
message: 'RateLimit: regex "*.illegal.regex" is invalid: error parsing regexp:
missing argument to repetition operator: `*`'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: 'Unable to translate HTTP Timeout: Invalid MaxConnectionDuration
value 22mib.'
message: 'Timeout: invalid MaxConnectionDuration value 22mib'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ backendTrafficPolicies:
sectionName: http
conditions:
- lastTransitionTime: null
message: 'Unable to translate TCP Timeout: Invalid ConnectTimeout value 20kib.'
message: 'Timeout: invalid ConnectTimeout value 20kib'
reason: Invalid
status: "False"
type: Accepted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: envoy-gateway
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ backendTrafficPolicies:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: GatewayClass
name: envoy-gateway-class
kind: Gateway
name: gateway-1
namespace: default
conditions:
- lastTransitionTime: null
message: Policy has been accepted.
Expand Down
Loading

0 comments on commit 7fdeee3

Please sign in to comment.