Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync APIs. @tag-name=gloo-v1.18.4 #1395

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions api/gloo/gloo/v1/enterprise/options/ai/ai.proto
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ message AIPromptGuard {
message HeaderMatch {
// The header string match type.
enum MatchType {
option allow_alias = true;
// The string must match exactly the specified string.
EXACT = 0;
// The string must have the specified prefix.
Expand All @@ -655,6 +656,8 @@ message AIPromptGuard {
// The header string must contain the specified string.
CONTAINS = 3;
// The string must match the specified [RE2-style regular expression](https://github.com/google/re2/wiki/) pattern.
REGEX = 4;
// Do not use. Use `REGEX` (fully capitalized) instead.
regex = 4;
}
// The header key string to match against.
Expand Down
5 changes: 5 additions & 0 deletions api/gloo/gloo/v1/options/tracing/tracing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ message ListenerTracingSettings {
repeated TracingTagEnvironmentVariable environment_variables_for_tags = 6;
// Optional. If specified, Envoy will include the literals with the given tag as tracing tags.
repeated TracingTagLiteral literals_for_tags = 7;

// Optional
// Create separate tracing span for each upstream request if true. And if this flag is set to true, the tracing provider will assume that Envoy
// will be independent hop in the trace chain and may set span type to client or server based on this flag.
bool spawn_upstream_span = 10;
}

// Contains settings for configuring Envoy's tracing capabilities at the route level.
Expand Down
14 changes: 14 additions & 0 deletions pkg/api/gateway.gloo.solo.io/v1alpha1/gateway_parameters_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ type GatewayParametersSpec struct {
SelfManaged *SelfManagedGateway `json:"selfManaged,omitempty"`
}

func (in *GatewayParametersSpec) GetKube() *KubernetesProxyConfig {
if in == nil {
return nil
}
return in.Kube
}

func (in *GatewayParametersSpec) GetSelfManaged() *SelfManagedGateway {
if in == nil {
return nil
}
return in.SelfManaged
}

// The current conditions of the GatewayParameters. This is not currently implemented.
type GatewayParametersStatus struct {
}
Expand Down
52 changes: 52 additions & 0 deletions pkg/api/gateway.gloo.solo.io/v1alpha1/kube_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ type Service struct {
//
// +kubebuilder:validation:Optional
ExtraAnnotations map[string]string `json:"extraAnnotations,omitempty"`

// Additional configuration for the service ports.
// The actual port numbers are specified in the Gateway resource.
//
// +optional
// +kubebuilder:validation:MaxItems=8
Ports []*Port `json:"ports"`
// External Traffic Policy on the Service object.
//
// +kubebuilder:validation:Optional
ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"`
}

func (in *Service) GetType() *corev1.ServiceType {
Expand Down Expand Up @@ -126,6 +137,47 @@ func (in *Service) GetExtraAnnotations() map[string]string {
return in.ExtraAnnotations
}

func (in *Service) GetPorts() []*Port {
if in == nil {
return nil
}
return in.Ports
}

func (in *Service) GetExternalTrafficPolicy() *corev1.ServiceExternalTrafficPolicy {
if in == nil {
return nil
}
return in.ExternalTrafficPolicy
}

type Port struct {
// The port number to match on the Gateway
//
// +kubebuilder:validation:Required
Port uint16 `json:"port"`

// The NodePort to be used for the service. If not specified, a random port
// will be assigned by the Kubernetes API server.
//
// +kubebuilder:validation:Optional
NodePort *uint16 `json:"nodePort,omitempty"`
}

func (in *Port) GetPort() uint16 {
if in == nil {
return 0
}
return in.Port
}

func (in *Port) GetNodePort() *uint16 {
if in == nil {
return nil
}
return in.NodePort
}

type ServiceAccount struct {
// Additional labels to add to the ServiceAccount object metadata.
//
Expand Down
36 changes: 36 additions & 0 deletions pkg/api/gateway.gloo.solo.io/v1alpha1/zz_generated.deepcopy.go

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

Loading
Loading