Skip to content
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
8 changes: 8 additions & 0 deletions api/v1alpha1/envoyproxy_accesslogging_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

package v1alpha1

import gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"

type ProxyAccessLog struct {
// Disable disables access logging for managed proxies if set to true.
//
Expand Down Expand Up @@ -208,6 +210,12 @@ type OpenTelemetryEnvoyProxyAccessLog struct {
// It's recommended to follow [semantic conventions](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/).
// +optional
Resources map[string]string `json:"resources,omitempty"`
// Headers is a list of additional headers to send with OTLP export requests.
// These headers are added as gRPC initial metadata for the OTLP gRPC service.
// +optional
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=32
Comment thread
codefromthecrypt marked this conversation as resolved.
Headers []gwapiv1.HTTPHeader `json:"headers,omitempty"`
Comment thread
codefromthecrypt marked this conversation as resolved.

// TODO: support more OpenTelemetry accesslog options(e.g. TLS, auth etc.) in the future.
}
8 changes: 8 additions & 0 deletions api/v1alpha1/envoyproxy_metric_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

package v1alpha1

import gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"

type MetricSinkType string

const (
Expand Down Expand Up @@ -109,6 +111,12 @@ type ProxyOpenTelemetrySink struct {
//
// +optional
ReportHistogramsAsDeltas *bool `json:"reportHistogramsAsDeltas,omitempty"`
// Headers is a list of additional headers to send with OTLP export requests.
// These headers are added as gRPC initial metadata for the OTLP gRPC service.
// +optional
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=32
Headers []gwapiv1.HTTPHeader `json:"headers,omitempty"`
}

type ProxyPrometheusProvider struct {
Expand Down
14 changes: 14 additions & 0 deletions api/v1alpha1/envoyproxy_tracing_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const (
// +kubebuilder:validation:XValidation:message="BackendRefs must be used, backendRef is not supported.",rule="!has(self.backendRef)"
// +kubebuilder:validation:XValidation:message="BackendRefs only support Service and Backend kind.",rule="has(self.backendRefs) ? self.backendRefs.all(f, f.kind == 'Service' || f.kind == 'Backend') : true"
// +kubebuilder:validation:XValidation:message="BackendRefs only support Core and gateway.envoyproxy.io group.",rule="has(self.backendRefs) ? (self.backendRefs.all(f, f.group == \"\" || f.group == 'gateway.envoyproxy.io')) : true"
// +kubebuilder:validation:XValidation:message="openTelemetry can only be used with type OpenTelemetry",rule="has(self.openTelemetry) ? self.type == 'OpenTelemetry' : true"
type TracingProvider struct {
BackendCluster `json:",inline"`
// Type defines the tracing provider type.
Expand Down Expand Up @@ -92,6 +93,9 @@ type TracingProvider struct {
// Zipkin defines the Zipkin tracing provider configuration
// +optional
Zipkin *ZipkinTracingProvider `json:"zipkin,omitempty"`
// OpenTelemetry defines the OpenTelemetry tracing provider configuration
// +optional
OpenTelemetry *OpenTelemetryTracingProvider `json:"openTelemetry,omitempty"`
}

type CustomTagType string
Expand Down Expand Up @@ -158,3 +162,13 @@ type ZipkinTracingProvider struct {
// +optional
DisableSharedSpanContext *bool `json:"disableSharedSpanContext,omitempty"`
}

// OpenTelemetryTracingProvider defines the OpenTelemetry tracing provider configuration.
type OpenTelemetryTracingProvider struct {
// Headers is a list of additional headers to send with OTLP export requests.
// These headers are added as gRPC initial metadata for the OTLP gRPC service.
// +optional
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=32
Headers []gwapiv1.HTTPHeader `json:"headers,omitempty"`
}
35 changes: 35 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -13503,6 +13503,42 @@ spec:
&& !(has(self.loadBalancer) && has(self.loadBalancer.type)
&& self.loadBalancer.type in [''Random'',
''RoundRobin'']))'
headers:
description: |-
Headers is a list of additional headers to send with OTLP export requests.
These headers are added as gRPC initial metadata for the OTLP gRPC service.
items:
description: HTTPHeader represents an HTTP
Header name and value as defined by RFC
7230.
properties:
name:
description: |-
Name is the name of the HTTP Header to be matched. Name matching MUST be
case-insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).

If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, "foo" and "Foo" are considered
equivalent.
maxLength: 256
minLength: 1
pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
type: string
value:
description: Value is the value of HTTP
Header to be matched.
maxLength: 4096
minLength: 1
type: string
required:
- name
- value
type: object
maxItems: 32
minItems: 1
type: array
host:
description: |-
Host define the extension service hostname.
Expand Down Expand Up @@ -14831,6 +14867,41 @@ spec:
&& has(self.connection.preconnect.predictivePercent))
&& !(has(self.loadBalancer) && has(self.loadBalancer.type)
&& self.loadBalancer.type in [''Random'', ''RoundRobin'']))'
headers:
description: |-
Headers is a list of additional headers to send with OTLP export requests.
These headers are added as gRPC initial metadata for the OTLP gRPC service.
items:
description: HTTPHeader represents an HTTP Header
name and value as defined by RFC 7230.
properties:
name:
description: |-
Name is the name of the HTTP Header to be matched. Name matching MUST be
case-insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).

If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, "foo" and "Foo" are considered
equivalent.
maxLength: 256
minLength: 1
pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
type: string
value:
description: Value is the value of HTTP Header
to be matched.
maxLength: 4096
minLength: 1
type: string
required:
- name
- value
type: object
maxItems: 32
minItems: 1
type: array
host:
description: |-
Host define the service hostname.
Expand Down Expand Up @@ -16091,6 +16162,46 @@ spec:
Host define the provider service hostname.
Deprecated: Use BackendRefs instead.
type: string
openTelemetry:
description: OpenTelemetry defines the OpenTelemetry tracing
provider configuration
properties:
headers:
description: |-
Headers is a list of additional headers to send with OTLP export requests.
These headers are added as gRPC initial metadata for the OTLP gRPC service.
items:
description: HTTPHeader represents an HTTP Header
name and value as defined by RFC 7230.
properties:
name:
description: |-
Name is the name of the HTTP Header to be matched. Name matching MUST be
case-insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).

If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, "foo" and "Foo" are considered
equivalent.
maxLength: 256
minLength: 1
pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
type: string
value:
description: Value is the value of HTTP Header
to be matched.
maxLength: 4096
minLength: 1
type: string
required:
- name
- value
type: object
maxItems: 32
minItems: 1
type: array
type: object
port:
default: 4317
description: |-
Expand Down Expand Up @@ -16151,6 +16262,9 @@ spec:
rule: 'has(self.backendRefs) ? (self.backendRefs.all(f,
f.group == "" || f.group == ''gateway.envoyproxy.io''))
: true'
- message: openTelemetry can only be used with type OpenTelemetry
rule: 'has(self.openTelemetry) ? self.type == ''OpenTelemetry''
: true'
samplingFraction:
description: |-
SamplingFraction represents the fraction of requests that should be
Expand Down
Loading