diff --git a/.github/workflows/otel-integration-e2e-test.yml b/.github/workflows/otel-integration-e2e-test.yml index fdb4c0c6..4a30a997 100644 --- a/.github/workflows/otel-integration-e2e-test.yml +++ b/.github/workflows/otel-integration-e2e-test.yml @@ -40,13 +40,13 @@ jobs: KUBECONFIG: ${{ env.KUBECONFIG }} run: | cd ./otel-integration/k8s-helm + kubectl create configmap otel-hostendpoint-configmap --from-literal=hostendpoint=$HOSTENDPOINT helm dependency build helm upgrade --install otel-integration-agent-e2e . \ --set global.clusterName="otel-integration-agent-e2e" \ --set global.domain="coralogix.com" \ -f ./values.yaml \ -f ./e2e-test/testdata/values-e2e-test.yaml - kubectl set env daemonset/coralogix-opentelemetry-agent HOSTENDPOINT=${HOSTENDPOINT} kubectl wait --all --for=condition=ready --timeout=300s pod -l component=agent-collector - name: Verbose Debugging env: @@ -55,6 +55,7 @@ jobs: run: | kubectl get nodes -o wide kubectl get pods -A -o wide + kubectl get configmap otel-hostendpoint-configmap -o yaml kubectl describe daemonsets coralogix-opentelemetry-agent kubectl logs -l app.kubernetes.io/name=opentelemetry-agent - name: Run E2E test diff --git a/otel-integration/k8s-helm/e2e-test/k8s/telemetrygen/deployment.yaml b/otel-integration/k8s-helm/e2e-test/k8s/telemetrygen/deployment.yaml index f2e236a0..690e7d11 100644 --- a/otel-integration/k8s-helm/e2e-test/k8s/telemetrygen/deployment.yaml +++ b/otel-integration/k8s-helm/e2e-test/k8s/telemetrygen/deployment.yaml @@ -30,7 +30,7 @@ spec: - /telemetrygen - {{ .DataType }} - --otlp-insecure - - --otlp-endpoint={{ .OTLPEndpoint }} + - --otlp-endpoint=${K8S_NODE_IP}:4317 - --duration=36000s - --rate=1 - --otlp-attributes=service.name="test-{{ .DataType }}-deployment" diff --git a/otel-integration/k8s-helm/e2e-test/testdata/values-e2e-test.yaml b/otel-integration/k8s-helm/e2e-test/testdata/values-e2e-test.yaml index 39d43379..1447e776 100644 --- a/otel-integration/k8s-helm/e2e-test/testdata/values-e2e-test.yaml +++ b/otel-integration/k8s-helm/e2e-test/testdata/values-e2e-test.yaml @@ -1,5 +1,23 @@ # Override values for E2E test - instead of exporting to Coralogix, export to a local sink used in the E2E test opentelemetry-agent: + extraEnvs: + - name: CORALOGIX_PRIVATE_KEY + valueFrom: + secretKeyRef: + name: coralogix-keys + key: PRIVATE_KEY + - name: OTEL_RESOURCE_ATTRIBUTES + value: "k8s.node.name=$(K8S_NODE_NAME)" + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: HOSTENDPOINT + valueFrom: + configMapKeyRef: + name: otel-hostendpoint-configmap + key: HOSTENDPOINT presets: hostMetrics: enabled: true