Skip to content

Commit 8e2bb22

Browse files
authored
Merge branch 'master' into updateKsmNriBundle
2 parents 8df44b2 + 585b9c6 commit 8e2bb22

32 files changed

+1967
-1563
lines changed

charts/agent-control-bootstrap/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: agent-control-bootstrap
33
description: Bootstraps New Relic' Agent Control
44

55
type: application
6-
version: 1.0.3
6+
version: 1.0.5
77
# agent-control-deployment chart default version.
8-
appVersion: 1.0.3
8+
appVersion: 1.0.5
99
annotations:
1010
# agent-control-cd chart default version.
1111
agentControlCdVersion: 1.0.0

charts/agent-control-deployment/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ description: A Helm chart to install New Relic Agent Control on Kubernetes
44

55
type: application
66

7-
version: 1.0.3
8-
appVersion: "1.1.0"
7+
version: 1.0.5
8+
appVersion: "1.3.1"
99

1010
dependencies:
1111
- name: common-library

charts/agent-control-deployment/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ log:
130130
<td>`{}`</td>
131131
<td>Overrides the configuration that has been created automatically by the chart. This configuration here will be **MERGED** with the configuration specified above.</td>
132132
</tr>
133+
<tr>
134+
<td>config.secretsProviders</td>
135+
<td>object</td>
136+
<td>`{}` (See <a href="values.yaml">values.yaml</a>)</td>
137+
<td>List of external secrets providers configurations. Agent Control supports the following external secrets providers types: - vault k8s secrets and env vars are used by default. ```yaml secretsProviders: # -- External secret provider type vault: # -- List of sources from where to get secrets sources: # -- Source name (chosen by the user) sourceA: # -- URL of the vault server url: urlA # -- Token to access the vault token: tokenA # -- Vault engine version engine: kv1 sourceB: url: urlB token: tokenB engine: kv2 # -- Client timeout for requests to the vault client_timeout: 10s # -- Proxy settings for the vault # -- See `proxy` value in that same file proxy: ... ``` </td>
138+
</tr>
133139
<tr>
134140
<td>config.status_server</td>
135141
<td>object</td>

charts/agent-control-deployment/templates/_helpers.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ cluster name, licenses, and custom attributes
9898
{{- $config = mustMerge $config (dict "proxy" .) -}}
9999
{{- end -}}
100100

101+
{{- /* Add secrets providers */ -}}
102+
{{- with .Values.config.secretsProviders -}}
103+
{{- $config = mustMerge $config (dict "secrets_providers" .) -}}
104+
{{- end -}}
105+
106+
101107
{{- /* Add Chart Repo url list to the allowed variants */ -}}
102108
{{- if (.Values.config.allowedChartRepositoryUrl) -}}
103109
{{- $allowedVariants := dict "variants" (dict "chart_repository_urls" .Values.config.allowedChartRepositoryUrl) -}}

charts/agent-control-deployment/tests/configmap_agentcontrol_config_test.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,55 @@ tests:
525525
enabled: true
526526
host: 0.0.0.0
527527
port: 51200
528+
529+
- it: set up secrets providers
530+
set:
531+
cluster: my-cluster
532+
config:
533+
secretsProviders:
534+
vault:
535+
sources:
536+
sourceA:
537+
url: urlA
538+
token: tokenA
539+
engine: kv1
540+
sourceB:
541+
url: urlB
542+
token: tokenB
543+
engine: kv2
544+
asserts:
545+
- equal:
546+
path: data["local_config"]
547+
value: |
548+
agents: {}
549+
fleet_control:
550+
auth_config:
551+
private_key_path: /etc/newrelic-agent-control/keys/from-secret.key
552+
provider: local
553+
token_url: https://system-identity-oauth.service.newrelic.com/oauth2/token
554+
endpoint: https://opamp.service.newrelic.com/v1/opamp
555+
signature_validation:
556+
public_key_server_url: https://publickeys.newrelic.com/r/blob-management/global/agentconfiguration/jwks.json
557+
k8s:
558+
ac_release_name: my-release
559+
ac_remote_update: true
560+
cd_release_name: agent-control-cd
561+
cd_remote_update: true
562+
cluster_name: my-cluster
563+
namespace: my-namespace
564+
namespace_agents: newrelic
565+
secrets_providers:
566+
vault:
567+
sources:
568+
sourceA:
569+
engine: kv1
570+
token: tokenA
571+
url: urlA
572+
sourceB:
573+
engine: kv2
574+
token: tokenB
575+
url: urlB
576+
server:
577+
enabled: true
578+
host: 0.0.0.0
579+
port: 51200

charts/agent-control-deployment/values.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,42 @@ config:
174174
# -- Specify a fleet_id to automatically connect the Agent Control to an existing fleet.
175175
fleet_id: ""
176176

