Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the OTLP receiver legacy gRPC port(55680) references #293

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions pkg/collector/parser/receiver_otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ var _ ReceiverParser = &OTLPReceiverParser{}
const (
parserNameOTLP = "__otlp"

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

// OTLPReceiverParser parses the configuration for OTLP receivers.
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
5 changes: 2 additions & 3 deletions pkg/collector/parser/receiver_otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,15 @@ func TestOTLPExposeDefaultPorts(t *testing.T) {
portNumber int32
seen bool
}{
"otlp-grpc": {portNumber: 4317},
"otlp-grpc-legacy": {portNumber: 55680},
mxiamxia marked this conversation as resolved.
Show resolved Hide resolved
"otlp-grpc": {portNumber: 4317},
}

// 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