Skip to content

Commit 9e27b34

Browse files
committed
Do not squash configtls.TLSClientSetting in confighttp and cnofiggrpc config
1 parent f3cd422 commit 9e27b34

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

config/configgrpc/configgrpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ type GRPCClientSettings struct {
7373
Compression string `mapstructure:"compression"`
7474

7575
// TLSSetting struct exposes TLS client configuration.
76-
TLSSetting configtls.TLSClientSetting `mapstructure:",squash"`
76+
TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"`
7777

7878
// The keepalive parameters for gRPC client. See grpc.WithKeepaliveParams.
7979
// (https://godoc.org/google.golang.org/grpc#WithKeepaliveParams).

config/confighttp/confighttp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type HTTPClientSettings struct {
3838
Endpoint string `mapstructure:"endpoint"`
3939

4040
// TLSSetting struct exposes TLS client configuration.
41-
TLSSetting configtls.TLSClientSetting `mapstructure:",squash"`
41+
TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"`
4242

4343
// ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize.
4444
ReadBufferSize int `mapstructure:"read_buffer_size"`

exporter/otlpexporter/testdata/config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ exporters:
1212
otlp/2:
1313
endpoint: "1.2.3.4:1234"
1414
compression: "on"
15-
ca_file: /var/lib/mycert.pem
15+
tls:
16+
ca_file: /var/lib/mycert.pem
1617
timeout: 10s
1718
sending_queue:
1819
enabled: true

exporter/otlphttpexporter/testdata/config.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ exporters:
88
otlphttp:
99
otlphttp/2:
1010
endpoint: "https://1.2.3.4:1234"
11-
insecure: true
12-
ca_file: /var/lib/mycert.pem
13-
cert_file: certfile
14-
key_file: keyfile
11+
tls:
12+
ca_file: /var/lib/mycert.pem
13+
cert_file: certfile
14+
key_file: keyfile
15+
insecure: true
1516
timeout: 10s
1617
read_buffer_size: 123
1718
write_buffer_size: 345

0 commit comments

Comments
 (0)