Skip to content

Commit

Permalink
fix:修复java-agent注入时plugin.enable格式不对 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Feb 1, 2024
1 parent c477979 commit 3ec5645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/inject/pkg/kube/inject/apply/javaagent/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import (

// Java Agent 场景下的特殊 annonations 信息
const (
customJavaAgentVersion = "polarismesh.cn/java-agent/version"
customJavaAgentPluginFramework = "polarismesh.cn/java-agent/framework-name"
customJavaAgentPluginFrameworkVersion = "polarismesh.cn/java-agent/framework-version"
customJavaAgentPluginConfig = "polarismesh.cn/java-agent/config"
customJavaAgentVersion = "polarismesh.cn/javaagentVersion"
customJavaAgentPluginFramework = "polarismesh.cn/javaagentFrameworkName"
customJavaAgentPluginFrameworkVersion = "polarismesh.cn/javaagentFrameworkVersion"
customJavaAgentPluginConfig = "polarismesh.cn/javaagentConfig"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/inject/pkg/kube/inject/inject.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func validateBool(value string) error {
// getSidecarMode 获取 sidecar 注入模式
func (wh *Webhook) getSidecarMode(namespace string, pod *corev1.Pod) utils.SidecarMode {
// 这里主要是处理北极星 sidecar, 优先级: pod.annotations > namespace.labels > configmap
if val, ok := pod.Annotations["polarismesh.cn/java-agent"]; ok && val == "true" {
if val, ok := pod.Annotations["polarismesh.cn/javaagent"]; ok && val == "true" {
return utils.SidecarForJavaAgent
}
sidecarMode := ""
Expand Down

0 comments on commit 3ec5645

Please sign in to comment.