From 0d69f4153621963c7866ff1624e16ddc7572c193 Mon Sep 17 00:00:00 2001 From: Akash LM Date: Wed, 1 Nov 2023 12:49:24 +0530 Subject: [PATCH] Add ingressroute for otel-collector --- charts/tracetest/Chart.lock | 6 ----- charts/tracetest/Chart.yaml | 2 +- .../otel-collector-ingress_route.yaml | 26 +++++++++++++++++++ charts/tracetest/values.yaml | 9 +++++++ 4 files changed, 36 insertions(+), 7 deletions(-) delete mode 100644 charts/tracetest/Chart.lock create mode 100644 charts/tracetest/templates/otel-collector-ingress_route.yaml diff --git a/charts/tracetest/Chart.lock b/charts/tracetest/Chart.lock deleted file mode 100644 index aac1283736..0000000000 --- a/charts/tracetest/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 12.1.6 -digest: sha256:1d322085e38b82a7c8cb3c1b0d1ff2841b81ab16215e75991fd7fa7d8ff57087 -generated: "2023-07-18T22:27:46.219176844Z" diff --git a/charts/tracetest/Chart.yaml b/charts/tracetest/Chart.yaml index 3e4fb82434..a7e094ba61 100644 --- a/charts/tracetest/Chart.yaml +++ b/charts/tracetest/Chart.yaml @@ -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 diff --git a/charts/tracetest/templates/otel-collector-ingress_route.yaml b/charts/tracetest/templates/otel-collector-ingress_route.yaml new file mode 100644 index 0000000000..51cecbe2e1 --- /dev/null +++ b/charts/tracetest/templates/otel-collector-ingress_route.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/tracetest/values.yaml b/charts/tracetest/values.yaml index 07b061e879..34598a1be1 100644 --- a/charts/tracetest/values.yaml +++ b/charts/tracetest/values.yaml @@ -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