Skip to content

Commit

Permalink
Merge pull request #17 from akash4sh/main
Browse files Browse the repository at this point in the history
Add ingressroute for otel-collector
  • Loading branch information
jebjohns authored Nov 1, 2023
2 parents 469bbf0 + 0d69f41 commit 57a4fdd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
6 changes: 0 additions & 6 deletions charts/tracetest/Chart.lock

This file was deleted.

2 changes: 1 addition & 1 deletion charts/tracetest/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ name: tracetest
sources:
- https://github.com/kubeshop/helm-charts/tree/main/charts
type: application
version: 1.0.0
version: 1.0.1
26 changes: 26 additions & 0 deletions charts/tracetest/templates/otel-collector-ingress_route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if .Values.otelCollector.ingressRoute.enabled -}}
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: {{ include "tracetest.fullname" . }}-otel-collector
{{- with .Values.otelCollector.ingressRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`{{ .Values.otelCollector.ingressRoute.host }}`)
services:
- name: {{ include "tracetest.fullname" . }}-otel-collector
port: {{ .Values.otelCollector.ingressRoute.service.port }}
scheme: h2c
{{- if .Values.otelCollector.ingressRoute.tls }}
tls:
{{- range .Values.otelCollector.ingressRoute.tls }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/tracetest/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,15 @@ otelCollector:
# -- Protocol to use for OTLP HTTP
protocol: TCP

ingressRoute:
enabled: false
annotations: {}
host: "otelcollector.domain.com"
service:
port: 4317
tls: []
# - secretName: chart-example-tls

ingress:
# -- Enable ingress for OtelCollector
enabled: false
Expand Down

0 comments on commit 57a4fdd

Please sign in to comment.