Skip to content

Commit

Permalink
Add tests for configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Jul 11, 2024
1 parent 827c8e5 commit c6b1049
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions internal/manifests/monolithic/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,112 @@ distributor:
min_version: "1.3"
usage_report:
reporting_enabled: false
`,
},
{
name: "OTLP/HTTP with TLS",
spec: v1alpha1.TempoMonolithicSpec{
Ingestion: &v1alpha1.MonolithicIngestionSpec{
OTLP: &v1alpha1.MonolithicIngestionOTLPSpec{
GRPC: &v1alpha1.MonolithicIngestionOTLPProtocolsGRPCSpec{
Enabled: false,
},
HTTP: &v1alpha1.MonolithicIngestionOTLPProtocolsHTTPSpec{
Enabled: true,
TLS: &v1alpha1.TLSSpec{
Enabled: true,
CA: "ca",
Cert: "cert",
MinVersion: "1.3",
},
},
},
},
},
expected: `
server:
http_listen_port: 3200
internal_server:
enable: true
http_listen_address: 0.0.0.0
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/blocks
distributor:
receivers:
otlp:
protocols:
http:
tls:
client_ca_file: /var/run/ca-receiver/http/service-ca.crt
cert_file: /var/run/tls/receiver/http/tls.crt
key_file: /var/run/tls/receiver/http/tls.key
min_version: "1.3"
usage_report:
reporting_enabled: false
`,
},
{
name: "OTLP/HTTP and OTLP/Grpc with TLS",
spec: v1alpha1.TempoMonolithicSpec{
Ingestion: &v1alpha1.MonolithicIngestionSpec{
OTLP: &v1alpha1.MonolithicIngestionOTLPSpec{
GRPC: &v1alpha1.MonolithicIngestionOTLPProtocolsGRPCSpec{
Enabled: true,
TLS: &v1alpha1.TLSSpec{
Enabled: true,
CA: "ca",
Cert: "cert",
MinVersion: "1.3",
},
},
HTTP: &v1alpha1.MonolithicIngestionOTLPProtocolsHTTPSpec{
Enabled: true,
TLS: &v1alpha1.TLSSpec{
Enabled: true,
CA: "ca",
Cert: "cert",
MinVersion: "1.3",
},
},
},
},
},
expected: `
server:
http_listen_port: 3200
internal_server:
enable: true
http_listen_address: 0.0.0.0
storage:
trace:
backend: local
wal:
path: /var/tempo/wal
local:
path: /var/tempo/blocks
distributor:
receivers:
otlp:
protocols:
http:
tls:
client_ca_file: /var/run/ca-receiver/http/service-ca.crt
cert_file: /var/run/tls/receiver/http/tls.crt
key_file: /var/run/tls/receiver/http/tls.key
min_version: "1.3"
grpc:
tls:
client_ca_file: /var/run/ca-receiver/grpc/service-ca.crt
cert_file: /var/run/tls/receiver/grpc/tls.crt
key_file: /var/run/tls/receiver/grpc/tls.key
min_version: "1.3"
usage_report:
reporting_enabled: false
`,
},
{
Expand Down

0 comments on commit c6b1049

Please sign in to comment.