Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
| [nats](./images/nats) | `cgr.dev/chainguard/nats` | experimental | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nats.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nats:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nats.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nats:latest) |
| [netcat](./images/netcat) | `cgr.dev/chainguard/netcat` | experimental | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/netcat.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/netcat:latest) |
| [newrelic-fluent-bit-output](./images/newrelic-fluent-bit-output) | `cgr.dev/chainguard/newrelic-fluent-bit-output` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-fluent-bit-output.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-fluent-bit-output:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-fluent-bit-output.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-fluent-bit-output:latest) |
| [newrelic-infrastructure-bundle](./images/newrelic-infrastructure-bundle) | `cgr.dev/chainguard/newrelic-infrastructure-bundle` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-infrastructure-bundle.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-infrastructure-bundle:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-infrastructure-bundle.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-infrastructure-bundle:latest) |
| [newrelic-k8s-events-forwarder](./images/newrelic-k8s-events-forwarder) | `cgr.dev/chainguard/newrelic-k8s-events-forwarder` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-k8s-events-forwarder.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-k8s-events-forwarder:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-k8s-events-forwarder.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-k8s-events-forwarder:latest) |
| [newrelic-prometheus-configurator](./images/newrelic-prometheus-configurator) | `cgr.dev/chainguard/newrelic-prometheus-configurator` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-prometheus-configurator.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-prometheus-configurator:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/newrelic-prometheus-configurator.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/newrelic-prometheus-configurator:latest) |
| [nginx](./images/nginx) | `cgr.dev/chainguard/nginx` | stable | [![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nginx.build.status.latest-dev.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nginx:latest-dev)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nginx.build.status.latest.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nginx:latest)<br/>[![](https://storage.googleapis.com/chainguard-images-build-outputs/badges/nginx.build.status.next.svg)](https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/nginx:next) |
Expand Down
49 changes: 49 additions & 0 deletions images/newrelic-infrastructure-bundle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--monopod:start-->
# newrelic-infrastructure-bundle
| | |
| - | - |
| **Status** | stable |
| **OCI Reference** | `cgr.dev/chainguard/newrelic-infrastructure-bundle` |


* [View Image in Chainguard Academy](https://edu.chainguard.dev/chainguard/chainguard-images/reference/newrelic-infrastructure-bundle/overview/)
* [View Image Catalog](https://console.enforce.dev/images/catalog) for a full list of available tags.
*[Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.*

---
<!--monopod:end-->

Minimal [newrelic-infrastructure-bundle](https://github.com/newrelic/infrastructure-bundle) container image.

## Get It

The image is available on `cgr.dev`:

```
docker pull cgr.dev/chainguard/newrelic-infrastructure-bundle
```

## Usage

This image is a drop-in replacement for the `newrelic-infrastructure-bundle` project that image known as and available upstream at `newrelic/infrastructure-bundle`.

You can run this in Helm with:

```shell
helm repo add nri-kubernetes https://newrelic.github.io/nri-kubernetes

helm upgrade --install newrelic-infrastructure-bundle nri-kubernetes/newrelic-infrastructure \
--set images.agent.registry=cgr.dev \
--set images.agent.repository=chainguard/newrelic-infrastructure-bundle \
--set images.agent.tag=latest \
--set images.integration.registry=cgr.dev \
--set images.integration.repository=chainguard/nri-kube-events \
--set images.integration.tag="latest" \
--set cluster=$CLUSTER --set licenseKey=$LICENSE_KEY
```

NOTE: This image requires a license key to run properly, which you can obtain from New Relic.

## Testing

The tests for this image also require a license key, which is configured in a secret in Github Actions.
30 changes: 30 additions & 0 deletions images/newrelic-infrastructure-bundle/configs/latest.apko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
- ca-certificates-bundle
- wolfi-baselayout
- openjdk-8
- newrelic-infrastructure-agent
- newrelic-infrastructure-bundle

accounts:
groups:
- groupname: nonroot
gid: 65532
users:
- username: nonroot
uid: 65532
gid: 65532
run-as: 65532

archs:
- x86_64
- aarch64

annotations:
"org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/"
"org.opencontainers.image.url": https://edu.chainguard.dev/chainguard/chainguard-images/reference/newrelic-infrastructure-bundle/
"org.opencontainers.image.source": https://github.com/chainguard-images/images/tree/main/images/newrelic-infrastructure-bundle
12 changes: 12 additions & 0 deletions images/newrelic-infrastructure-bundle/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Opt-out of the new terraform-based release
terraform: false

versions:
- apko:
config: configs/latest.apko.yaml
extractTagsFrom:
package: newrelic-infrastructure-bundle
subvariants:
- suffix: -dev
options:
- dev
10 changes: 10 additions & 0 deletions images/newrelic-infrastructure-bundle/tests/01-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -o errexit -o nounset -o errtrace -o pipefail -x

if [[ "${IMAGE_NAME}" == "" ]]; then
echo "Must set IMAGE_NAME environment variable. Exiting."
exit 1
fi

docker run --rm "${IMAGE_NAME}" /usr/bin/newrelic-infra --version | grep "New Relic Infrastructure Agent"
51 changes: 51 additions & 0 deletions images/newrelic-infrastructure-bundle/tests/02-helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# monopod:tag:k8s

set -o errexit -o nounset -o errtrace -o pipefail -x

function preflight() {
if [[ "${IMAGE_REGISTRY}" == "" ]]; then
echo "Must set IMAGE_REGISTRY environment variable. Exiting."
exit 1
fi

if [[ "${IMAGE_REPOSITORY}" == "" ]]; then
echo "Must set IMAGE_REPOSITORY environment variable. Exiting."
exit 1
fi

if [[ "${IMAGE_TAG}" == "" ]]; then
echo "Must set IMAGE_TAG environment variable. Exiting."
exit 1
fi
helm repo add nri-kubernetes https://newrelic.github.io/nri-kubernetes
}


function TEST_basic_helm_install() {
helm upgrade \
--install \
newrelic-infrastructure-bundle nri-kubernetes/newrelic-infrastructure \
--set images.agent.registry=${IMAGE_REGISTRY} \
--set images.agent.repository=${IMAGE_REPOSITORY} \
--set images.agent.tag=${IMAGE_TAG} \
--set cluster=test \
--set licenseKey=${NEW_RELIC_LICENSE_KEY}

# Wait for helm to catch up
sleep 3

if kubectl wait --for=condition=ready pod --selector app.kubernetes.io/instance=newrelic-infrastructure-bundle; then
echo "Success"
else
echo "Failed"
kubectl describe pod --selector app.kubernetes.io/instance=newrelic-infrastructure-bundle
kubectl logs --selector app.kubernetes.io/instance=newrelic-infrastructure-bundle
exit 1
fi
helm uninstall newrelic-infrastructure-bundle
}

preflight
TEST_basic_helm_install