Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <zirain2009@gmail.com>
  • Loading branch information
zirain committed Apr 2, 2024
1 parent 0fa26c5 commit 2b0c4e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/gatewayapi/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
package gatewayapi

import (
"k8s.io/utils/ptr"
"testing"

"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"

egcfgv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion internal/xds/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func GetRenderedBootstrapConfig(proxyMetrics *egv1a1.ProxyMetrics) (string, erro
// skip duplicate sinks
var host string
var port uint32
if sink.OpenTelemetry.Host == nil {
if sink.OpenTelemetry.Host != nil {
host, port = *sink.OpenTelemetry.Host, uint32(sink.OpenTelemetry.Port)
}
if sink.OpenTelemetry.BackendRef != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/xds/bootstrap/testdata/render/otel-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ static_resources:
- endpoint:
address:
socket_address:
address:
port_value: 0
address: otel-collector.monitoring.svc
port_value: 4317
- connect_timeout: 10s
load_assignment:
cluster_name: xds_cluster
Expand Down

0 comments on commit 2b0c4e9

Please sign in to comment.