Skip to content

Commit

Permalink
Adds Support for Managing Gateway Status Addresses (#352)
Browse files Browse the repository at this point in the history
* Adds Support for Managing Gateway Status Addresses

Signed-off-by: danehans <daneyonhansen@gmail.com>

* Refactors for GatewayClass Owning Labels

Signed-off-by: danehans <daneyonhansen@gmail.com>

Signed-off-by: danehans <daneyonhansen@gmail.com>
  • Loading branch information
danehans authored Sep 12, 2022
1 parent d86901d commit bb05385
Show file tree
Hide file tree
Showing 50 changed files with 331 additions and 169 deletions.
7 changes: 7 additions & 0 deletions internal/envoygateway/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import (
"github.com/envoyproxy/gateway/internal/log"
)

const (
// EnvoyGatewayNamespace is the namespace where envoy-gateway is running.
EnvoyGatewayNamespace = "envoy-gateway-system"
// EnvoyServiceName is the name of the Envoy Service.
EnvoyServiceName = "envoy"
)

// Server wraps the EnvoyGateway configuration and additional parameters
// used by Envoy Gateway server.
type Server struct {
Expand Down
4 changes: 4 additions & 0 deletions internal/gatewayapi/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func PathMatchTypePtr(pType v1beta1.PathMatchType) *v1beta1.PathMatchType {
return &pType
}

func GatewayAddressTypePtr(addr v1beta1.AddressType) *v1beta1.AddressType {
return &addr
}

func PathMatchTypeDerefOr(matchType *v1beta1.PathMatchType, defaultType v1beta1.PathMatchType) v1beta1.PathMatchType {
if matchType != nil {
return *matchType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ infraIR:
proxy:
metadata:
labels:
gateway.envoyproxy.io/owning-gateway-name: gateway-1
gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway
gateway.envoyproxy.io/owning-gatewayclass: envoy-gateway-class
name: envoy-gateway-class
image: envoyproxy/envoy:v1.23-latest
listeners:
Expand Down
Loading

0 comments on commit bb05385

Please sign in to comment.