Skip to content

Commit

Permalink
Merge branch 'master' into patch-13
Browse files Browse the repository at this point in the history
  • Loading branch information
sadafarshad authored Apr 18, 2024
2 parents c0b51fc + b7cfd51 commit 7c9ecef
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 116 deletions.
10 changes: 5 additions & 5 deletions charts/nri-bundle/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: newrelic-infrastructure
repository: https://newrelic.github.io/nri-kubernetes
version: 3.33.1
version: 3.33.2
- name: nri-prometheus
repository: https://newrelic.github.io/nri-prometheus
version: 2.1.17
Expand All @@ -10,7 +10,7 @@ dependencies:
version: 1.12.0
- name: nri-metadata-injection
repository: https://newrelic.github.io/k8s-metadata-injection
version: 4.18.3
version: 4.18.4
- name: newrelic-k8s-metrics-adapter
repository: https://newrelic.github.io/newrelic-k8s-metrics-adapter
version: 1.10.2
Expand All @@ -19,7 +19,7 @@ dependencies:
version: 5.12.1
- name: nri-kube-events
repository: https://newrelic.github.io/nri-kube-events
version: 3.9.3
version: 3.9.4
- name: newrelic-logging
repository: https://newrelic.github.io/helm-charts
version: 1.21.2
Expand All @@ -32,5 +32,5 @@ dependencies:
- name: newrelic-infra-operator
repository: https://newrelic.github.io/newrelic-infra-operator
version: 2.10.0
digest: sha256:dc652de5a270b79377130dd333bfd50284e34541cdfd32d4fbce0268f3c01c99
generated: "2024-04-01T14:46:40.056684873Z"
digest: sha256:9021d097f98f30a65409c8496ed09e8e5456a9f11bb30129c29d1021c96ba14d
generated: "2024-04-15T18:49:39.947112549Z"
8 changes: 4 additions & 4 deletions charts/nri-bundle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ sources:
- https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-pixie
- https://github.com/newrelic/newrelic-infra-operator/tree/master/charts/newrelic-infra-operator

version: 5.0.72
version: 5.0.73

dependencies:
- name: newrelic-infrastructure
repository: https://newrelic.github.io/nri-kubernetes
condition: infrastructure.enabled,newrelic-infrastructure.enabled
version: 3.33.1
version: 3.33.2

- name: nri-prometheus
repository: https://newrelic.github.io/nri-prometheus
Expand All @@ -37,7 +37,7 @@ dependencies:
- name: nri-metadata-injection
repository: https://newrelic.github.io/k8s-metadata-injection
condition: webhook.enabled,nri-metadata-injection.enabled
version: 4.18.3
version: 4.18.4

- name: newrelic-k8s-metrics-adapter
repository: https://newrelic.github.io/newrelic-k8s-metrics-adapter
Expand All @@ -52,7 +52,7 @@ dependencies:
- name: nri-kube-events
repository: https://newrelic.github.io/nri-kube-events
condition: kubeEvents.enabled,nri-kube-events.enabled
version: 3.9.3
version: 3.9.4

- name: newrelic-logging
repository: https://newrelic.github.io/helm-charts
Expand Down
4 changes: 2 additions & 2 deletions charts/super-agent-deployment/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Helm chart to install New Relic Super agent on Kubernetes

type: application

version: 0.0.12-beta
appVersion: 0.8.0
version: 0.0.13-beta
appVersion: 0.13.1

dependencies:
- name: common-library
Expand Down
4 changes: 1 addition & 3 deletions charts/super-agent-deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# super-agent-deployment

![Version: 0.0.12-beta](https://img.shields.io/badge/Version-0.0.12--beta-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.0](https://img.shields.io/badge/AppVersion-0.8.0-informational?style=flat-square)
![Version: 0.0.13-beta](https://img.shields.io/badge/Version-0.0.13--beta-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.1](https://img.shields.io/badge/AppVersion-0.13.1-informational?style=flat-square)

A Helm chart to install New Relic Super agent on Kubernetes

Expand Down Expand Up @@ -41,8 +41,6 @@ At the point of the creation of the chart, it has no particularities and this se
| config.superAgent | object | See `values.yaml` | Configuration for the Super Agent. |
| config.superAgent.content | string | See `values.yaml` for examples | Here you can set New Relic' Super Agent configuration. |
| config.superAgent.create | bool | `true` | Set if the configMap is going to be created by this chart or the user will provide its own. |
| config.superAgent.key | string | `""` | The key in the configMap that has the configuration for the Super Agent. |
| config.superAgent.name | string | `""` | The name the configMap is going to have. If create is set to false, the name of an existing configMap that will be used to config the Super Agent. |
| containerSecurityContext | object | `{}` | Sets security context (at container level). Can be configured also with `global.containerSecurityContext` |
| customAttributes | object | `{}` | TODO: Adds extra attributes to the cluster and all the metrics emitted to the backend. Can be configured also with `global.customAttributes` |
| customSecretLicenseKey | string | `""` | TODO: 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` |
Expand Down
11 changes: 1 addition & 10 deletions charts/super-agent-deployment/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@
Return the name of the configMap holding the Super Agent's config. Defaults to release's fill name suffiexed with "-config"
*/ -}}
{{- define "newrelic-super-agent.config.name" -}}
{{- .Values.config.superAgent.name | default (include "newrelic.common.naming.truncateToDNSWithSuffix" ( dict "name" (include "newrelic.common.naming.fullname" .) "suffix" "superagent-config" )) -}}
{{- (include "newrelic.common.naming.truncateToDNSWithSuffix" ( dict "name" "local-data" "suffix" "superagent-config" )) -}}
{{- end -}}


{{- /*
Return the key name of the configMap holding the Super Agent's config. Defaults to "config.yaml"
*/ -}}
{{- define "newrelic-super-agent.config.key" -}}
{{- .Values.config.superAgent.key | default "config.yaml" -}}
{{- end -}}
{{- /*
Builds the configuration from config on the values and add more config options like
cluster name, licenses, and custom attributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- range $subAgentName, $subAgentConfig := .Values.config.subAgents -}}
{{- $releasePrefix := include "newrelic.common.naming.fullname" $ -}}
{{- $name := include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" $releasePrefix "suffix" $subAgentName) }}
{{- $name := include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" "local-data" "suffix" $subAgentName) }}
---
kind: ConfigMap
metadata:
Expand All @@ -11,6 +10,6 @@ metadata:
subagent: {{ $subAgentName }}
apiVersion: v1
data:
values.yaml: |
local_config: |
{{- $subAgentConfig.content | toYaml | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
---
kind: ConfigMap
metadata:
name: {{ include "newrelic-super-agent.config.name" . }}
name: local-data-super-agent
namespace: {{ .Release.Namespace }}
labels:
{{- include "newrelic.common.labels" . | nindent 4 }}
apiVersion: v1
data:
{{ include "newrelic-super-agent.config.key" . }}: |
local_config: |
{{- include "newrelic-super-agent.config.content" . | nindent 4 }}
{{- end }}
19 changes: 2 additions & 17 deletions charts/super-agent-deployment/templates/deployment-superagent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ spec:
- name: super-agent-config
mountPath: /etc/newrelic-super-agent
readOnly: true
{{- range $subAgentName, $subAgentConfig := .Values.config.subAgents }}
{{- $releaseSuffx := include "newrelic.common.naming.fullname" $ }}
{{- $name := include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" $releaseSuffx "suffix" $subAgentName) }}
- name: {{ $name }}
mountPath: /etc/newrelic-super-agent/fleet/agents.d/{{ $subAgentName }}/values
readOnly: true
{{- end }}
# TODO: when releasing we should check if this is still needed and if we need to persist the data.
- mountPath: /var/lib/newrelic-super-agent
name: var-lib-newrelic-super-agent
Expand All @@ -88,18 +81,10 @@ spec:
volumes:
- name: super-agent-config
configMap:
name: {{ include "newrelic-super-agent.config.name" . }}
name: local-data-super-agent
items:
- key: {{ include "newrelic-super-agent.config.key" . }}
- key: local_config
path: config.yaml
{{- range $subAgentName, $subAgentConfig := .Values.config.subAgents }}
{{- $releaseSuffx := include "newrelic.common.naming.fullname" $ }}
{{- $name := include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" $releaseSuffx "suffix" $subAgentName) }}
- name: {{ $name }}
configMap:
name: {{ $name }}
{{- end }}

- name: var-lib-newrelic-super-agent
emptyDir: {}
{{- with .Values.extraVolumes }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ tests:
- documentIndex: 0
equal:
path: metadata.name
value: my-release-super-agent-deployment-test-0
value: local-data-test-0
- documentIndex: 0
equal:
path: data["values.yaml"]
path: data["local_config"]
value: |
a: test
value: 0
- documentIndex: 1
equal:
path: metadata.name
value: my-release-super-agent-deployment-test-1
value: local-data-test-1
- documentIndex: 1
equal:
path: data["values.yaml"]
path: data["local_config"]
value: |
a: test
value: 1
- documentIndex: 2
equal:
path: metadata.name
value: my-release-super-agent-deployment-test-2
value: local-data-test-2
- documentIndex: 2
equal:
path: data["values.yaml"]
path: data["local_config"]
value: |
a: test
aYAML:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tests:
superAgent: {}
asserts:
- equal:
path: data["config.yaml"]
path: data["local_config"]
value: |
k8s:
cluster_name: my-cluster
Expand All @@ -35,7 +35,7 @@ tests:
test2: value2
asserts:
- equal:
path: data["config.yaml"]
path: data["local_config"]
value: |
k8s:
cluster_name: my-cluster
Expand All @@ -55,7 +55,7 @@ tests:
namespace: config-namespace
asserts:
- equal:
path: data["config.yaml"]
path: data["local_config"]
value: |
k8s:
cluster_name: config-cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,7 @@ release:
namespace: my-namespace
tests:

- it: there are no subagent configurations by default
set:
cluster: test
asserts:
- template: templates/deployment-superagent.yaml
equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: super-agent-config
mountPath: /etc/newrelic-super-agent
readOnly: true
- mountPath: /var/lib/newrelic-super-agent
name: var-lib-newrelic-super-agent
readOnly: false
- template: templates/deployment-superagent.yaml
equal:
path: spec.template.spec.volumes
value:
- name: super-agent-config
configMap:
name: my-release-super-agent-deployment-superagent-config
items:
- key: config.yaml
path: config.yaml
- name: var-lib-newrelic-super-agent
emptyDir: {}

- it: subagent configurations template file mounts
- it: there is no subagent configuration
set:
cluster: test
config:
Expand All @@ -61,15 +34,6 @@ tests:
- name: super-agent-config
mountPath: /etc/newrelic-super-agent
readOnly: true
- name: my-release-super-agent-deployment-test-0
mountPath: /etc/newrelic-super-agent/fleet/agents.d/test-0/values
readOnly: true
- name: my-release-super-agent-deployment-test-1
mountPath: /etc/newrelic-super-agent/fleet/agents.d/test-1/values
readOnly: true
- name: my-release-super-agent-deployment-test-2
mountPath: /etc/newrelic-super-agent/fleet/agents.d/test-2/values
readOnly: true
- mountPath: /var/lib/newrelic-super-agent
name: var-lib-newrelic-super-agent
readOnly: false
Expand All @@ -79,19 +43,10 @@ tests:
value:
- name: super-agent-config
configMap:
name: my-release-super-agent-deployment-superagent-config
name: local-data-super-agent
items:
- key: config.yaml
- key: local_config
path: config.yaml
- name: my-release-super-agent-deployment-test-0
configMap:
name: my-release-super-agent-deployment-test-0
- name: my-release-super-agent-deployment-test-1
configMap:
name: my-release-super-agent-deployment-test-1
- name: my-release-super-agent-deployment-test-2
configMap:
name: my-release-super-agent-deployment-test-2
- name: var-lib-newrelic-super-agent
emptyDir: {}

Expand Down
6 changes: 1 addition & 5 deletions charts/super-agent-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,12 @@ config:
superAgent:
# -- Set if the configMap is going to be created by this chart or the user will provide its own.
create: true
# -- The name the configMap is going to have. If create is set to false, the name of an existing configMap that will be used to config the Super Agent.
name: ""
# -- The key in the configMap that has the configuration for the Super Agent.
key: ""
# -- Here you can set New Relic' Super Agent configuration.
# @default -- See `values.yaml` for examples
content:
# agents:
# open-telemetry:
# agent_type: newrelic/io.opentelemetry.collector:0.0.1
# agent_type: newrelic/io.opentelemetry.collector:0.1.0
# opamp:
# endpoint: https://opamp.service.newrelic.com/v1/opamp
# headers:
Expand Down
12 changes: 10 additions & 2 deletions charts/synthetics-job-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ apiVersion: v2
name: synthetics-job-manager
description: New Relic Synthetics Containerized Job Manager
type: application
version: 2.0.0
appVersion: release-360
version: 2.0.2
appVersion: release-363
home: https://github.com/orgs/newrelic/teams/proactive-monitoring
maintainers:
- name: kaschaefer-nr
- name: sidnaiknewrelic
- name: Philip-R-Beckwith
- name: sshah-nr
- name: vkasanneni-nr
- name: marcusperezNR
- name: mderemer-nr
- name: sadafarshad
- name: lromer22
- name: kondracek-nr
email: [email protected]
keywords:
- synthetics
Expand Down
Loading

0 comments on commit 7c9ecef

Please sign in to comment.