Skip to content

Commit

Permalink
Merge pull request #1506 from gnossen/fix_grpcroute_issues
Browse files Browse the repository at this point in the history
Improve GRPCRoute Go Structs
  • Loading branch information
k8s-ci-robot committed Nov 5, 2022
2 parents 2f7ab68 + 6ad4168 commit 3ca4999
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 28 additions & 1 deletion apis/v1alpha2/grpcroute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,33 @@ type HeaderName string
// GRPCRouteFilterType identifies a type of GRPCRoute filter.
type GRPCRouteFilterType string

const (
// GRPCRouteFilterRequestHeaderModifier can be used to add or remove a gRPC
// header from a gRPC request before it is sent to the upstream target.
//
// Support in GRPCRouteRule: Core
//
// Support in GRPCBackendRef: Extended
GRPCRouteFilterRequestHeaderModifier GRPCRouteFilterType = "RequestHeaderModifier"

// GRPCRouteFilterRequestMirror can be used to mirror gRPC requests to a
// different backend. The responses from this backend MUST be ignored by
// the Gateway.
//
// Support in GRPCRouteRule: Extended
//
// Support in GRPCBackendRef: Extended
GRPCRouteFilterRequestMirror GRPCRouteFilterType = "RequestMirror"

// GRPCRouteFilterExtensionRef should be used for configuring custom
// gRPC filters.
//
// Support in GRPCRouteRule: Implementation-specific
//
// Support in GRPCBackendRef: Implementation-specific
GRPCRouteFilterExtensionRef GRPCRouteFilterType = "ExtensionRef"
)

// GRPCRouteFilter defines processing steps that must be completed during the
// request or response lifecycle. GRPCRouteFilters are meant as an extension
// point to express processing that may be done in Gateway implementations. Some
Expand Down Expand Up @@ -482,7 +509,7 @@ type GRPCBackendRef struct {
// Support for weight: Core
//
// +optional
BackendRefs BackendRef `json:",inline"`
BackendRef `json:",inline"`

// Filters defined at this level MUST be executed if and only if the
// request is being forwarded to the backend defined here.
Expand Down
2 changes: 1 addition & 1 deletion apis/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ca4999

Please sign in to comment.