-
Notifications
You must be signed in to change notification settings - Fork 360
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
design/impl: control plane metrics monitoring #1955
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright Envoy Gateway Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// The full text of the Apache license is available in the LICENSE file at | ||
// the root of the repo. | ||
|
||
package v1alpha1 | ||
|
||
// EnvoyGatewayMetrics defines control plane push/pull metrics configurations. | ||
type EnvoyGatewayMetrics struct { | ||
// Address defines the address of Envoy Gateway Metrics Server. | ||
Address *EnvoyGatewayMetricsAddress | ||
// Sinks defines the metric sinks where metrics are sent to. | ||
Sinks []EnvoyGatewayMetricSink `json:"sinks,omitempty"` | ||
// Prometheus defines the configuration for prometheus endpoint. | ||
Prometheus *EnvoyGatewayPrometheusProvider `json:"prometheus,omitempty"` | ||
} | ||
|
||
// EnvoyGatewayMetricSink defines control plane | ||
// metric sinks where metrics are sent to. | ||
type EnvoyGatewayMetricSink struct { | ||
// Type defines the metric sink type. | ||
// EG control plane currently supports OpenTelemetry. | ||
// +kubebuilder:validation:Enum=OpenTelemetry | ||
// +kubebuilder:default=OpenTelemetry | ||
Type MetricSinkType `json:"type"` | ||
// Host define the sink service hostname. | ||
Host string `json:"host"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we start using urls here instead of using 3 fields ? |
||
// Protocol define the sink service protocol. | ||
// +kubebuilder:validation:Enum=grpc;http | ||
Protocol string `json:"protocol"` | ||
// Port defines the port the sink service is exposed on. | ||
// | ||
// +optional | ||
// +kubebuilder:validation:Minimum=0 | ||
// +kubebuilder:default=4317 | ||
Port int32 `json:"port,omitempty"` | ||
} | ||
|
||
// EnvoyGatewayPrometheusProvider will expose prometheus endpoint in pull mode. | ||
type EnvoyGatewayPrometheusProvider struct { | ||
// Enable defines if enables the prometheus metrics in pull mode. Default is true. | ||
// | ||
// +optional | ||
// +kubebuilder:default=true | ||
Enable bool `json:"enable,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need an explicit |
||
} | ||
|
||
// EnvoyGatewayMetricsAddress defines the Envoy Gateway Metrics Address configuration. | ||
type EnvoyGatewayMetricsAddress struct { | ||
// Port defines the port the metrics server is exposed on. | ||
// | ||
// +optional | ||
// +kubebuilder:validation:Minimum=0 | ||
// +kubebuilder:default=19010 | ||
Port int `json:"port,omitempty"` | ||
// Host defines the metrics server hostname. | ||
// | ||
// +optional | ||
// +kubebuilder:default="0.0.0.0" | ||
Host string `json:"host,omitempty"` | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ const ( | |
GatewayAdminPort = 19000 | ||
// GatewayAdminHost is the host of envoy gateway admin server. | ||
GatewayAdminHost = "127.0.0.1" | ||
// GatewayMetricsPort is the port which envoy gateway metrics server is listening on. | ||
GatewayMetricsPort = 19010 | ||
// GatewayMetricsHost is the host of envoy gateway metrics server. | ||
GatewayMetricsHost = "0.0.0.0" | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
|
@@ -59,6 +63,12 @@ type EnvoyGatewaySpec struct { | |
// +optional | ||
Admin *EnvoyGatewayAdmin `json:"admin,omitempty"` | ||
|
||
// Telemetry defines the desired control plane telemetry related abilities. | ||
// If unspecified, the telemetry is used with default configuration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the default configuration ? is it opt in ? |
||
// | ||
// +optional | ||
Telemetry *EnvoyGatewayTelemetry `json:"telemetry,omitempty"` | ||
|
||
// RateLimit defines the configuration associated with the Rate Limit service | ||
// deployed by Envoy Gateway required to implement the Global Rate limiting | ||
// functionality. The specific rate limit service used here is the reference | ||
|
@@ -80,6 +90,13 @@ type EnvoyGatewaySpec struct { | |
ExtensionAPIs *ExtensionAPISettings `json:"extensionApis,omitempty"` | ||
} | ||
|
||
// EnvoyGatewayTelemetry defines telemetry configurations for envoy gateway control plane. | ||
// Control plane will focus on metrics observability telemetry and tracing telemetry later. | ||
type EnvoyGatewayTelemetry struct { | ||
// Metrics defines metrics configuration for envoy gateway. | ||
Metrics *EnvoyGatewayMetrics `json:"metrics,omitempty"` | ||
} | ||
|
||
// EnvoyGatewayLogging defines logging for Envoy Gateway. | ||
type EnvoyGatewayLogging struct { | ||
// Level is the logging level. If unspecified, defaults to "info". | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we enabling prometheus metrics by default ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most people in Kubernetes are/will use prometheus, it should always enable by default.