diff options
Diffstat (limited to 'f3s/tracing-demo/helm-chart')
8 files changed, 235 insertions, 0 deletions
diff --git a/f3s/tracing-demo/helm-chart/Chart.yaml b/f3s/tracing-demo/helm-chart/Chart.yaml new file mode 100644 index 0000000..c884ea0 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: tracing-demo +description: A Helm chart for deploying distributed tracing demo application (Frontend, Middleware, Backend) +version: 0.1.0 +appVersion: "1.0.0" diff --git a/f3s/tracing-demo/helm-chart/templates/backend-deployment.yaml b/f3s/tracing-demo/helm-chart/templates/backend-deployment.yaml new file mode 100644 index 0000000..0a1f831 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/backend-deployment.yaml @@ -0,0 +1,51 @@ +# Backend Service Deployment +# Returns data (simulates database queries) +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tracing-demo-backend + namespace: services + labels: + app: tracing-demo-backend + component: backend +spec: + replicas: 1 + selector: + matchLabels: + app: tracing-demo-backend + template: + metadata: + labels: + app: tracing-demo-backend + component: backend + spec: + containers: + - name: backend + image: registry.lan.buetow.org:30001/tracing-demo-backend:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 5002 + name: http + protocol: TCP + env: + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "http://alloy.monitoring.svc.cluster.local:4317" + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi + livenessProbe: + httpGet: + path: /health + port: 5002 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: 5002 + initialDelaySeconds: 5 + periodSeconds: 5 diff --git a/f3s/tracing-demo/helm-chart/templates/backend-service.yaml b/f3s/tracing-demo/helm-chart/templates/backend-service.yaml new file mode 100644 index 0000000..a7f6e61 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/backend-service.yaml @@ -0,0 +1,17 @@ +# Backend Service +# Exposes the backend deployment within the cluster +apiVersion: v1 +kind: Service +metadata: + name: backend-service + namespace: services + labels: + app: tracing-demo-backend +spec: + ports: + - name: http + port: 5002 + protocol: TCP + targetPort: 5002 + selector: + app: tracing-demo-backend diff --git a/f3s/tracing-demo/helm-chart/templates/frontend-deployment.yaml b/f3s/tracing-demo/helm-chart/templates/frontend-deployment.yaml new file mode 100644 index 0000000..f607b01 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/frontend-deployment.yaml @@ -0,0 +1,53 @@ +# Frontend Service Deployment +# Receives HTTP requests and forwards to middleware +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tracing-demo-frontend + namespace: services + labels: + app: tracing-demo-frontend + component: frontend +spec: + replicas: 1 + selector: + matchLabels: + app: tracing-demo-frontend + template: + metadata: + labels: + app: tracing-demo-frontend + component: frontend + spec: + containers: + - name: frontend + image: registry.lan.buetow.org:30001/tracing-demo-frontend:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 5000 + name: http + protocol: TCP + env: + - name: MIDDLEWARE_URL + value: "http://middleware-service.services.svc.cluster.local:5001" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "http://alloy.monitoring.svc.cluster.local:4317" + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi + livenessProbe: + httpGet: + path: /health + port: 5000 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: 5000 + initialDelaySeconds: 5 + periodSeconds: 5 diff --git a/f3s/tracing-demo/helm-chart/templates/frontend-service.yaml b/f3s/tracing-demo/helm-chart/templates/frontend-service.yaml new file mode 100644 index 0000000..d45dd2a --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/frontend-service.yaml @@ -0,0 +1,17 @@ +# Frontend Service +# Exposes the frontend deployment within the cluster +apiVersion: v1 +kind: Service +metadata: + name: frontend-service + namespace: services + labels: + app: tracing-demo-frontend +spec: + ports: + - name: http + port: 5000 + protocol: TCP + targetPort: 5000 + selector: + app: tracing-demo-frontend diff --git a/f3s/tracing-demo/helm-chart/templates/ingress.yaml b/f3s/tracing-demo/helm-chart/templates/ingress.yaml new file mode 100644 index 0000000..f080761 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/ingress.yaml @@ -0,0 +1,22 @@ +# Ingress for Frontend Service +# Exposes the tracing demo application at tracing-demo.f3s.buetow.org +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: tracing-demo-ingress + namespace: services + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: tracing-demo.f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: frontend-service + port: + number: 5000 diff --git a/f3s/tracing-demo/helm-chart/templates/middleware-deployment.yaml b/f3s/tracing-demo/helm-chart/templates/middleware-deployment.yaml new file mode 100644 index 0000000..cae0c59 --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/middleware-deployment.yaml @@ -0,0 +1,53 @@ +# Middleware Service Deployment +# Transforms data and calls backend +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tracing-demo-middleware + namespace: services + labels: + app: tracing-demo-middleware + component: middleware +spec: + replicas: 1 + selector: + matchLabels: + app: tracing-demo-middleware + template: + metadata: + labels: + app: tracing-demo-middleware + component: middleware + spec: + containers: + - name: middleware + image: registry.lan.buetow.org:30001/tracing-demo-middleware:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 5001 + name: http + protocol: TCP + env: + - name: BACKEND_URL + value: "http://backend-service.services.svc.cluster.local:5002" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: "http://alloy.monitoring.svc.cluster.local:4317" + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 100m + memory: 128Mi + livenessProbe: + httpGet: + path: /health + port: 5001 + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: 5001 + initialDelaySeconds: 5 + periodSeconds: 5 diff --git a/f3s/tracing-demo/helm-chart/templates/middleware-service.yaml b/f3s/tracing-demo/helm-chart/templates/middleware-service.yaml new file mode 100644 index 0000000..08c325b --- /dev/null +++ b/f3s/tracing-demo/helm-chart/templates/middleware-service.yaml @@ -0,0 +1,17 @@ +# Middleware Service +# Exposes the middleware deployment within the cluster +apiVersion: v1 +kind: Service +metadata: + name: middleware-service + namespace: services + labels: + app: tracing-demo-middleware +spec: + ports: + - name: http + port: 5001 + protocol: TCP + targetPort: 5001 + selector: + app: tracing-demo-middleware |
