Skip to content

Commit 72a4659

Browse files
Merge pull request #19294 from bduranleau-nr/php-k8s-operator
chore(k8s): add PHP to k8s agent operator support
2 parents 6d0e2ea + 7803773 commit 72a4659

File tree

1 file changed

+29
-15
lines changed

1 file changed

+29
-15
lines changed

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

+29-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ freshnessValidatedDate: 2024-06-28
1111

1212
The Kubernetes APM auto-attach, formerly known as the Kubernetes agent operator, streamlines full-stack observability for Kubernetes environments by automating APM instrumentation alongside Kubernetes agent deployment. By enabling <InlinePopover type="APM"/> auto instrumentation, developers no longer need to manually manage [APM agents](/docs/apm/new-relic-apm/getting-started/introduction-apm/). The Kubernetes APM auto-attach will automatically install, upgrade and remove APM agents.
1313

14-
It currently [supports](#k8s-supported-versions) Java, .NET, Node.js, Python, and Ruby with additional languages (PHP and Go) on the way.
14+
It currently [supports](#k8s-supported-versions) Java, .NET, Node.js, Python, Ruby, and PHP.
1515

1616
## How it works [#how-it-works]
1717

@@ -88,7 +88,7 @@ Here's what the instrumentation CR lets you map out:
8888
* Name of the instrumentation CR
8989
* Where it will apply the instrumentation CR (thanks to `podLabelSelector` and `namespaceLabelSelector`)
9090
* APM agent (one per CR)
91-
* APM agent version
91+
* APM agent version
9292
* APM config parameters (env vars)
9393
* License key (optional)
9494

@@ -141,7 +141,7 @@ Both selectors support `matchLabel` and `matchExpressions`.
141141
>
142142

143143
`matchExpressions` is a more expressive label selector in Kubernetes and supports set-based matching unlike the `matchLabels`, which you can only use for exact matching. You can use it with or without the `matchLabels` selector.
144-
144+
145145
```yaml
146146
...
147147
selector:
@@ -152,9 +152,9 @@ Both selectors support `matchLabel` and `matchExpressions`.
152152
- {key: environment, operator: NotIn, values: [dev]}
153153
...
154154
```
155-
155+
156156
You can add more expressions to the selector. As in the example, each expression must contain a key, an operator, and possibly (depending on the operator) a list of values. There are four valid operators:
157-
157+
158158
* `In`: Label's value must match one of the specified values.
159159
* `NotIn`: Label's value must not match any of the specified values.
160160
* `Exists`: Pod must include a label with the specified key (the value isn't important). When using this operator, you shouldn't specify the values field.
@@ -180,7 +180,7 @@ You've got to specify the APM agent and its version within the instrumentation C
180180
</th>
181181
<th>
182182
Available versions
183-
</th>
183+
</th>
184184
</tr>
185185
</thead>
186186
<tbody>
@@ -193,7 +193,7 @@ You've got to specify the APM agent and its version within the instrumentation C
193193
</td>
194194
<td>
195195
[.NET](https://hub.docker.com/repository/docker/newrelic/newrelic-dotnet-init/general)
196-
</td>
196+
</td>
197197
</tr>
198198
<tr>
199199
<td>
@@ -204,7 +204,7 @@ You've got to specify the APM agent and its version within the instrumentation C
204204
</td>
205205
<td>
206206
[Java](https://hub.docker.com/repository/docker/newrelic/newrelic-java-init/general)
207-
</td>
207+
</td>
208208
</tr>
209209
<tr>
210210
<td>
@@ -215,7 +215,7 @@ You've got to specify the APM agent and its version within the instrumentation C
215215
</td>
216216
<td>
217217
[Node](https://hub.docker.com/repository/docker/newrelic/newrelic-node-init/general)
218-
</td>
218+
</td>
219219
</tr>
220220
<tr>
221221
<td>
@@ -226,7 +226,7 @@ You've got to specify the APM agent and its version within the instrumentation C
226226
</td>
227227
<td>
228228
[Python](https://hub.docker.com/repository/docker/newrelic/newrelic-python-init/general)
229-
</td>
229+
</td>
230230
</tr>
231231
<tr>
232232
<td>
@@ -237,7 +237,18 @@ You've got to specify the APM agent and its version within the instrumentation C
237237
</td>
238238
<td>
239239
[Ruby](https://hub.docker.com/repository/docker/newrelic/newrelic-ruby-init/general)
240-
</td>
240+
</td>
241+
</tr>
242+
<tr>
243+
<td>
244+
php
245+
</td>
246+
<td>
247+
`newrelic-php-init:latest`
248+
</td>
249+
<td>
250+
[PHP](https://hub.docker.com/repository/docker/newrelic/newrelic-php-init/general)
251+
</td>
241252
</tr>
242253
</tbody>
243254
</table>
@@ -275,6 +286,7 @@ In the above example, we show you how you can configure the agent settings globa
275286
* [Python](/docs/apm/agents/python-agent/configuration/python-agent-configuration/)
276287
* [.NET](/docs/apm/agents/net-agent/configuration/net-agent-configuration/)
277288
* [Ruby](/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/)
289+
* [PHP](/docs/apm/agents/php-agent/configuration/php-agent-configuration/)
278290

279291

280292
<Callout variant="important">
@@ -370,7 +382,7 @@ metadata:
370382
namespace: newrelic
371383
spec:
372384
agent:
373-
language: java
385+
language: ruby
374386
image: newrelic/newrelic-ruby-init:latest
375387
namespaceLabelSelector:
376388
matchExpressions:
@@ -483,15 +495,17 @@ Run this command to see the available charts:
483495
id="custom-apm"
484496
title="Can I use custom instrumentation with the Kubernetes APM auto-attach?"
485497
>
486-
Yes, custom instrumentation will work the same as without APM auto-attach. The main difference is that the agent is now injected by APM auto-attach instead of installed in the container with the rest of the application dependencies.
487-
498+
Yes, custom instrumentation will work the same as without APM auto-attach. The main difference is that the agent is now injected by APM auto-attach instead of installed in the container with the rest of the application dependencies.
499+
488500
You can still import and call the agent API to add custom instrumentation into your application. You can also utilize a configuration file or environment variables to add custom instrumentation if the particular agent you're using supports it. Note that agents have order of precendence between configuration via environment variables and configuration via configuration files, so you will need to make sure your environment variable configuration via the operator is not clashing with your configuration via configuration file. See each agents custom instrumentation docs for details:
489501

490502
* [Java](/docs/apm/agents/java-agent/custom-instrumentation/java-custom-instrumentation/)
491503
* [Node](/docs/apm/agents/nodejs-agent/extend-your-instrumentation/nodejs-custom-instrumentation/)
492504
* [Python](/docs/apm/agents/python-agent/custom-instrumentation/python-custom-instrumentation/)
493505
* [.NET](/docs/apm/agents/net-agent/custom-instrumentation/introduction-net-custom-instrumentation/)
494506
* [Ruby](/docs/apm/agents/ruby-agent/api-guides/ruby-custom-instrumentation/)
507+
* [PHP](/docs/apm/agents/php-agent/features/php-custom-instrumentation/)
508+
495509
</Collapser>
496510

497511
<Collapser
@@ -560,7 +574,7 @@ It's advised to uninstall any versions preceding 0.14 and proceed with the insta
560574

561575
## Support [#support]
562576

563-
The Kubernetes APM auto-attach currently supports the latest version of these APM agents: Java, .NET, Node.js, Python, and Ruby.
577+
The Kubernetes APM auto-attach currently supports the latest version of these APM agents: Java, .NET, Node.js, Python, Ruby and PHP.
564578

565579
Once is on general availability, the latest 3 versions of each of the APM agents will be supported.
566580

0 commit comments

Comments
 (0)