The only webhookConfig.agents values defined in values.yaml are java and nodejs. When using other values, you must explicitly specify image, artifact, and *OPTIONS values.
Instead, it would be more helpful to set that envvar always in the webhook code, then the config becomes simpler.
One requirement of doing this is that we need to use a common value for all APM agents. We decided to use the value currently being used by the Java agent: K8S_ATTACH. That means that new versions of the Node.js and .NET agents will be needed that support ELASTIC_APM_ACTIVATION_METHOD=K8S_ATTACH. I plan to change the Node.js APM agent to support both values so that the newer APM agent will work with current and newer versions of the Helm chart.
Currently
ELASTIC_APM_ACTIVATION_METHOD
is set inwebhookConfig.agents.{name}
in the chart'svalues.yaml
. E.g.:An issue with setting the envvar this was is that a custom
webhookConfig.agents.
name requires one to repeat that envvar. As noted at https://www.elastic.co/guide/en/apm/attacher/current/apm-webhook-add-pod-annotation.htmlInstead, it would be more helpful to set that envvar always in the webhook code, then the config becomes simpler.
One requirement of doing this is that we need to use a common value for all APM agents. We decided to use the value currently being used by the Java agent:
K8S_ATTACH
. That means that new versions of the Node.js and .NET agents will be needed that supportELASTIC_APM_ACTIVATION_METHOD=K8S_ATTACH
. I plan to change the Node.js APM agent to support both values so that the newer APM agent will work with current and newer versions of the Helm chart.