From 9f1fdb823bdd3c155dc297cabfd35e760394a6d8 Mon Sep 17 00:00:00 2001 From: Morgan Creekmore Date: Tue, 21 Jan 2025 16:14:14 -0600 Subject: [PATCH] Disable hierarchy cache for java agent --- .../Reactions/Injecting/Patching/Agents/JavaAgentPatcher.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/JavaAgentPatcher.cs b/src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/JavaAgentPatcher.cs index 07ec409..71a6bdf 100644 --- a/src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/JavaAgentPatcher.cs +++ b/src/Contrast.K8s.AgentOperator/Core/Reactions/Injecting/Patching/Agents/JavaAgentPatcher.cs @@ -23,6 +23,9 @@ public IEnumerable GenerateEnvVars(PatchingContext context) yield return new V1EnvVar("CONTRAST__AGENT__CONTRAST_WORKING_DIR", context.WritableMountPath); yield return new V1EnvVar("CONTRAST__AGENT__LOGGER__PATH", $"{context.WritableMountPath}/logs/contrast_agent.log"); yield return new V1EnvVar("CONTRAST_INSTALL_SOURCE", "kubernetes-operator"); + + //Disable hierarchy cache since we are in containers + yield return new V1EnvVar("CONTRAST__ASSESS__CACHE__HIERARCHY_ENABLE", "false"); } public void PatchContainer(V1Container container, PatchingContext context)