Skip to content

[ES-364] telemetrygen e2e #307

[ES-364] telemetrygen e2e

[ES-364] telemetrygen e2e #307

name: Otel Integration Helm Lint And Install Test
on:
pull_request:
paths:
- 'otel-integration/k8s-helm/**'
jobs:
otel-integration-agent-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Setup cluster
uses: ./.github/actions/setup
with:
create-kind-cluster: "true"
cluster-name: "otel-integration-agent-e2e"
- name: Save kubeconfig to file
run: |
kubectl config view --raw > /tmp/kind-otel-integration-agent-e2e
echo "KUBECONFIG=/tmp/kind-otel-integration-agent-e2e" >> $GITHUB_ENV
- name: Get and Set Kind HostEndpoint as env variable
shell: bash
run: |
cd ./otel-integration/k8s-helm/e2e-test/testcommon
chmod +x ./get_host_endpoint.sh
./get_host_endpoint.sh
- name: Setup Secret
run: kubectl create secret generic coralogix-keys --from-literal=PRIVATE_KEY=123
- name: Install chart for testing
env:
HOSTENDPOINT: ${{ env.HOSTENDPOINT }}
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 describe daemonsets coralogix-opentelemetry-agent
kubectl wait --all --for=condition=ready --timeout=300s pod -l component=agent-collector
- name: Run E2E test
env:
HOSTENDPOINT: ${{ env.HOSTENDPOINT }}
KUBECONFIG: ${{ env.KUBECONFIG }}
run: |
cd ./otel-integration/k8s-helm/e2e-test/
set +e
go test -v -run=TestE2E_Agent ./...
set -e
- name: Verbose Debugging
env:
HOSTENDPOINT: ${{ env.HOSTENDPOINT }}
KUBECONFIG: ${{ env.KUBECONFIG }}
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