1
0
Fork 0

Support GRPC routes

Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
Kevin Pollet 2024-08-30 10:36:06 +02:00 committed by GitHub
parent 6b3167d03e
commit 5ed972ccd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 18758 additions and 10695 deletions

View file

@ -7,6 +7,7 @@ import (
ptypes "github.com/traefik/paerser/types"
traefiktls "github.com/traefik/traefik/v3/pkg/tls"
"github.com/traefik/traefik/v3/pkg/types"
"google.golang.org/grpc/codes"
)
const (
@ -132,6 +133,9 @@ type WRRService struct {
// Status defines an HTTP status code that should be returned when calling the service.
// This is required by the Gateway API implementation which expects specific HTTP status to be returned.
Status *int `json:"-" toml:"-" yaml:"-" label:"-" file:"-"`
// GRPCStatus defines a GRPC status code that should be returned when calling the service.
// This is required by the Gateway API implementation which expects specific GRPC status to be returned.
GRPCStatus *GRPCStatus `json:"-" toml:"-" yaml:"-" label:"-" file:"-"`
}
// SetDefaults Default values for a WRRService.
@ -142,6 +146,13 @@ func (w *WRRService) SetDefaults() {
// +k8s:deepcopy-gen=true
type GRPCStatus struct {
Code codes.Code `json:"code,omitempty" toml:"code,omitempty" yaml:"code,omitempty" export:"true"`
Msg string `json:"msg,omitempty" toml:"msg,omitempty" yaml:"msg,omitempty" export:"true"`
}
// +k8s:deepcopy-gen=true
// Sticky holds the sticky configuration.
type Sticky struct {
// Cookie defines the sticky cookie configuration.