-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Epic] Agent dynamic attach #233
Comments
As seen done by another project recently, the Agent JAR could be built into a simple JAR-carrier container image, ex: FROM scratch
COPY ./target/cryostat-agent.jar /cryostat/ This would be an easy way for application images to consume the Agent JAR - rather than manually downloading the JAR to the build machine and copying it into the container build, they could use a multi-stage container build like: FROM cryostat/agent-carrier:latest as cryostat-agent
RUN echo '' # no-op, can this be removed?
FROM base-image
COPY --from=cryostat-agent /cryostat/cryostat-agent.jar /app/deployment/lib
... copy application artifacts in Alternatively, this JAR-carrier image can be used as an init container in the application's Deployment to achieve the same result dynamically, if there is a volume shared between the init container and the application container:
|
This is a good reference for the same/similar technique, which also includes the technique of modifying the target container's Discussion on dynamic attach mechanisms over here: cryostatio/cryostat-operator#784 |
Since the init container needs at least FROM docker.io/library/busybox:latest
COPY ./target/cryostat-agent.jar /cryostat/ |
Currently, the only way to get the Cryostat Agent attached and running on a target application is with the
-javaagent
JVM flag. This means the end user must be able to modify their application launch setup to add this flag, and the user must get the Agent JAR into the application's filesystem somehow, ex. building it into the application image or supplying it in a mounted volume. The user must also decide before launching their application whether they would like to use the Cryostat Agent or not, and if they decide to add the Cryostat Agent later, their application must be restarted.It should be possible to decouple the Cryostat Agent from these assumptions for the most part.
-javaagent
flag, but would be able to spawn a process within the container or launch a sidecar containercryostat-operator
that can bundle the Agent JAR and supply it as a mounted volume if the user simply adds some annotation to their application Deployment, for example.If the Agent implements dynamic attach and provides some additional mechanisms to supply its required configurations then the major potential deployment blockers in the above scenarios can be alleviated.
The text was updated successfully, but these errors were encountered: