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 legacy OTLP HTTP port #1971

Merged
merged 1 commit into from
Aug 2, 2023
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
16 changes: 16 additions & 0 deletions .chloggen/1954-remove-legacy-port.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove legacy OTLP HTTP port

# One or more tracking issues related to the change
issues: [1954]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
3 changes: 1 addition & 2 deletions pkg/collector/adapters/config_to_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestExtractPortsFromConfig(t *testing.T) {
// test
ports, err := adapters.ConfigToReceiverPorts(logger, config)
assert.NoError(t, err)
assert.Len(t, ports, 11)
assert.Len(t, ports, 10)

// verify
httpAppProtocol := "http"
Expand All @@ -104,7 +104,6 @@ func TestExtractPortsFromConfig(t *testing.T) {
{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},
{Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: 55681, TargetPort: targetPort4318},
{Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 9411},
}
assert.ElementsMatch(t, expectedPorts, ports)
Expand Down
11 changes: 2 additions & 9 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
defaultOTLPHTTPLegacyPort int32 = 55681
defaultOTLPHTTPPort int32 = 4318
defaultOTLPGRPCPort int32 = 4317
defaultOTLPHTTPPort int32 = 4318
)

var (
Expand Down Expand Up @@ -88,12 +87,6 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) {
TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)),
AppProtocol: &http,
},
{
Name: portName(fmt.Sprintf("%s-http-legacy", o.name), defaultOTLPHTTPLegacyPort),
Port: defaultOTLPHTTPLegacyPort,
TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), // we target the official port, not the legacy
AppProtocol: &http,
},
},
},
} {
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 @@ -85,9 +85,8 @@ func TestOTLPExposeDefaultPorts(t *testing.T) {
portNumber int32
seen bool
}{
"otlp-grpc": {portNumber: 4317},
"otlp-http": {portNumber: 4318},
"otlp-http-legacy": {portNumber: 55681},
"otlp-grpc": {portNumber: 4317},
"otlp-http": {portNumber: 4318},
}

// test
Expand Down
7 changes: 0 additions & 7 deletions tests/e2e/ingress/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,3 @@ spec:
name: otlp-http
path: /otlp-http
pathType: Prefix
- backend:
service:
name: simplest-collector
port:
name: otlp-http-legac
path: /otlp-http-legacy
pathType: Prefix
10 changes: 0 additions & 10 deletions tests/e2e/managed-reconcile/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -51,8 +46,3 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318
12 changes: 1 addition & 11 deletions tests/e2e/managed-reconcile/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -47,11 +42,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand Down Expand Up @@ -79,4 +69,4 @@ data:
traces:
receivers: [jaeger, otlp]
processors: []
exporters: [logging]
exporters: [logging]
12 changes: 1 addition & 11 deletions tests/e2e/managed-reconcile/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -51,11 +46,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -80,4 +70,4 @@ data:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
exporters: [logging]
10 changes: 0 additions & 10 deletions tests/e2e/smoke-init-containers/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -62,8 +57,3 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318
10 changes: 0 additions & 10 deletions tests/e2e/smoke-simplest/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

Expand All @@ -57,8 +52,3 @@ spec:
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318
Loading