Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix e2e telemetrygen pod to enable e2e-test action #25905

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/e2e-test-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: e2e-tests-temp

on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:
env:
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Build Docker Image
run: |
make docker-otelcontribcol
- name: export image to tar
run: |
docker save otelcontribcol:latest > /tmp/otelcontribcol.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: otelcontribcol
path: /tmp/otelcontribcol.tar
kubernetes-test:
env:
KUBECONFIG: /tmp/kube-config-otelcol-e2e-testing
strategy:
matrix:
k8s-version: ["v1.26.0", "v1.25.3", "v1.24.7", "v1.23.13"]
runs-on: ubuntu-latest
needs: docker-build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ~1.20.7
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s-version }}
kubectl_version: ${{ matrix.k8s-version }}
cluster_name: kind
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: otelcontribcol
path: /tmp
- name: Load Docker image
run: |
docker load --input /tmp/otelcontribcol.tar
- name: Kind load image
run: |
kind load docker-image otelcontribcol:latest --name kind
- name: run k8sclusterreceiver e2e tests
run: |
cd receiver/k8sclusterreceiver
go test -v --tags=e2e
- name: run k8sattributesprocessor e2e tests
run: |
cd processor/k8sattributesprocessor
go test -v --tags=e2e

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
- --rate=1
- --otlp-attributes=service.name="test-{{ .DataType }}-daemonset"
- --otlp-attributes=k8s.container.name="telemetrygen"
{{- if eq .DataType "traces" }}
- --status-code=
{{- end }}
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
name: telemetrygen
restartPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
- --rate=1
- --otlp-attributes=service.name="test-{{ .DataType }}-deployment"
- --otlp-attributes=k8s.container.name="telemetrygen"
{{- if eq .DataType "traces" }}
- --status-code=
{{- end }}
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
imagePullPolicy: IfNotPresent
name: telemetrygen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
- --duration=36000s
- --otlp-attributes=service.name="test-{{ .DataType }}-job"
- --otlp-attributes=k8s.container.name="telemetrygen"
{{- if eq .DataType "traces" }}
- --status-code=
{{- end }}
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
name: telemetrygen
restartPolicy: Never
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
- --rate=1
- --otlp-attributes=service.name="test-{{ .DataType }}-statefulset"
- --otlp-attributes=k8s.container.name="telemetrygen"
{{- if eq .DataType "traces" }}
- --status-code=
{{- end }}
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
name: telemetrygen
restartPolicy: Always
Loading