From 2244f1f40cad4da197db259794149e663b1ae261 Mon Sep 17 00:00:00 2001 From: demo-bot Date: Fri, 17 Apr 2026 11:21:33 +0000 Subject: [PATCH] feat: add service discovery, OTel instrumentation, and k6 load tests --- overlays/otel/kustomization.yaml | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 overlays/otel/kustomization.yaml diff --git a/overlays/otel/kustomization.yaml b/overlays/otel/kustomization.yaml new file mode 100644 index 0000000..d0e279e --- /dev/null +++ b/overlays/otel/kustomization.yaml @@ -0,0 +1,68 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../deploy +patches: +- target: + kind: Deployment + name: redis-cart + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: redis-cart\nspec:\n\ + \ template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-python:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ redis\n env:\n - name: OTEL_SERVICE_NAME\n value: redis-cart\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: adservice + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: adservice\nspec:\n\ + \ template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-java:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ server\n env:\n - name: OTEL_SERVICE_NAME\n value: adservice\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: currencyservice + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: currencyservice\n\ + spec:\n template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-nodejs:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ server\n env:\n - name: OTEL_SERVICE_NAME\n value: currencyservice\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: emailservice + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: emailservice\n\ + spec:\n template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-python:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ server\n env:\n - name: OTEL_SERVICE_NAME\n value: emailservice\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: loadgenerator + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: loadgenerator\n\ + spec:\n template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-python:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ main\n env:\n - name: OTEL_SERVICE_NAME\n value: loadgenerator\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: paymentservice + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: paymentservice\n\ + spec:\n template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-nodejs:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ server\n env:\n - name: OTEL_SERVICE_NAME\n value: paymentservice\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n" +- target: + kind: Deployment + name: recommendationservice + patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: recommendationservice\n\ + spec:\n template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-python:\ + \ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\ + \ server\n env:\n - name: OTEL_SERVICE_NAME\n value: recommendationservice\n\ + \ - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\ + \ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=security-scan-test\n"