Skip to content

Commit

Permalink
fix: update Traefik to v3 to use OpenTelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
mati007thm committed Feb 15, 2024
1 parent 9c5d800 commit 5c3c125
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 15 deletions.
25 changes: 10 additions & 15 deletions dapr-distributed-calendar/traefik/traefik-dashboard-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: traefik-ingress
namespace: kube-system
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: traefik.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: traefik-dashboard
port:
number: 9000
entryPoints:
- web
routes:
- match: Host(`traefik.<ENV-NAME>-<ENV-USER-ID>-01.<ENV-ANIMAL>.<ENV-DOMAIN>`) && PathPrefix(`/`)
kind: Rule
services:
- name: traefik-dashboard
port: 9000
33 changes: 33 additions & 0 deletions dapr-distributed-calendar/traefik/traefik-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
image:
tag: "v3.0.0-beta3"
logs:
access:
enabled: true
metrics:
prometheus: null
openTelemetry:
## Address of the OpenTelemetry Collector to send metrics to.
address: "otel-dapr-collector.opentelemetry:4317"
## Enable metrics on entry points.
addEntryPointsLabels: true
## Enable metrics on routers.
addRoutersLabels: true
## Enable metrics on services.
addServicesLabels: true
## Explicit boundaries for Histogram data points.
explicitBoundaries:
- "0.1"
- "0.3"
- "1.2"
- "5.0"
## Allows reporter to send metrics to the OpenTelemetry Collector without using a secured protocol.
insecure: true
## Interval at which metrics are sent to the OpenTelemetry Collector.
pushInterval: 10s
## This instructs the reporter to send metrics to the OpenTelemetry Collector using gRPC.
grpc: true
tracing:
openTelemetry:
grpc: true
insecure: true
address: otel-dapr-collector.opentelemetry:4317
14 changes: 14 additions & 0 deletions dapr-distributed-calendar/traefik/update-traefik.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# Add the Traefik Helm repository
helm repo add traefik https://traefik.github.io/charts

# Update the Helm repositories
helm repo update

# Uninstall Traefik
helm uninstall traefik --namespace kube-system

# Reinstall Traefik
helm install traefik traefik/traefik --namespace kube-system --values traefik-values.yaml --wait

0 comments on commit 5c3c125

Please sign in to comment.