Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet integration] Kubernetes startup attach via MutatingAdmissionWebhook #385

Open
felixbarny opened this issue Dec 9, 2020 · 0 comments

Comments

@felixbarny
Copy link
Member

Supported agents: Java, .NET, Node.js

For Kubernetes, we can provide users with a seamless onboarding experience experience that does not require any code or configuration changes.

Kubernetes has the concept of MutatingAdmissionWebhooks. This allows to change the configuration of pods before they are started. APM Server could provide a webhook endpoint that receives the pod configuration as a yml file and modify it to add the language-specific startup attach environment variable (JAVA_TOOL_OPTIONS/ DOTNET_STARTUP_HOOKS / NODE_OPTIONS), ELASTIC_APM_SERVER_URL, ELASTIC_APM_API_KEY (from Kubernetes secrets).

The binaries of the agents can be placed into a shared volume so the pods have access to them.

By default, all agents will be added to all pods as there is no harm in setting NODE_OPTIONS on a MySql or Java pod, for example. Optionally, users can define include/exclude rules to control which agent should be attached to which pod, based on the existence or absence of particular labels, for example.

Depends on #382 #383 #384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant