Skip to content

Commit ca1851d

Browse files
committed
Add writable cache directory for node
1 parent 57d33f1 commit ca1851d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/NodeJsAgentPatcher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public IEnumerable<V1EnvVar> GenerateEnvVars(PatchingContext context)
1717
yield return new V1EnvVar("NODE_OPTIONS", $"--require {context.AgentMountPath}/node_modules/@contrast/agent");
1818
yield return new V1EnvVar("CONTRAST__AGENT__LOGGER__PATH", $"{context.WritableMountPath}/logs/contrast_agent.log");
1919
yield return new V1EnvVar("CONTRAST__AGENT__SECURITY_LOGGER__PATH", $"{context.WritableMountPath}/logs/contrast_agent_cef.log");
20+
yield return new V1EnvVar("CONTRAST__AGENT__NODE__REWRITE__CACHE__PATH", $"{context.WritableMountPath}/cache");
2021
yield return new V1EnvVar("CONTRAST_INSTALLATION_TOOL", "KUBERNETES_OPERATOR");
2122
}
2223
}

src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/NodeJsEsmAgentPatcher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public IEnumerable<V1EnvVar> GenerateEnvVars(PatchingContext context)
1717
yield return new V1EnvVar("NODE_OPTIONS", $"--import {context.AgentMountPath}/node_modules/@contrast/agent/lib/esm-loader.mjs");
1818
yield return new V1EnvVar("CONTRAST__AGENT__LOGGER__PATH", $"{context.WritableMountPath}/logs/contrast_agent.log");
1919
yield return new V1EnvVar("CONTRAST__AGENT__SECURITY_LOGGER__PATH", $"{context.WritableMountPath}/logs/contrast_agent_cef.log");
20+
yield return new V1EnvVar("CONTRAST__AGENT__NODE__REWRITE__CACHE__PATH", $"{context.WritableMountPath}/cache");
2021
yield return new V1EnvVar("CONTRAST_INSTALLATION_TOOL", "KUBERNETES_OPERATOR");
2122
}
2223
}

0 commit comments

Comments
 (0)