Skip to content

Commit 29cb6d1

Browse files
Merge branch 'master' into dbudziwojski/otel-improvements-follow-up
# Conflicts: # charts/nr-k8s-otel-collector/Chart.yaml # charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml # charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml
2 parents 5e5acff + 39c6f21 commit 29cb6d1

File tree

125 files changed

+7831
-2883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+7831
-2883
lines changed

.github/renovate.json5

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,5 @@
5656
],
5757
"enabled": false
5858
}
59-
],
60-
"customManagers": [
61-
{
62-
// Update Super Agent chart
63-
"customType": "regex",
64-
"fileMatch": [ "^charts/agent-control/Chart.yaml$" ],
65-
"datasourceTemplate": "docker",
66-
"depNameTemplate": "newrelic/newrelic-agent-control",
67-
"matchStrings": [
68-
"appVersion: (?<currentValue>.*) # .*"
69-
]
70-
}
7159
]
7260
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Check Generated Files
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'charts/nr-k8s-otel-collector/**'
7+
- '.github/workflows/nr-k8s-otel-e2e.yml'
8+
9+
jobs:
10+
check-generated-files:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Helm
20+
uses: azure/setup-helm@v3
21+
with:
22+
version: v3.12.0
23+
24+
- name: Add Helm repositories
25+
run: |
26+
helm repo add newrelic https://helm-charts.newrelic.com
27+
helm repo add k8s-agents-operator https://newrelic.github.io/k8s-agents-operator
28+
helm repo add k8s-metadata-injection https://newrelic.github.io/k8s-metadata-injection
29+
helm repo add newrelic-infra-operator https://newrelic.github.io/newrelic-infra-operator
30+
helm repo add newrelic-k8s-metrics-adapter https://newrelic.github.io/newrelic-k8s-metrics-adapter
31+
helm repo add newrelic-prometheus-configurator https://newrelic.github.io/newrelic-prometheus-configurator
32+
helm repo add nr-helm-charts https://newrelic.github.io/helm-charts
33+
helm repo add nri-kube-events https://newrelic.github.io/nri-kube-events
34+
helm repo add nri-kubernetes https://newrelic.github.io/nri-kubernetes
35+
helm repo add nri-prometheus https://newrelic.github.io/nri-prometheus
36+
helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts
37+
helm repo add pixie-operator https://pixie-operator-charts.storage.googleapis.com
38+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
39+
helm repo update
40+
41+
- name: Check generated example is up to date
42+
run: |
43+
make generate-examples
44+
if [ ! -z "$(git status --porcelain)" ]; then
45+
git diff
46+
exit 1
47+
fi
48+
49+
- name: Check README.md is up to date
50+
run: |
51+
go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.11.0
52+
make generate-nr-k8s-chart-docs
53+
if [ ! -z "$(git status --porcelain)" ]; then
54+
git diff
55+
exit 1
56+
fi
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: K8s OTEL E2E Test Suite
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'charts/nr-k8s-otel-collector/**'
7+
- '.github/workflows/nr-k8s-otel-e2e.yml'
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
# NOTICE that apart from this, the versions in the chart linter matrix needs to be bumped too.
14+
LATEST_K8S_VERSION: 'v1.32.0'
15+
MINIKUBE_VERSION: 'v1.35.0'
16+
17+
jobs:
18+
e2e-test:
19+
name: Run Tests
20+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci/skip-e2e') }}
21+
runs-on: ubuntu-latest
22+
# If the environment is broken, this job could time out since the default timeout for tilt ci is 30m.
23+
timeout-minutes: 20
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup Minikube
27+
uses: manusa/actions-setup-minikube@v2.14.0
28+
with:
29+
minikube version: ${{ env.MINIKUBE_VERSION }}
30+
kubernetes version: ${{ env.LATEST_K8S_VERSION }}
31+
# default driver doesn't support 'eval $$(minikube docker-env)'.
32+
driver: docker
33+
github token: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Run e2e-test
35+
env:
36+
SECRET_AVAILABLE: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
37+
if: ${{ env.SECRET_AVAILABLE != '' }}
38+
uses: newrelic/newrelic-integration-e2e-action@v1
39+
with:
40+
retry_seconds: 90
41+
retry_attempts: 10
42+
agent_enabled: false
43+
spec_path: charts/nr-k8s-otel-collector/e2e/test-specs.yml
44+
account_id: ${{ secrets.K8S_AGENTS_E2E_ACCOUNT_ID }}
45+
api_key: ${{ secrets.K8S_AGENTS_E2E_API_KEY }}
46+
license_key: ${{ secrets.K8S_AGENTS_E2E_LICENSE_KEY }}
47+

