From 89111f76aeefa5b32165df4d5942366bd25fb9a3 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:55:04 +0800 Subject: [PATCH] feat: add JAVA_AGENT_FRAMEWORK_NAME and JAVA_AGENT_FRAMEWORK_VERSION for javaagent inject (#172) --- pkg/inject/pkg/kube/inject/apply/javaagent/patch.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/inject/pkg/kube/inject/apply/javaagent/patch.go b/pkg/inject/pkg/kube/inject/apply/javaagent/patch.go index bd898951..f0c1c7e7 100644 --- a/pkg/inject/pkg/kube/inject/apply/javaagent/patch.go +++ b/pkg/inject/pkg/kube/inject/apply/javaagent/patch.go @@ -113,6 +113,14 @@ func (pb *PodPatchBuilder) handleJavaAgentInit(opt *inject.PatchOptions, pod *co Name: "JAVA_AGENT_PLUGIN_TYPE", Value: pluginType, }) + add.Env = append(add.Env, corev1.EnvVar{ + Name: "JAVA_AGENT_FRAMEWORK_NAME", + Value: frameworkName, + }) + add.Env = append(add.Env, corev1.EnvVar{ + Name: "JAVA_AGENT_FRAMEWORK_VERSION", + Value: frameworkVersion, + }) kubeClient := opt.KubeClient pluginCm, err := kubeClient.CoreV1().ConfigMaps(util.RootNamespace).Get(context.Background(), "plugin-default.properties", metav1.GetOptions{})