provider-newrelic

module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0

README

provider-newrelic

provider-newrelic is a Crossplane Provider that is meant to be used for infrastructure-as-code for New Relic.

See the examples directory for advanced usage.

This provider supports the following:

apiVersion: provider-newrelic.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: newrelic-provider
spec:
  account_id: "your_nr_account_id"
  region: "US | EU" # Optional
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: newrelic-creds
      key: key
  • Secret which contains a new relic user token
---
apiVersion: v1
data:
  key: NRAK-YOUR_NEW_RELIC_TOKEN_BASE64
kind: Secret
metadata:
  name: newrelic-creds
  namespace: crossplane-system
type: Opaque

Additional Note

Sometimes an AlertsPolicy may be deleted, or regenerated, giving it a new ID.
This can cause issues for any NrqlAlertCondition with a reference to that object resulting in errors such as "error": "Policy with ID 1234567 not found" To fix you can simply remove the policyId on the NrqlAlertCondition to to cause the reference to re-resolve. (There is no harm in doing this, it will just cause the provider to lookup the new ID.)

kubectl -n crossplane-system patch NrqlAlertCondition my-condition-name --type json  --patch='[ { "op": "remove", "path": "/spec/forProvider/policyId" } ]'

Developing

Run against a Kubernetes cluster:

make run

Build, push, and install:

make all

Build image:

make image

Push image:

make push

Build binary:

make build

Directories

Path Synopsis
Package apis contains Kubernetes API for the Template provider.
Package apis contains Kubernetes API for the Template provider.
alertspolicy
Package alertspolicy contains group AlertsPolicy API versions
Package alertspolicy contains group AlertsPolicy API versions
alertspolicy/v1alpha1
Package v1alpha1 contains the v1alpha1 group AlertsPolicy resources of the New Relic provider.
Package v1alpha1 contains the v1alpha1 group AlertsPolicy resources of the New Relic provider.
dashboard
Package dashboard contains group Dashboard API versions
Package dashboard contains group Dashboard API versions
dashboard/v1alpha1
Package v1alpha1 contains the v1alpha1 group Dashboard resources of the New Relic provider.
Package v1alpha1 contains the v1alpha1 group Dashboard resources of the New Relic provider.
nrqlalertcondition
Package nrqlalertcondition contains group Alert Nrql Condition API versions
Package nrqlalertcondition contains group Alert Nrql Condition API versions
nrqlalertcondition/v1alpha1
Package v1alpha1 contains the v1alpha1 group NrqlAlertCondition resources of the New Relic provider.
Package v1alpha1 contains the v1alpha1 group NrqlAlertCondition resources of the New Relic provider.
v1alpha1
Package v1alpha1 contains the core resources Newrelic provider.
Package v1alpha1 contains the core resources Newrelic provider.
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL