File tree Expand file tree Collapse file tree 14 files changed +263
-110
lines changed
.github/workflows/tests_data Expand file tree Collapse file tree 14 files changed +263
-110
lines changed Original file line number Diff line number Diff line change 10
10
deploymentName : sample-deployment
11
11
secretName : lightrun-secrets
12
12
serverHostname : dogfood.internal.lightrun.com
13
+ useSecretsAsMountedFiles : false
13
14
agentEnvVarName : JAVA_TOOL_OPTIONS
14
15
agentConfig :
15
16
max_log_cpu_cost : " 2"
Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ type LightrunJavaAgentSpec struct {
93
93
// +optional
94
94
// Agent name for registration to the server
95
95
AgentName string `json:"agentName,omitempty"`
96
+
97
+ // UseSecretsAsMountedFiles determines whether to use secret values as mounted files (true) or as environment variables (false)
98
+ // +kubebuilder:default=false
99
+ UseSecretsAsMountedFiles bool `json:"useSecretsAsMountedFiles,omitempty"`
96
100
}
97
101
98
102
// LightrunJavaAgentStatus defines the observed state of LightrunJavaAgent
Original file line number Diff line number Diff line change 29
29
secretName : {{ .name }}-secret
30
30
{{- end }}
31
31
serverHostname : {{ .serverHostname }}
32
+ {{- if .useSecretsAsMountedFiles }}
33
+ useSecretsAsMountedFiles : {{ .useSecretsAsMountedFiles | default false }}
34
+ {{- end }}
32
35
agentEnvVarName : {{ .agentEnvVarName | default "JAVA_TOOL_OPTIONS" }}
33
36
{{- if .agentConfig }}
34
37
agentConfig : {{ toYaml .agentConfig | nindent 4 }}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ javaAgents: []
19
19
# containerSelector:
20
20
# - my-container-1
21
21
# serverHostname: 'lightrun.example.com'
22
+ # useSecretsAsMountedFiles: false
22
23
# initContainer:
23
24
# image: "lightruncom/k8s-operator-init-java-agent-linux:latest"
24
25
# imagePullPolicy: "IfNotPresent"
@@ -42,6 +43,7 @@ javaAgents: []
42
43
# containerSelector:
43
44
# - my-container-2
44
45
# serverHostname: 'lightrun.example.com'
46
+ # useSecretsAsMountedFiles: false
45
47
# agentPoolCredentials:
46
48
# existingSecret: "my-existing-secret"
47
49
# apiKey: ""
@@ -69,6 +71,7 @@ javaAgents: []
69
71
# containerSelector:
70
72
# - my-container-1
71
73
# serverHostname: 'lightrun.example.com'
74
+ # useSecretsAsMountedFiles: false
72
75
# agentEnvVarName: '_JAVA_OPTIONS'
73
76
# agentConfig:
74
77
# max_log_cpu_cost: "2"
@@ -100,6 +103,7 @@ javaAgents: []
100
103
# containerSelector:
101
104
# - my-container-2
102
105
# serverHostname: 'lightrun.example.com'
106
+ # useSecretsAsMountedFiles: false
103
107
# agentEnvVarName: 'JAVA_OPTS'
104
108
# agentConfig:
105
109
# max_log_cpu_cost: "2"
Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ spec:
123
123
Lightrun server hostname that will be used for downloading an agent
124
124
Key and company id in the secret has to be taken from this server as well
125
125
type : string
126
+ useSecretsAsMountedFiles :
127
+ default : false
128
+ description : UseSecretsAsMountedFiles determines whether to use secret
129
+ values as mounted files (true) or as environment variables (false)
130
+ type : boolean
126
131
workloadName :
127
132
description : Name of the Workload that will be patched. workload can
128
133
be either Deployment or StatefulSet e.g. my-deployment, my-statefulset
Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ spec:
124
124
Lightrun server hostname that will be used for downloading an agent
125
125
Key and company id in the secret has to be taken from this server as well
126
126
type : string
127
+ useSecretsAsMountedFiles :
128
+ default : false
129
+ description : UseSecretsAsMountedFiles determines whether to use secret
130
+ values as mounted files (true) or as environment variables (false)
131
+ type : boolean
127
132
workloadName :
128
133
description : Name of the Workload that will be patched. workload can
129
134
be either Deployment or StatefulSet e.g. my-deployment, my-statefulset
Original file line number Diff line number Diff line change 11
11
workloadType : Deployment
12
12
secretName : lightrun-secrets
13
13
serverHostname : <lightrun_server> # for saas it will be app.lightrun.com
14
+ useSecretsAsMountedFiles : false
14
15
agentEnvVarName : JAVA_TOOL_OPTIONS
15
16
agentConfig :
16
17
max_log_cpu_cost : " 2"
Original file line number Diff line number Diff line change @@ -135,6 +135,11 @@ spec:
135
135
Lightrun server hostname that will be used for downloading an agent
136
136
Key and company id in the secret has to be taken from this server as well
137
137
type : string
138
+ useSecretsAsMountedFiles :
139
+ default : false
140
+ description : UseSecretsAsMountedFiles determines whether to use secret
141
+ values as mounted files (true) or as environment variables (false)
142
+ type : boolean
138
143
workloadName :
139
144
description : Name of the Workload that will be patched. workload can
140
145
be either Deployment or StatefulSet e.g. my-deployment, my-statefulset
Original file line number Diff line number Diff line change 51
51
# If container not mentioned here it will be not patched
52
52
containerSelector :
53
53
- app
54
+ # useSecretsAsMountedFiles determines whether to use secret values as environment variables (false) or as mounted files (true)
55
+ # Default is false for backward compatibility
56
+ useSecretsAsMountedFiles : false
54
57
---
55
58
apiVersion : v1
56
59
metadata :
Original file line number Diff line number Diff line change 61
61
- latest
62
62
# Agent name. If not provided, pod name will be used
63
63
# agentName: "operator-test-agent"
64
+
65
+ # UseSecretsAsMountedFiles determines whether to use secret values as mounted files (true) or as environment variables (false)
66
+ # Default is false for better security practices
67
+ useSecretsAsMountedFiles : false
Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ spec:
125
125
Lightrun server hostname that will be used for downloading an agent
126
126
Key and company id in the secret has to be taken from this server as well
127
127
type : string
128
+ useSecretsAsMountedFiles :
129
+ default : false
130
+ description : UseSecretsAsMountedFiles determines whether to use secret
131
+ values as mounted files (true) or as environment variables (false)
132
+ type : boolean
128
133
workloadName :
129
134
description : Name of the Workload that will be patched. workload can
130
135
be either Deployment or StatefulSet e.g. my-deployment, my-statefulset
You can’t perform that action at this time.
0 commit comments