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

Expose the OTLP HTTP port in the distributor service #610

Merged
merged 2 commits into from
Sep 19, 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/otlp_http.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: enhancement

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

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

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

# (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:
11 changes: 11 additions & 0 deletions internal/manifests/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ func deployment(params manifestutils.Params) *v1.Deployment {

if !tempo.Spec.Template.Gateway.Enabled {
containerPorts = append(containerPorts, []corev1.ContainerPort{
{
Name: manifestutils.PortOtlpHttpName,
ContainerPort: manifestutils.PortOtlpHttp,
Protocol: corev1.ProtocolTCP,
},
{
Name: manifestutils.PortJaegerThriftHTTPName,
ContainerPort: manifestutils.PortJaegerThriftHTTP,
Expand Down Expand Up @@ -187,6 +192,12 @@ func service(tempo v1alpha1.TempoStack) *corev1.Service {

if !tempo.Spec.Template.Gateway.Enabled {
servicePorts = append(servicePorts, []corev1.ServicePort{
{
Name: manifestutils.PortOtlpHttpName,
Port: manifestutils.PortOtlpHttp,
TargetPort: intstr.FromString(manifestutils.PortOtlpHttpName),
Protocol: corev1.ProtocolTCP,
},
{
Name: manifestutils.PortJaegerThriftHTTPName,
Port: manifestutils.PortJaegerThriftHTTP,
Expand Down
11 changes: 11 additions & 0 deletions internal/manifests/distributor/distributor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ func TestBuildDistributor(t *testing.T) {
ContainerPort: manifestutils.PortMemberlist,
Protocol: corev1.ProtocolTCP,
},
{
Name: manifestutils.PortOtlpHttpName,
ContainerPort: manifestutils.PortOtlpHttp,
Protocol: corev1.ProtocolTCP,
},
{
Name: manifestutils.PortJaegerThriftHTTPName,
ContainerPort: manifestutils.PortJaegerThriftHTTP,
Expand Down Expand Up @@ -85,6 +90,12 @@ func TestBuildDistributor(t *testing.T) {
Port: manifestutils.PortHTTPServer,
TargetPort: intstr.FromString(manifestutils.HttpPortName),
},
{
Name: manifestutils.PortOtlpHttpName,
Port: manifestutils.PortOtlpHttp,
TargetPort: intstr.FromString(manifestutils.PortOtlpHttpName),
Protocol: corev1.ProtocolTCP,
},
{
Name: manifestutils.PortJaegerThriftHTTPName,
Port: manifestutils.PortJaegerThriftHTTP,
Expand Down
5 changes: 5 additions & 0 deletions internal/manifests/manifestutils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ const (
// PortOtlpGrpcServer declares the port number of the OpenTelemetry Collector gRPC receiver port.
PortOtlpGrpcServer = 4317

// PortOtlpHttpName declares the port name of the OpenTelemetry protocol over HTTP.
PortOtlpHttpName = "otlp-http"
// PortOtlpHttp declares the port number of the OpenTelemetry protocol over HTTP.
PortOtlpHttp = 4318

// PortJaegerThriftHTTPName declares the port name of the Jaeger Thrift HTTP protocol.
PortJaegerThriftHTTPName = "thrift-http"
// PortJaegerThriftHTTP declares the port number of the Jaeger Thrift HTTP protocol.
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/generate/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ spec:
port: 3200
protocol: TCP
targetPort: http
- name: otlp-http
port: 4318
protocol: TCP
targetPort: otlp-http
- name: thrift-http
port: 14268
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/smoketest-with-jaeger/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ spec:
port: 3200
protocol: TCP
targetPort: http
- name: otlp-http
port: 4318
protocol: TCP
targetPort: otlp-http
- name: thrift-http
port: 14268
protocol: TCP
Expand Down
Loading