You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/concepts/pages/overrides.adoc
+69Lines changed: 69 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -150,3 +150,72 @@ The `podOverrides` will be merged onto the following resources the operators dep
150
150
They will *not* be applied to:
151
151
152
152
* Jobs, that are used to setup systems the product depends on e.g. create a database schema for Superset or Airflow.
153
+
154
+
[#jvm-argument-overrides]
155
+
== JVM argument overrides
156
+
157
+
You can configure the JVM arguments used by JVM based tools.
158
+
This is often needed to e.g. configure a HTTP proxy or other network settings.
159
+
160
+
As with other overrides, the operator generates a set of JVM arguments that are needed to run the tool. You can specify additional arguments which are merged on top of the ones the operator generated.
161
+
As some JVM arguments are mutually exclusive (think of `-Xmx123m` and `-Xmx456m`), you also have the option to remove JVM arguments - either by specifying the exact argument or a regex.
162
+
163
+
The merging mechanism is applied <operatorgenerated> <- <roleuserspecified> <- <rolegroupuserspecified> and works as follows:
164
+
165
+
1. All arguments listed in user specified `remove` are removed from operator generated
166
+
2. All arguments matching any regex from user removeRegex are removed from operator generated.
167
+
The regex needs to match the entire argument, not only a substring
168
+
3. All arguments from user specified `add` are added to operator
169
+
170
+
You can check the resulting effective JVM arguments by looking at the ConfigMap containing the config for the roleGroup (although some tools read the JVM arguments from environmental variables).
171
+
172
+
=== Simple example
173
+
174
+
One simple usage of this functionality is to add some JVM arguments, in this case needed for a special network setup:
175
+
176
+
[source,yaml]
177
+
----
178
+
kind: NifiCluster
179
+
spec:
180
+
# ...
181
+
nodes:
182
+
jvmArgumentOverrides:
183
+
add: # Add some networking arguments
184
+
- -Dhttps.proxyHost=proxy.my.corp
185
+
- -Dhttps.proxyPort=8080
186
+
- -Djava.net.preferIPv4Stack=true
187
+
----
188
+
189
+
=== Advanced example
190
+
191
+
The following more advanced setups shows how the garbage collector can be changed, the JVM memory configs can be changed and how roleGroups can override roles.
192
+
193
+
[source,yaml]
194
+
----
195
+
kind: NifiCluster
196
+
spec:
197
+
# ...
198
+
nodes:
199
+
config:
200
+
resources:
201
+
memory:
202
+
limit: 42Gi # We define some memory config, so that we can override it further down
203
+
jvmArgumentOverrides:
204
+
remove:
205
+
- -XX:+UseG1GC # Remove argument generated by operator
206
+
add: # Add some networking arguments
207
+
- -Dhttps.proxyHost=proxy.my.corp
208
+
- -Dhttps.proxyPort=8080
209
+
- -Djava.net.preferIPv4Stack=true
210
+
roleGroups:
211
+
default:
212
+
replicas: 1
213
+
jvmArgumentOverrides:
214
+
# We need more memory!
215
+
removeRegex: # They need to match the entire string, not only a part!
216
+
- -Xmx.* # So this will match "-Xmx123m", but not "-foo-Xmx123m"
217
+
- -Dhttps.proxyPort=.* # Remove arguments from the role, so that we can override it
218
+
add: # After we removed some arguments we can add the correct ones
219
+
- -Xmx40000m
220
+
- -Dhttps.proxyPort=1234 # Override arguments from the role
0 commit comments