Skip to content

Commit 345d465

Browse files
committed
Refactor agent environment variable configuration to use 'envs' instead of 'env'
1 parent 26d3afb commit 345d465

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

deploy/all-cr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ data:
462462
agent:
463463
image: ghcr.m.daocloud.io/jd-opensource/joylive-agent
464464
version: v1.6.0
465-
env:
465+
envs:
466466
JAVA_TOOL_OPTIONS: -javaagent:/joylive/live.jar
467467
logback.xml: |
468468
<?xml version="1.0" encoding="UTF-8"?>

deploy/joylive-injector/config/injector.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
agent:
33
image: {{ .Values.agent.image.repository }}
44
version: {{ .Values.agent.image.tag }}
5-
env:
6-
{{ .Values.agent.env }}: -javaagent:/joylive/live.jar
5+
envs:
6+
{{- toYaml .Values.agent.envs | nindent 4 }}

deploy/joylive-injector/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ serviceAccount:
3535
name: joylive-injector
3636

3737
agent:
38-
env: JAVA_TOOL_OPTIONS
38+
envs:
39+
JAVA_TOOL_OPTIONS: -javaagent:/joylive/live.jar
3940
image:
4041
repository: ghcr.m.daocloud.io/jd-opensource/joylive-agent
4142
tag: v1.6.0
22 Bytes
Binary file not shown.

pkg/config/injector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type AgentInjectorConfig struct {
1313
type Agent struct {
1414
Image string `yaml:"image"`
1515
Version string `yaml:"version"`
16-
Env map[string]string `json:"env"`
16+
Envs map[string]string `json:"envs"`
1717
}
1818

1919
func GetAgentInjectConfig(yamlData string) (*AgentInjectorConfig, error) {

0 commit comments

Comments
 (0)