Skip to content

Commit 612cd7c

Browse files
[nr-k8s-otel-collector] Add phase 1 e2e metric tests (#1750)
<!-- Thank you for contributing to New Relic's Helm charts. Before you submit this PR we'd like to make sure you are aware of our technical requirements: * https://github.com/newrelic-experimental/helm-charts/blob/master/CONTRIBUTING.md#technical-requirements For a quick overview across what we will look at reviewing your PR, please read our review guidelines: * https://github.com/newrelic-experimental/helm-charts/blob/master/REVIEW_GUIDELINES.md Following our best practices right from the start will accelerate the review process and help get your PR merged quicker. When updates to your PR are requested, please add new commits and do not squash the history. This will make it easier to identify new changes. The PR will be squashed anyways when it is merged. Thanks. For fast feedback, please @-mention maintainers that are listed in the Chart.yaml file. Please make sure you test your changes before you push them. Once pushed, a Github Action will run across your changes and do some initial checks and linting. These checks run very quickly. Please check the results. We would like these checks to pass before we even continue reviewing your changes. --> #### Is this a new chart #### What this PR does / why we need it: #### Which issue this PR fixes *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)* - fixes # #### Special notes for your reviewer: #### Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] - [x] Chart Version bumped - [x] Variables are documented in the README.md - [x] Title of the PR starts with chart name (e.g. `[mychartname]`)
1 parent 8a32b66 commit 612cd7c

21 files changed

+1101
-159
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: K8s OTEL E2E Test Suite
2+
on:
3+
pull_request:
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
# NOTICE that apart from this, the versions in the chart linter matrix needs to be bumped too.
10+
LATEST_K8S_VERSION: 'v1.32.0'
11+
MINIKUBE_VERSION: 'v1.35.0'
12+
13+
jobs:
14+
e2e-test:
15+
name: Run Tests
16+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci/skip-e2e') }}
17+
runs-on: ubuntu-latest
18+
# If the environment is broken, this job could time out since the default timeout for tilt ci is 30m.
19+
timeout-minutes: 20
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup Minikube
23+
uses: manusa/actions-setup-minikube@v2.14.0
24+
with:
25+
minikube version: ${{ env.MINIKUBE_VERSION }}
26+
kubernetes version: ${{ env.LATEST_K8S_VERSION }}
27+
# default driver doesn't support 'eval $$(minikube docker-env)'.
28+
driver: docker
29+
github token: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Run e2e-test
31+
env:
32+
SECRET_AVAILABLE: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
33+
if: ${{ env.SECRET_AVAILABLE != '' }}
34+
uses: newrelic/newrelic-integration-e2e-action@v1
35+
with:
36+
retry_seconds: 90
37+
retry_attempts: 10
38+
agent_enabled: false
39+
spec_path: charts/nr-k8s-otel-collector/e2e/test-specs.yml
40+
account_id: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
41+
api_key: ${{ secrets.K8S_AGENTS_E2E_API_KEY }}
42+
license_key: ${{ secrets.K8S_AGENTS_E2E_LICENSE_KEY }}
43+

charts/nr-k8s-otel-collector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type: application
1717
# This is the chart version. This version number should be incremented each time you make changes
1818
# to the chart and its templates, including the app version.
1919
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20-
version: 0.8.26
20+
version: 0.8.27
2121

2222
dependencies:
2323
- name: common-library

charts/nr-k8s-otel-collector/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,16 @@ install-helm-dependencies:
33
echo 'Installing Helm Dependencies nr-k8s-otel-collector-> prometheus-community...'; \
44
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
55

6+
NEWRELIC_E2E ?= go run github.com/newrelic/newrelic-integration-e2e-action@latest
7+
.PHONY: e2e-test
8+
e2e-test:
9+
$(NEWRELIC_E2E) \
10+
--commit_sha=test-string \
11+
--retry_attempts=10 \
12+
--retry_seconds=60 \
13+
--account_id=${ACCOUNT_ID} \
14+
--api_key=${API_REST_KEY} \
15+
--license_key=${LICENSE_KEY} \
16+
--spec_path=./e2e/test-specs.yml \
17+
--verbose_mode=true \
18+
--agent_enabled="false"

charts/nr-k8s-otel-collector/docs/metrics-full.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@
621621
| Kubelet | Prometheus Receiver | authentication_token_cache_request_duration_seconds | Histogram | Duration of authentication token cache requests. |
622622
| Kubelet | Prometheus Receiver | authentication_token_cache_request_total | Counter | Total count of authentication token cache requests. |
623623
| Kubelet | KubeletStats Receiver | container.cpu.time | Gauge | Total CPU time used by the container. |
624-
| Kubelet | KubeletStats Receiver | container.cpu.utilization | Gauge | CPU utilization percentage of the container. |
624+
| Kubelet | KubeletStats Receiver | container.cpu.usage | Gauge | Total CPU usage (sum of all cores per second) averaged over the sample window. |
625625
| Kubelet | KubeletStats Receiver | container.filesystem.available | Gauge | Available filesystem space for the container. |
626626
| Kubelet | KubeletStats Receiver | container.filesystem.capacity | Gauge | Total filesystem capacity for the container. |
627627
| Kubelet | KubeletStats Receiver | container.filesystem.usage | Gauge | Used filesystem space for the container. |
@@ -737,7 +737,7 @@
737737
| Kubelet | Prometheus Receiver | hidden_metrics_total | Counter | Total number of hidden metrics. |
738738
| Kubelet | KubeletStats Receiver | k8s.container.cpu_limit_utilization | Gauge | CPU utilization relative to the limit for the container. |
739739
| Kubelet | KubeletStats Receiver | k8s.node.cpu.time | Gauge | Total CPU time used by the node. |
740-
| Kubelet | KubeletStats Receiver | k8s.node.cpu.utilization | Gauge | CPU utilization percentage of the node. |
740+
| Kubelet | KubeletStats Receiver | k8s.node.cpu.usage | Gauge | Total CPU usage (sum of all cores per second) averaged over the sample window. |
741741
| Kubelet | KubeletStats Receiver | k8s.node.filesystem.available | Gauge | Available filesystem space for the node. |
742742
| Kubelet | KubeletStats Receiver | k8s.node.filesystem.capacity | Gauge | Total filesystem capacity for the node. |
743743
| Kubelet | KubeletStats Receiver | k8s.node.filesystem.usage | Gauge | Used filesystem space for the node. |

0 commit comments

Comments
 (0)