Skip to content

Commit

Permalink
improve how env is passed to collector, fix how deployment's node ip …
Browse files Browse the repository at this point in the history
…is enabled.
  • Loading branch information
ryantanjunming committed Nov 19, 2024
1 parent faecb6c commit 43edcda
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/otel-integration-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
18 changes: 18 additions & 0 deletions otel-integration/k8s-helm/e2e-test/testdata/values-e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 43edcda

Please sign in to comment.