Skip to content

Commit 5a4e2a3

Browse files
committed
beholder: force IPV4 for chip-ingress client
1 parent 8729ef4 commit 5a4e2a3

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ require (
3636
github.com/scylladb/go-reflectx v1.0.1
3737
github.com/shopspring/decimal v1.4.0
3838
github.com/smartcontractkit/chain-selectors v1.0.62
39-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1
39+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.0-20250812230332-8729ef420e09
4040
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250806152407-159881c7589c
4141
github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2/pb v0.0.0-20250806155403-1d805e639a0f
4242
github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20250722175102-6dcdf5122683

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
304304
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
305305
github.com/smartcontractkit/chain-selectors v1.0.62 h1:KWLEyKQXHxGGHIlUfLrzjYldlB8hBjRZi9GP49WtgYs=
306306
github.com/smartcontractkit/chain-selectors v1.0.62/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8=
307-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
308-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
307+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.0-20250812230332-8729ef420e09 h1:tduKi4OQzxoKqn4uqEulxvP1KYM5eTcs+dKgC5Vyw1s=
308+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.0-20250812230332-8729ef420e09/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc=
309309
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250806152407-159881c7589c h1:QaImySzrLcGzQc4wCF2yDqqb73jA3+9EIqybgx8zT4w=
310310
github.com/smartcontractkit/chainlink-common/pkg/values v0.0.0-20250806152407-159881c7589c/go.mod h1:U1UAbPhy6D7Qz0wHKGPoQO+dpR0hsYjgUz8xwRrmKwI=
311311
github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk/v2/pb v0.0.0-20250806155403-1d805e639a0f h1:mnnlyMH5LgJRAzx/4mW2R+sbK1Acpfs3q0EokeAX5RI=

pkg/beholder/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
78
"github.com/smartcontractkit/chainlink-common/pkg/chipingress"
89
"go.opentelemetry.io/otel/attribute"
910
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc"
@@ -230,6 +231,10 @@ func NewGRPCClient(cfg Config, otlploggrpcNew otlploggrpcFactory) (*Client, erro
230231
headerProvider := NewStaticAuthHeaderProvider(cfg.AuthHeaders)
231232
chipIngressOpts = append(chipIngressOpts, chipingress.WithTokenAuth(headerProvider))
232233
}
234+
if !cfg.ChipIngressIPv6Enabled {
235+
// Force the use of IPv4 addresses for the chip ingress connection
236+
chipIngressOpts = append(chipIngressOpts, chipingress.WithForceIPV4())
237+
}
233238

234239
chipIngressClient, err := chipingress.NewClient(
235240
cfg.ChipIngressEmitterGRPCEndpoint,

pkg/beholder/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type Config struct {
3838
ChipIngressEmitterEnabled bool
3939
ChipIngressEmitterGRPCEndpoint string
4040
ChipIngressInsecureConnection bool // Disables TLS for Chip Ingress Emitter
41+
ChipIngressIPv6Enabled bool
4142

4243
// OTel Log
4344
LogExportTimeout time.Duration

pkg/beholder/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ func ExampleConfig() {
5757
}
5858
fmt.Printf("%+v\n", *config.LogRetryConfig)
5959
// Output:
60-
// {InsecureConnection:true CACertFile: OtelExporterGRPCEndpoint:localhost:4317 OtelExporterHTTPEndpoint:localhost:4318 ResourceAttributes:[{Key:package_name Value:{vtype:4 numeric:0 stringly:beholder slice:<nil>}} {Key:sender Value:{vtype:4 numeric:0 stringly:beholderclient slice:<nil>}}] EmitterExportTimeout:1s EmitterExportInterval:1s EmitterExportMaxBatchSize:512 EmitterMaxQueueSize:2048 EmitterBatchProcessor:true TraceSampleRatio:1 TraceBatchTimeout:1s TraceSpanExporter:<nil> TraceRetryConfig:<nil> MetricReaderInterval:1s MetricRetryConfig:<nil> MetricViews:[] ChipIngressEmitterEnabled:false ChipIngressEmitterGRPCEndpoint: ChipIngressInsecureConnection:false LogExportTimeout:1s LogExportInterval:1s LogExportMaxBatchSize:512 LogMaxQueueSize:2048 LogBatchProcessor:true LogRetryConfig:<nil> LogStreamingEnabled:false AuthPublicKeyHex: AuthHeaders:map[]}
60+
// {InsecureConnection:true CACertFile: OtelExporterGRPCEndpoint:localhost:4317 OtelExporterHTTPEndpoint:localhost:4318 ResourceAttributes:[{Key:package_name Value:{vtype:4 numeric:0 stringly:beholder slice:<nil>}} {Key:sender Value:{vtype:4 numeric:0 stringly:beholderclient slice:<nil>}}] EmitterExportTimeout:1s EmitterExportInterval:1s EmitterExportMaxBatchSize:512 EmitterMaxQueueSize:2048 EmitterBatchProcessor:true TraceSampleRatio:1 TraceBatchTimeout:1s TraceSpanExporter:<nil> TraceRetryConfig:<nil> MetricReaderInterval:1s MetricRetryConfig:<nil> MetricViews:[] ChipIngressEmitterEnabled:false ChipIngressEmitterGRPCEndpoint: ChipIngressInsecureConnection:false ChipIngressIPv6Enabled:false LogExportTimeout:1s LogExportInterval:1s LogExportMaxBatchSize:512 LogMaxQueueSize:2048 LogBatchProcessor:true LogRetryConfig:<nil> LogStreamingEnabled:false AuthPublicKeyHex: AuthHeaders:map[]}
6161
// {InitialInterval:5s MaxInterval:30s MaxElapsedTime:1m0s}
6262
}

0 commit comments

Comments
 (0)