Skip to content

Commit

Permalink
Remove the OTLP receiver legacy gRPC port(55680) references
Browse files Browse the repository at this point in the history
  • Loading branch information
mxiamxia committed May 25, 2021
1 parent d5258c5 commit 9f8d657
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions pkg/collector/parser/receiver_otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const (
parserNameOTLP = "__otlp"

defaultOTLPGRPCPort int32 = 4317
defaultOTLPGRPCLegacyPort int32 = 55680
defaultOTLPHTTPPort int32 = 55681
)

Expand Down Expand Up @@ -71,11 +70,6 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) {
Port: defaultOTLPGRPCPort,
TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)),
},
{
Name: portName(fmt.Sprintf("%s-grpc-legacy", o.name), defaultOTLPGRPCLegacyPort),
Port: defaultOTLPGRPCLegacyPort,
TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), // we target the official port, not the legacy
},
},
},
{
Expand Down
3 changes: 1 addition & 2 deletions pkg/collector/parser/receiver_otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,14 @@ func TestOTLPExposeDefaultPorts(t *testing.T) {
seen bool
}{
"otlp-grpc": {portNumber: 4317},
"otlp-grpc-legacy": {portNumber: 55680},
}

// test
ports, err := builder.Ports()

// verify
assert.NoError(t, err)
assert.Len(t, ports, 2)
assert.Len(t, ports, 1)

for _, port := range ports {
r := expectedResults[port.Name]
Expand Down

0 comments on commit 9f8d657

Please sign in to comment.