DataNode: Setting the remote reindexing allowlist separately (#18805)

* setting the whitelist separate from the host that we execute the command against. needs to be two settings because the whitelist can contain wildcards

* adding the whitelist to the UI

* fix import, fix text

* fix test

* changing whitelist -> allowlist

* fixing merge conflicts
This commit is contained in:
Jan Heise
2024-03-28 13:22:04 +01:00
committed by GitHub
parent 2fe91936c9
commit ff630ad1c4
10 changed files with 58 additions and 27 deletions

View File

@@ -109,7 +109,7 @@ public class OpensearchProcessService extends AbstractIdleService implements Pro
switch (event.action()) {
case ADD -> {
this.process.stop();
configure(Map.of("reindex.remote.whitelist", event.host())); // , "action.auto_create_index", "false"));
configure(Map.of("reindex.remote.allowlist", event.allowlist())); // , "action.auto_create_index", "false"));
this.process.start();
}
case REMOVE -> {
@@ -165,7 +165,7 @@ public class OpensearchProcessService extends AbstractIdleService implements Pro
this.configure(Map.of());
}
private void configure(Map<String, String> additionalConfig) {
private void configure(Map<String, Object> additionalConfig) {
final OpensearchConfiguration original = configurationProvider.get();
final var finalAdditionalConfig = new HashMap<String, Object>();