Skip to content

Commit

Permalink
[nri-prometheus] Add support for the New Relic staging environment (#58)
Browse files Browse the repository at this point in the history
* Add support for the New Relic staging environment

* Don't rev appVersion

Co-authored-by: Erika Arnold <[email protected]>
  • Loading branch information
erabug and Erika Arnold authored Jun 9, 2020
1 parent 2da40c1 commit 733392e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion charts/nri-prometheus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 1.3.0
description: A Helm chart to deploy the New Relic Prometheus OpenMetrics integration
name: nri-prometheus
version: 1.0.2
version: 1.0.3
engine: gotpl
home: https://github.com/newrelic/nri-prometheus
icon: https://newrelic.com/assets/newrelic/source/NewRelic-logo-square.svg
Expand Down
35 changes: 18 additions & 17 deletions charts/nri-prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ This chart will deploy the New Relic's Prometheus OpenMetrics Integration.

## Configuration

| Parameter | Description | Default |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| `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. | |
| `nameOverride` | The name that should be used for the deployment. | |
| `image.repository` | The prometheus openmetrics integration image name. | `newrelic/nri-prometheus` |
| `image.tag` | The prometheus openmetrics integration image tag. | `1.3.0` |
| `resources` | A yaml defining the resources for the events-router container. | {} |
| `rbac.create` | Enable Role-based authentication | `true` |
| `serviveAccount.create` | If true, a service account would be created and assigned to the deployment | true |
| `serviveAccount.name` | The service account to assign to the deployment. If `serviveAccount.create` is true then this name will be used when creating the service account | |
| `nodeSelector` | Node label to use for scheduling | `{}` |
| `tolerations` | List of node taints to tolerate (requires Kubernetes >= 1.6) | `[]` |
| `affinity` | Node affinity to use for scheduling | `{}` |
| `prometheusScrape` | true | Value for `prometheus.io/scrape` label |
| Parameter | Description | Default |
|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| `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. | |
| `nameOverride` | The name that should be used for the deployment. | |
| `image.repository` | The prometheus openmetrics integration image name. | `newrelic/nri-prometheus` |
| `image.tag` | The prometheus openmetrics integration image tag. | `1.3.0` |
| `resources` | A yaml defining the resources for the events-router container. | {} |
| `rbac.create` | Enable Role-based authentication | `true` |
| `serviveAccount.create` | If true, a service account would be created and assigned to the deployment | true |
| `serviveAccount.name` | The service account to assign to the deployment. If `serviveAccount.create` is true then this name will be used when creating the service account | |
| `nodeSelector` | Node label to use for scheduling | `{}` |
| `tolerations` | List of node taints to tolerate (requires Kubernetes >= 1.6) | `[]` |
| `affinity` | Node affinity to use for scheduling | `{}` |
| `prometheusScrape` | Value for `prometheus.io/scrape` label | true |
| `nrStaging` | Send data to staging (requires a staging license key) | false |

## Example

Expand Down
4 changes: 4 additions & 0 deletions charts/nri-prometheus/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ spec:
name: {{ include "nri-prometheus.customSecretName" . }}
key: {{ include "nri-prometheus.customSecretLicenseKey" . }}
{{- end }}
{{- if .Values.nrStaging }}
- name: "METRIC_API_URL"
value: "https://staging-metric-api.newrelic.com/metric/v1/infra"
{{- end }}
- name: "BEARER_TOKEN_FILE"
value: "/var/run/secrets/kubernetes.io/serviceaccount/token"
- name: "CA_FILE"
Expand Down
2 changes: 2 additions & 0 deletions charts/nri-prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ nodeSelector: {}
tolerations: []

affinity: {}

nrStaging: false

0 comments on commit 733392e

Please sign in to comment.