Configure the webhook with a Helm values file
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless Observability
Generally available
Stack
Generally available
The APM Attacher’s webhook can be installed from a Helm chart. You can provide a custom webhook configuration using a Helm values file. Elastic provides a custom.yaml file as a starting point.
This sample custom.yaml file instruments a pod with the Elastic APM Java agent:
apm:
secret_token: SuP3RT0K3N
namespaces:
- default
- my-name-space-01
- my-name-space-02
webhookConfig:
agents:
java:
environment:
ELASTIC_APM_SERVER_URL: "<YOUR_APM_SERVER_URL>:<PORT>"
ELASTIC_APM_ENVIRONMENT: "prod"
ELASTIC_APM_LOG_LEVEL: "info"
- The
secret_tokenfor your deployment. Useapi_keyif using an API key instead. - If you’re using a secret token or API key to secure your deployment, you must list all of the namespaces where you want to auto-instrument pods. The secret token or API key will be stored as Kubernetes Secrets in each namespace.
- Fields written here are merged with pre-existing fields in
values.yaml - Elastic APM agent environment variables—for example, the APM Server URL, which specifies the URL and port of your APM integration or server.
This sample custom.yaml file instruments a pod with the Elastic APM Node.js agent:
apm:
secret_token: SuP3RT0K3N
namespaces:
- default
- my-name-space-01
- my-name-space-02
webhookConfig:
agents:
nodejs:
environment:
ELASTIC_APM_SERVER_URL: "<YOUR_APM_SERVER_URL>:<PORT>"
ELASTIC_APM_ENVIRONMENT: "prod"
ELASTIC_APM_LOG_LEVEL: "info"
- The
secret_tokenfor your deployment. Useapi_keyif using an API key instead. - If you’re using a secret token or API key to secure your deployment, you must list all of the namespaces where you want to auto-instrument pods. The secret token or API key will be stored as Kubernetes Secrets in each namespace.
- Fields written here are merged with pre-existing fields in
values.yaml - Elastic APM agent environment variables—for example, the APM Server URL, which specifies the URL and port of your APM integration or server.
The examples above assume that you want to use the latest version of the Elastic APM agent. Advanced users may want to pin a version of the agent or provide a custom build. To do this, set your own image, artifact, and environment.*OPTIONS fields. Copy the formatting from values.yaml.
Expiring and rotating API keys will need to update the custom.yaml, upgrade the helm install with the new custom.yaml, and cycle running pods in a similar way to other deployment definition changes.