Skip to content

Commit

Permalink
fix: allow passing empty metrics config (#2682)
Browse files Browse the repository at this point in the history
Signed-off-by: Demonsthere <daemonsthere@gmail.com>
  • Loading branch information
Demonsthere authored Feb 23, 2024
1 parent 78f7edd commit c5cd964
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/v1alpha1/envoygateway_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ func DefaultEnvoyGatewayLogging() *EnvoyGatewayLogging {
// GetEnvoyGatewayTelemetry returns the EnvoyGatewayTelemetry of EnvoyGateway or a default EnvoyGatewayTelemetry if unspecified.
func (e *EnvoyGateway) GetEnvoyGatewayTelemetry() *EnvoyGatewayTelemetry {
if e.Telemetry != nil {
if e.Telemetry.Metrics.Prometheus == nil {
e.Telemetry.Metrics.Prometheus = DefaultEnvoyGatewayPrometheus()
}
if e.Telemetry.Metrics == nil {
e.Telemetry.Metrics = DefaultEnvoyGatewayMetrics()
}
if e.Telemetry.Metrics.Prometheus == nil {
e.Telemetry.Metrics.Prometheus = DefaultEnvoyGatewayPrometheus()
}
return e.Telemetry
}
e.Telemetry = DefaultEnvoyGatewayTelemetry()
Expand Down

0 comments on commit c5cd964

Please sign in to comment.