-
Notifications
You must be signed in to change notification settings - Fork 483
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
Don't require cp
in instrumentation images
#3231
Comments
cp
in java instrumentation imagecp
in instrumentation images
We need the instrumentation container to be able to copy the agent JAR to a shared volume, from which the application can read it. Busybox |
A possible development is to use a container as volume, a new feature previewed in kubernetes 1.31: https://kubernetes.io/docs/tasks/configure-pod-container/image-volumes/ |
That would be ideal! Hopefully this feature makes it out of alpha quickly. In the meantime, if anyone wants to try their hand at an implementation in the operator, I'd be willing to merge it if it's appropriately hidden behind a feature gate and K8s version check. |
Component(s)
auto-instrumentation
Describe the issue you're reporting
The
javaagent.go
(link) component is doing an injection step that runs thecp
command at least once, but perhaps several times, from inside the container. This strongly implies that thecp
command is available in the container, which prevents distributions from publishing scratch images containing only the agent jar file (and/or extensions). As a result, java agent distributions are required to useFROM busybox
or another (linux) distribution, which brings a set of binaries.This unnecessarily exposes java agent images to vulnerabilities for which the java agent isn't directly related related. This may also make windows compatibility more challenging if
cp
is required.I don't know kubernetes operators well enough right now to suggest how this might be addressed, but would appreciate it if we can give this some consideration. Thanks!
The text was updated successfully, but these errors were encountered: