Skip to content

Commit 5b8c552

Browse files
Merge branch 'master' into pbeckwith/otel-pipelines
2 parents 2cce73e + 612cd7c commit 5b8c552

File tree

17 files changed

+1117
-161
lines changed

17 files changed

+1117
-161
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/agent-control/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: agent-control
33
description: Bootstraps New Relic' Agent Control
44

55
type: application
6-
version: 0.0.68
6+
version: 0.0.69
77
# This is the agent-control-deployment chart version.
88
appVersion: 0.0.52
99

charts/agent-control/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ agent-control-deployment:
7474
| agent-control-deployment | object | See `values.yaml` | Values for the agent-control-deployment chart. Ref.: https://github.com/newrelic/helm-charts/blob/master/charts/agent-control-deployment/values.yaml |
7575
| agent-control-deployment.chartRepositoryUrl | string | `"https://helm-charts.newrelic.com"` | The repository URL from where the `agent-control-deployment` chart will be installed. |
7676
| agent-control-deployment.enabled | bool | `true` | Enable the installation of the Agent Control. |
77-
| agent-control-deployment.toolkitImage | object | `{"pullPolicy":"IfNotPresent","pullSecrets":[],"registry":null,"repository":"newrelic/newrelic-agent-control-cli","tag":"nightly"}` | The image that contains the necessary tools to install and uninstall Agent Control. |
78-
| agent-control-deployment.toolkitImage.pullSecrets | list | `[]` | The secrets that are needed to pull images from a custom registry. |
7977
| flux2 | object | See `values.yaml` | Values for the Flux chart. Ref.: https://github.com/fluxcd-community/helm-charts/blob/flux2-2.10.2/charts/flux2/values.yaml |
8078
| flux2.clusterDomain | string | `"cluster.local"` | This is the domain name of the cluster. |
8179
| flux2.enabled | bool | `true` | Enable or disable FluxCD installation. New Relic' Agent Control need Flux to work, but the user can use an already existing Flux deployment. With that use case, the use can disable Flux and use this chart to only install the CRs to deploy the Agent Control. |
@@ -86,6 +84,8 @@ agent-control-deployment:
8684
| flux2.watchAllNamespaces | bool | `false` | As we are using Flux as a tool from the agent control to release new workloads, we do not want Flux to listen to all CRs created on the whole cluster. If the user does not want to use Flux and is only using it because of the agent control, this is the way to go so the cluster has deployed all operators needed by the agent control. But if the user want to use Flux for other purposes besides the agent control, this toggle can be used to allow Flux to work on the whole cluster. |
8785
| fullnameOverride | string | `""` | Override the full name of the release |
8886
| nameOverride | string | `""` | Override the name of the chart |
87+
| toolkitImage | object | `{"pullPolicy":"IfNotPresent","pullSecrets":[],"registry":null,"repository":"newrelic/newrelic-agent-control-cli","tag":"nightly"}` | The image that contains the necessary tools to install and uninstall Agent Control. |
88+
| toolkitImage.pullSecrets | list | `[]` | The secrets that are needed to pull images from a custom registry. |
8989

9090
## Maintainers
9191

charts/agent-control/templates/install.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
serviceAccountName: {{ include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" .Release.Name "suffix" "install-job") }}
1919
containers:
2020
- name: install-agent-control-deployment
21-
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" (index .Values "agent-control-deployment").toolkitImage "context" .) }}
22-
imagePullPolicy: {{ (index .Values "agent-control-deployment").toolkitImage.pullPolicy }}
21+
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" .Values.toolkitImage "context" .) }}
22+
imagePullPolicy: {{ .Values.toolkitImage.pullPolicy }}
2323
resources:
2424
limits:
2525
cpu: 100m

charts/agent-control/templates/uninstall.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
serviceAccountName: {{ include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" .Release.Name "suffix" "uninstall-job") }}
1919
containers:
2020
- name: uninstall-agent-control-deployment
21-
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" (index .Values "agent-control-deployment").toolkitImage "context" .) }}
22-
imagePullPolicy: {{ (index .Values "agent-control-deployment").toolkitImage.pullPolicy }}
21+
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" .Values.toolkitImage "context" .) }}
22+
imagePullPolicy: {{ .Values.toolkitImage.pullPolicy }}
2323
resources:
2424
limits:
2525
cpu: 100m

charts/agent-control/tests/install_test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
suite: Validate AC Installation
22
tests:
3+
- it: should leverage correct image tag
4+
set:
5+
toolkitImage:
6+
tag: 123
7+
repository: test
8+
asserts:
9+
- template: templates/install.yaml
10+
equal:
11+
path: spec.template.spec.containers[0].image
12+
value: "test:123"
13+
- template: templates/uninstall.yaml
14+
equal:
15+
path: spec.template.spec.containers[0].image
16+
value: "test:123"
317
- it: should allow custom repositoryUrl
418
set:
519
agent-control-deployment:

charts/agent-control/values.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ nameOverride: ""
33
# -- Override the full name of the release
44
fullnameOverride: ""
55

6+
# -- The image that contains the necessary tools to install and uninstall Agent Control.
7+
toolkitImage:
8+
registry:
9+
repository: newrelic/newrelic-agent-control-cli
10+
# @default It defaults to `appVersion` in `Chart.yaml`.
11+
tag: nightly
12+
pullPolicy: IfNotPresent
13+
# -- The secrets that are needed to pull images from a custom registry.
14+
pullSecrets: []
15+
616
# -- Values for the agent-control-deployment chart. Ref.: https://github.com/newrelic/helm-charts/blob/master/charts/agent-control-deployment/values.yaml
717
# @default -- See `values.yaml`
818
agent-control-deployment:
@@ -12,16 +22,6 @@ agent-control-deployment:
1222
# -- The repository URL from where the `agent-control-deployment` chart will be installed.
1323
chartRepositoryUrl: https://helm-charts.newrelic.com
1424

15-
# -- The image that contains the necessary tools to install and uninstall Agent Control.
16-
toolkitImage:
17-
registry:
18-
repository: newrelic/newrelic-agent-control-cli
19-
# @default It defaults to `appVersion` in `Chart.yaml`.
20-
tag: nightly
21-
pullPolicy: IfNotPresent
22-
# -- The secrets that are needed to pull images from a custom registry.
23-
pullSecrets: []
24-
2525
# -- Values for the Flux chart. Ref.: https://github.com/fluxcd-community/helm-charts/blob/flux2-2.10.2/charts/flux2/values.yaml
2626
# @default -- See `values.yaml`
2727
flux2:

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)