Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Aug 2, 2023
1 parent 9320f4d commit 4d42f46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .chloggen/1954.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ change_type: bug_fix
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix port name matching between ingress/route and service
note: Fix port name matching between ingress/route and service. All ports are truncated to 15 characters. If the port name is longer it is changed to port-%d pattern.

# One or more tracking issues related to the change
issues: [1954]
Expand Down
8 changes: 4 additions & 4 deletions pkg/collector/adapters/config_to_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ func TestExtractPortsFromConfig(t *testing.T) {

expectedPorts := []corev1.ServicePort{
{Name: "examplereceiver", Port: 12345},
{Name: "examplereceiver-settings", Port: 12346},
{Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero},
{Name: "port-12346", Port: 12346},
{Name: "port-15268", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero},
{Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 14250},
{Name: "jaeger-thrift-binary", Protocol: "UDP", Port: 6833},
{Name: "jaeger-thrift-compact", Protocol: "UDP", Port: 6831},
{Name: "port-6833", Protocol: "UDP", Port: 6833},
{Name: "port-6831", Protocol: "UDP", Port: 6831},
{Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 55555},
{Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: 4317, TargetPort: targetPort4317},
{Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: 4318, TargetPort: targetPort4318},
Expand Down
8 changes: 4 additions & 4 deletions pkg/collector/parser/receiver_jaeger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ func TestJaegerExposeDefaultPorts(t *testing.T) {
portNumber int32
seen bool
}{
"jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP},
"jaeger-thrift-http": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP},
"jaeger-thrift-compact": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP},
"jaeger-thrift-binary": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP},
"jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP},
"port-14268": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP},
"port-6831": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP},
"port-6832": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP},
}

// test
Expand Down

0 comments on commit 4d42f46

Please sign in to comment.