Skip to content

Commit 35de3de

Browse files
authored
Merge pull request #21996 from mangulonr/patch-505326
Adding configmap support for Java agent
2 parents 5f3e273 + e1368a6 commit 35de3de

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/content/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ spec:
400400
image: newrelic/newrelic-dotnet-init:latest
401401
...
402402
```
403-
### APM configuration parameters [#apm-config-parameters]
403+
### APM configuration [#apm-config-parameters]
404+
405+
#### Using environment variables
404406

405407
The instrumentation CR provides the capability to inject environment variables in the pod to streamline the configuration of the APM agents. See this example:
406408

@@ -431,6 +433,26 @@ In the above example, we show you how you can configure the agent settings globa
431433
You can inject these environment variables in the app deployment manifest.
432434
</Callout>
433435

436+
#### Using a configmap (Java only)
437+
438+
When using the configmap, note the following requirements:
439+
440+
- The Java configuration must be stored in a key named `newrelic.yaml`.
441+
- Setting the application name or license key in the `configmap` is not supported.
442+
- To set these properties, use environment variables or custom secrets instead.
443+
444+
445+
```yaml
446+
apiVersion: newrelic.com/v1beta2
447+
kind: Instrumentation
448+
metadata:
449+
name: newrelic-instrumentation-java
450+
namespace: newrelic
451+
spec:
452+
agentConfigMap: "my-java-app-config" # This configmap must exist in every namespace that the pod in this `Instrumentation` is targeting
453+
agent: ...
454+
```
455+
434456
### License keys (optional) [#license-keys]
435457
436458
When you install it, a <InlinePopover type="licenseKey"/> is created and it's the license by default. Follow these steps, if you need to send the APM telemetry to a different account:

0 commit comments

Comments
 (0)