CODEOWNERS

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121

2222
# Infrastructure-related charts
2323
/charts/nri-statsd/ @newrelic/ohai
24-
/charts/super-agent-deployment/ @newrelic/ac @newrelic/ohai
25-
/charts/super-agent/ @newrelic/ac @newrelic/ohai
26-
/charts/agent-control/ @newrelic/ac @newrelic/ohai
24+
25+
# Agent Control charts
26+
/charts/agent-control-deployment/ @newrelic/ac
27+
/charts/agent-control/ @newrelic/ac
2728

2829
# pipeline-control-gateway
29-
/charts/pipeline-control-gateway/ @newrelic/pcon
30+
/charts/pipeline-control-gateway/ @newrelic/pcon

Makefile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
TMP_DIRECTORY = ./tmp
2+
CHARTS ?= nr-k8s-otel-collector
3+
4+
.PHONY: generate-examples
5+
generate-examples:
6+
for chart_name in $(CHARTS); do \
7+
make install-helm-dependencies -C charts/$${chart_name}; \
8+
helm dependency build charts/$${chart_name}; \
9+
EXAMPLES_DIR=charts/$${chart_name}/examples; \
10+
EXAMPLES=$$(find $${EXAMPLES_DIR} -maxdepth 1 -mindepth 1 -type d -exec basename \{\} \;); \
11+
for example in $${EXAMPLES}; do \
12+
echo "Generating example: $${example}"; \
13+
VALUES=$$(find $${EXAMPLES_DIR}/$${example} -name *values.yaml); \
14+
rm -rf "$${EXAMPLES_DIR}/$${example}/rendered"; \
15+
for value in $${VALUES}; do \
16+
helm template "$${chart_name}" charts/$${chart_name} --namespace newrelic --set licenseKey='<NR_licenseKey>' --set cluster='<cluser_name>' --values $${value} --output-dir "$${EXAMPLES_DIR}/$${example}/rendered"; \
17+
mv $${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}/templates/* "$${EXAMPLES_DIR}/$${example}/rendered"; \
18+
SUBCHARTS_DIR=$${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}/charts; \
19+
if [ -d "$${SUBCHARTS_DIR}" ]; then \
20+
SUBCHARTS=$$(find $${SUBCHARTS_DIR} -maxdepth 1 -mindepth 1 -type d -exec basename \{\} \;); \
21+
for subchart in $${SUBCHARTS}; do \
22+
mkdir -p "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
23+
mv $${SUBCHARTS_DIR}/$${subchart}/templates/* "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
24+
done; \
25+
fi; \
26+
rm -rf $${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}; \
27+
done; \
28+
done; \
29+
done
30+
31+
HELM_DOCS ?= go run github.com/norwoodj/helm-docs/cmd/helm-docs@latest
32+
.PHONY: generate-nr-k8s-chart-docs
33+
generate-nr-k8s-chart-docs:
34+
$(HELM_DOCS) -c charts/nr-k8s-otel-collector

charts/agent-control/charts/agent-control-deployment/.helmignore renamed to charts/agent-control-deployment/.helmignore

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common-library
3+
repository: https://helm-charts.newrelic.com
4+
version: 1.3.3
5+
digest: sha256:0ba54a189b03d9104713cb93542f6df09c0fa3546e785fb71fe679c1a6426d8a
6+
generated: "2025-06-26T12:57:00.46884+02:00"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v2
2+
name: agent-control-deployment
3+
description: A Helm chart to install New Relic Agent Control on Kubernetes
4+
5+
type: application
6+
7+
version: 0.0.56
8+
appVersion: "0.40.0"
9+
10+
dependencies:
11+
- name: common-library
12+
version: 1.3.3
13+
repository: https://helm-charts.newrelic.com
14+
15+
keywords:
16+
- newrelic
17+
- agent-control
18+
19+
maintainers:
20+
# Agent Control Team
21+
- name: ac
22+
url: https://github.com/orgs/newrelic/teams/ac/members
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
2+
3+
# agent-control-deployment
4+
5+
A Helm chart to install New Relic Agent Control on Kubernetes
6+
7+
# Helm installation
8+
9+
This chart is not intended to be installed on its own. Instead, it is designed to be installed as part of the [agent-control](https://github.com/newrelic/helm-charts/tree/master/charts/agent-control) chart.
10+
11+
## Values managed globally
12+
13+
This chart implements the [New Relic's common Helm library](https://github.com/newrelic/helm-charts/tree/master/library/common-library) which
14+
means that it honors a wide range of defaults and globals common to most New Relic Helm charts.
15+
16+
Options that can be defined globally include `affinity`, `nodeSelector`, `tolerations`, `proxy` and others. The full list can be found at
17+
[user's guide of the common library](https://github.com/newrelic/helm-charts/blob/master/library/common-library/README.md).
18+
19+
## Values
20+
21+
| Key | Type | Default | Description |
22+
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | Sets pod/node affinities. Can be configured also with `global.affinity` |
24+
| cluster | string | `""` | Name of the Kubernetes cluster monitored. Can be configured also with `global.cluster`. |
25+
| config.agentControl | object | See `values.yaml` | Configuration for the Agent Control. |
26+
| config.agentControl.content | object | `{}` | Overrides the configuration that has been created automatically by the chart. This configuration here will be **MERGED** with the configuration specified above. If you need to have you own configuration, disabled the creation of this configMap and create your own. |
27+
| config.agentControl.create | bool | `true` | Set if the configMap is going to be created by this chart or the user will provide its own. |
28+
| config.fleet_control.auth.organizationId | string | `""` | Organization ID where fleets will live. |
29+
| config.fleet_control.auth.secret.client_id.base64 | string | `nil` | In case `.config.auth.secret.create` is true, you can set these keys to set client ID directly as base64 if you want to skip its creation. This options is mutually exclusive with `plain`. |
30+
| config.fleet_control.auth.secret.client_id.plain | string | `nil` | In case `.config.auth.secret.create` is true, you can set these keys to set client ID directly as plain text if you want to skip its creation. This options is mutually exclusive with `base64`. |
31+
| config.fleet_control.auth.secret.client_id.secret_key | string | `client_id` | Key inside the secret containing the client ID. |
32+
| config.fleet_control.auth.secret.create | bool | `true` | |
33+
| config.fleet_control.auth.secret.name | string | release name suffixed with "-auth" | Name auth' secret provided by the user. If the creation of this secret is set to `true`, this is the same the secret will have. |
34+
| config.fleet_control.auth.secret.private_key.base64_pem | string | `nil` | In case `.config.auth.secret.create` is true, you can set these keys to set private key directly as base64 if you want to skip its creation. This options is mutually exclusive with `plain_pem`. |
35+
| config.fleet_control.auth.secret.private_key.plain_pem | string | `nil` | In case `.config.auth.secret.create` is true, you can set these keys to set private key directly as plain text if you want to skip its creation. This options is mutually exclusive with `base64_pem`. |
36+
| config.fleet_control.auth.secret.private_key.secret_key | string | `private_key` | Key inside the secret containing the private key. |
37+
| config.fleet_control.enabled | bool | `true` | Enables or disables the auth against fleet control. It implies to disable any fleet communication and running the agent in stand alone mode where only the agents specified on `.config.subAgents` will be launched. |
38+
| config.fleet_control.fleet_id | string | `""` | Specify a fleet_id to automatically connect the Agent Control to an existing fleet. |
39+
| config.status_server.port | int | See `values.yaml` | Set the status server port |
40+
| config.subAgents | string | `{}` (See `values.yaml`) | List of managed agents that will be deployed. The key represents the name of the agent and the value holds the configuration. |
41+
| containerSecurityContext | object | `{}` | Sets security context (at container level). Can be configured also with `global.containerSecurityContext` |
42+
| customIdentityClientIdSecretKey | string | `""` | |
43+
| customIdentityClientSecretSecretKey | string | `""` | |
44+
| customIdentitySecretName | string | `""` | In case you don't want to have the client_id and client_secret in your values, this allows you to point to a user created secret to get the key from there. |
45+
| customSecretLicenseKey | string | `""` | In case you don't want to have the license key in you values, this allows you to point to which secret key is the license key located. Can be configured also with `global.customSecretLicenseKey` |
46+
| customSecretName | string | `""` | In case you don't want to have the license key in you values, this allows you to point to a user created secret to get the key from there. Can be configured also with `global.customSecretName` |
47+
| dnsConfig | object | `{}` | Sets pod's dnsConfig. Can be configured also with `global.dnsConfig` |
48+
| extraEnv | list | `[]` | Add user environment variables to the agent |
49+
| extraEnvFrom | list | `[]` | Add user environment from configMaps or secrets as variables to the agent |
50+
| extraVolumeMounts | list | `[]` | Defines where to mount volumes specified with `extraVolumes` |
51+
| extraVolumes | list | `[]` | Volumes to mount in the containers |
52+
| hostNetwork | bool | `false` | Sets pod's hostNetwork. Can be configured also with `global.hostNetwork` |
53+
| identityClientId | string | `""` | Identity client_id to use. |
54+
| identityClientSecret | string | `""` | Identity client_secret to use. |
55+
| image | object | See `values.yaml` | Image for the New Relic Agent Control |
56+
| image.pullSecrets | list | `[]` | The secrets that are needed to pull images from a custom registry. |
57+
| labels | object | `{}` | Additional labels for chart objects. Can be configured also with `global.labels` |
58+
| licenseKey | string | `""` | This set this license key to use. Can be configured also with `global.licenseKey` |
59+
| nameOverride | string | See `values.yaml` | Override the name of the chart used to template resource names. |
60+
| nodeSelector | object | `{}` | Sets pod's node selector. Can be configured also with `global.nodeSelector` |
61+
| nrStaging | bool | `false` | Send the metrics to the staging backend. Requires a valid staging license key. Can be configured also with `global.nrStaging` |
62+
| podAnnotations | object | `{}` | Annotations to be added to all pods created by the integration. |
63+
| podLabels | object | `{}` | Additional labels for chart pods. Can be configured also with `global.podLabels` |
64+
| podSecurityContext | object | `{}` | Sets security context (at pod level). Can be configured also with `global.podSecurityContext` |
65+
| priorityClassName | string | `""` | Sets pod's priorityClassName. Can be configured also with `global.priorityClassName` |
66+
| rbac.create | bool | `true` | Whether the chart should automatically create the RBAC objects required to run. |
67+
| resources | object | `{}` | Resource limits to be added to all pods created by the integration. |
68+
| serviceAccount | object | See `values.yaml` | Settings controlling ServiceAccount creation. |
69+
| serviceAccount.create | bool | `true` | Whether the chart should automatically create the ServiceAccount objects required to run. |
70+
| systemIdentityRegistration | object | See `values.yaml` | Image for the system identity registration process |
71+
| tolerations | list | `[]` | Sets pod's tolerations to node taints. Can be configured also with `global.tolerations` |
72+
| verboseLog | bool | `false` | Sets the debug logs to this integration or all integrations if it is set globally. Can be configured also with `global.verboseLog` |
73+
74+
## Maintainers
75+
76+
* [ac](https://github.com/orgs/newrelic/teams/ac/members)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
2+
3+
{{ template "chart.header" . }}
4+
{{ template "chart.deprecationWarning" . }}
5+
6+
{{ template "chart.description" . }}
7+
8+
{{ template "chart.homepageLine" . }}
9+
10+
# Helm installation
11+
12+
This chart is not intended to be installed on its own. Instead, it is designed to be installed as part of the [agent-control](https://github.com/newrelic/helm-charts/tree/master/charts/agent-control) chart.
13+
14+
{{ template "chart.sourcesSection" . }}
15+
16+
## Values managed globally
17+
18+
This chart implements the [New Relic's common Helm library](https://github.com/newrelic/helm-charts/tree/master/library/common-library) which
19+
means that it honors a wide range of defaults and globals common to most New Relic Helm charts.
20+
21+
Options that can be defined globally include `affinity`, `nodeSelector`, `tolerations`, `proxy` and others. The full list can be found at
22+
[user's guide of the common library](https://github.com/newrelic/helm-charts/blob/master/library/common-library/README.md).
23+
24+
{{ template "chart.valuesSection" . }}
25+
26+
{{ if .Maintainers }}
27+
## Maintainers
28+
{{ range .Maintainers }}
29+
{{- if .Name }}
30+
{{- if .Url }}
31+
* [{{ .Name }}]({{ .Url }})
32+
{{- else }}
33+
* {{ .Name }}
34+
{{- end }}
35+
{{- end }}
36+
{{- end }}
37+
{{- end }}

0 commit comments

Comments
 (0)