Closed rootd00d closed 3 years ago
I was 90% through writing this issue when I decided to ensure that our Helm versions were fully up to date. After upgrading to Helm 3.4.2, this doesn't appear to be a problem anymore. The issue was likely something Helm-specific, and this kind of init container rewriting of the deployment spec appears to be supported now.
I decided to finish filing the issue in case someone else out there hits this. When looking for a solution I wasn't able to find anything to steer me in the right direction, so hopefully this might help someone out in the future.
The AppDynamics cluster agent appears to work by running an init container that copies the AppDynamics language-specific agent and instrumentation shim into the application container. It does so by creating an emptyDir volume named "appd-agent-repo-nodejs" (in our case, anyways) that is mounted by the init container, and the application container. This appears to be accomplished by modifying the deployment spec to define the volume and have the application container mount the volume.
A problem arises when attempting to deploy the service again, as it will generate the following error --
This is because the deployment spec has been updated and the application Helm chart does not match anymore. One workaround was to try adding the "appd-agent-repo-nodejs" emptyDir volume manually to each service Helm chart, which seemed to work, at least for deploying the chart. However, when the containers would actually try to start the AppDynamics cluster agent seemed to skip actually performing the instrumentation, and the services would fail to start with this error --