Skip to content

Commit

Permalink
[newrelic-infrastrcuture] global nrStaging (newrelic#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrodnm authored Jun 10, 2020
1 parent a293313 commit 9b8e4ec
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/newrelic-infrastructure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart to deploy the New Relic Infrastructure Agent as a DaemonSet
name: newrelic-infrastructure
version: 0.13.38
version: 0.14.0
appVersion: 1.22.0
home: https://hub.docker.com/r/newrelic/infrastructure-k8s/
source:
Expand Down
10 changes: 5 additions & 5 deletions charts/newrelic-infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This chart will deploy the New Relic Infrastructure agent as a Daemonset.

| Parameter | Description | Default |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `cluster` | The cluster name for the Kubernetes cluster. | |
| `licenseKey` | The [license key](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/license-key) for your New Relic Account. This will be preferred configuration option if both `licenseKey` and `customSecret` are specified. | |
| `customSecretName` | Name of the Secret object where the license key is stored | |
| `customSecretLicenseKey` | Key in the Secret object where the license key is stored. | |
| `global.cluster` - `cluster` | The cluster name for the Kubernetes cluster. | |
| `global.licenseKey` - `licenseKey` | The [license key](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/license-key) for your New Relic Account. This will be preferred configuration option if both `licenseKey` and `customSecret` are specified. | |
| `global.customSecretName` - `customSecretName` | Name of the Secret object where the license key is stored | |
| `global.customSecretLicenseKey` - `customSecretLicenseKey` | Key in the Secret object where the license key is stored. | |
| `config` | A `newrelic.yml` file if you wish to provide. | |
| `integrations_config` | List of Integrations configuration to monitor services running on Kubernetes. More information on can be found [here](https://docs.newrelic.com/docs/integrations/kubernetes-integration/link-apps-services/monitor-services-running-kubernetes). | |
| `disableKubeStateMetrics` | Disables kube-state-metrics data parsing if the value is ` true`. | `false` |
Expand Down Expand Up @@ -42,7 +42,7 @@ This chart will deploy the New Relic Infrastructure agent as a Daemonset.
| `schedulerEndpointUrl` | Explicitly sets the scheduler component url. | |
| `controllerManagerEndpointUrl` | Explicitly sets the controller manager component url. | |
| `eventQueueDepth` | Increases the in-memory cache of the agent to accommodate for more samples at a time. | |
| `nrStaging` | Send data to staging (requires a staging license key). | false |
| `global.nrStaging` - `nrStaging` | Send data to staging (requires a staging license key). | false |

## Example

Expand Down
7 changes: 7 additions & 0 deletions charts/newrelic-infrastructure/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ Return the customSecretLicenseKey
{{- end -}}
{{- end -}}

{{/*
Returns nrStaging
*/}}
{{- define "newrelic.nrStaging" -}}
{{- or .Values.global.nrStaging .Values.nrStaging }}
{{- end -}}

{{/*
Returns if the template should render, it checks if the required values
licenseKey and cluster are set.
Expand Down
2 changes: 1 addition & 1 deletion charts/newrelic-infrastructure/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
- name: "NRIA_EVENT_QUEUE_DEPTH"
value: {{ .Values.eventQueueDepth | quote }}
{{- end }}
{{- if .Values.nrStaging }}
{{- if eq (include "newrelic.nrStaging" .) "true" }}
- name: "NRIA_STAGING"
value: "true"
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/newrelic-infrastructure/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,6 @@ etcdTlsSecretNamespace: default
# https://docs.newrelic.com/docs/integrations/kubernetes-integration/link-apps-services/monitor-services-running-kubernetes
integrations_config: {}

# Sends data to staging, can be set as a global.
# global.nrStaging
nrStaging: false

0 comments on commit 9b8e4ec

Please sign in to comment.