177+
# -- List of external secrets providers configurations.
178+
#
179+
# Agent Control supports the following external secrets providers types:
180+
# - vault
181+
#
182+
# k8s secrets and env vars are used by default.
183+
#
184+
# ```yaml
185+
# secretsProviders:
186+
# # -- External secret provider type
187+
# vault:
188+
# # -- List of sources from where to get secrets
189+
# sources:
190+
# # -- Source name (chosen by the user)
191+
# sourceA:
192+
# # -- URL of the vault server
193+
# url: urlA
194+
# # -- Token to access the vault
195+
# token: tokenA
196+
# # -- Vault engine version
197+
# engine: kv1
198+
# sourceB:
199+
# url: urlB
200+
# token: tokenB
201+
# engine: kv2
202+
# # -- Client timeout for requests to the vault
203+
# client_timeout: 10s
204+
# # -- Proxy settings for the vault
205+
# # -- See `proxy` value in that same file
206+
# proxy:
207+
# ...
208+
# ```
209+
#
210+
# @default -- `{}` (See <a href="values.yaml">values.yaml</a>)
211+
secretsProviders: {}
212+
177213
# -- Overrides the configuration that has been created automatically by the chart.
178214
# This configuration here will be **MERGED** with the configuration specified above.
179215
override: {}

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.9.0
20+
version: 0.9.4
2121

2222

2323
dependencies:

charts/nr-k8s-otel-collector/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ to export data to this connector which can then be connected to the New Relic ma
166166
| image.tag | string | `"1.5.0"` | Overrides the image tag whose default is the chart appVersion. |
167167
| kube-state-metrics.enableResourceQuotaSamples | bool | `false` | Enable resource quota data exporting |
168168
| kube-state-metrics.enabled | bool | `true` | Install the [`kube-state-metrics` chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics) from the stable helm charts repository. This is mandatory if `infrastructure.enabled` is set to `true` and the user does not provide its own instance of KSM version >=1.8 and <=2.0. Note, kube-state-metrics v2+ disables labels/annotations metrics by default. You can enable the target labels/annotations metrics to be monitored by using the metricLabelsAllowlist/metricAnnotationsAllowList options described [here](https://github.com/prometheus-community/helm-charts/blob/159cd8e4fb89b8b107dcc100287504bb91bf30e0/charts/kube-state-metrics/values.yaml#L274) in your Kubernetes clusters. |
169+
| kube-state-metrics.metricAnnotationsAllowList | list | `["pods=[*]", "namespaces=[*]", "deployments=[*]"]` | List of Kubernetes annotation keys that will be used in the resources' annotations metric. By default, kube-state-metrics v2+ does not expose annotations as metric labels. This option allows you to specify which annotations should be exposed as metric dimensions. Each entry is formatted as "resource=[annotation1,annotation2,...]". Use "*" to include all annotations for a resource type. Example: ["pods=[description,owner]", "namespaces=[description]", "deployments=[change-id,jira-ticket]"] |
170+
| kube-state-metrics.metricLabelsAllowlist | list | `["pods=[*]", "namespaces=[*]", "deployments=[*]"]` | List of Kubernetes label keys that will be used in the resources' labels metric. By default, kube-state-metrics v2+ does not expose labels as metric labels. This option allows you to specify which labels should be exposed as metric dimensions. Each entry is formatted as "resource=[label1,label2,...]". Use "*" to include all labels for a resource type. Example: ["pods=[app,environment,team]", "namespaces=[environment]", "deployments=[app,version]"] |
169171
| kube-state-metrics.prometheusScrape | bool | `false` | Disable prometheus from auto-discovering KSM and potentially scraping duplicated data |
170172
| labels | object | `{}` | Additional labels for chart objects |
171173
| licenseKey | string | `""` | This set this license key to use. Can be configured also with `global.licenseKey` |
@@ -198,6 +200,7 @@ to export data to this connector which can then be connected to the New Relic ma
198200
| receivers.kubeletstats.enabled | bool | `true` | Specifies whether the `kubeletstats` receiver is enabled |
199201
| receivers.kubeletstats.scrapeInterval | string | `1m` | Sets the scrape interval for the `kubeletstats` receiver |
200202
| receivers.prometheus.enabled | bool | `true` | Specifies whether the `prometheus` receiver is enabled |
203+
| receivers.prometheus.ksmSelector | string | `app.kubernetes.io/name=kube-state-metrics` | Label selector that will be used to automatically discover an instance of kube-state-metrics running in the cluster. |
201204
| receivers.prometheus.scrapeInterval | string | `1m` | Sets the scrape interval for the `prometheus` receiver |
202205
| serviceAccount | object | See `values.yaml` | Settings controlling ServiceAccount creation |
203206
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created |

0 commit comments

Comments
 (0)