Skip to content
Draft
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
18 changes: 18 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 @@ -206,6 +208,22 @@ 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
Headers []gwapiv1.HTTPHeader `json:"headers,omitempty"`
// Text defines the body of the OpenTelemetry LogRecord.
// Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) may be used in the format.
// When specified, this takes precedence over the setting-level format for this sink.
// +optional
Text *string `json:"text,omitempty"`
// Attributes defines key-value pairs to include in the OpenTelemetry LogRecord attributes.
// Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators)
// can be used as values. When specified, this takes precedence over the setting-level format for this sink.
// +optional
Attributes map[string]string `json:"attributes,omitempty"`

// 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
6 changes: 6 additions & 0 deletions api/v1alpha1/envoyproxy_tracing_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ type TracingProvider struct {
// Zipkin defines the Zipkin tracing provider configuration
// +optional
Zipkin *ZipkinTracingProvider `json:"zipkin,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 CustomTagType string
Expand Down
27 changes: 27 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 @@ -12255,6 +12255,14 @@ spec:
description: OpenTelemetry defines the OpenTelemetry
accesslog sink.
properties:
attributes:
additionalProperties:
type: string
description: |-
Attributes defines key-value pairs to include in the OpenTelemetry LogRecord attributes.
Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators)
can be used as values. When specified, this takes precedence over the setting-level format for this sink.
type: object
backendRef:
description: |-
BackendRef references a Kubernetes object that represents the
Expand Down Expand Up @@ -13431,6 +13439,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 All @@ -13451,6 +13495,12 @@ spec:
Resources is a set of labels that describe the source of a log entry, including envoy node info.
It's recommended to follow [semantic conventions](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/).
type: object
text:
description: |-
Text defines the body of the OpenTelemetry LogRecord.
Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) may be used in the format.
When specified, this takes precedence over the setting-level format for this sink.
type: string
type: object
x-kubernetes-validations:
- message: host or backendRefs needs to be set
Expand Down Expand Up @@ -14759,6 +14809,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 @@ -16014,6 +16099,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 provider service hostname.
Expand Down
Loading
Loading