summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-08-24 15:11:12 +0200
committerJon Bratseth <bratseth@gmail.com>2022-08-24 15:11:12 +0200
commit2d7f6aa4b074b2ef199bd84aceca6ce1584ce96b (patch)
tree042c80c371e4f149742248a969c57dcef1f67d0d /config-model
parent57b9a89b7dac7b68a4b12bafe38b0c3b744274d3 (diff)
Allow embedders where we alloow components
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
index 213c2ca5df0..d43222a39e5 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
@@ -184,7 +184,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
addConfiguredComponents(deployState, cluster, spec);
addSecretStore(cluster, spec, deployState);
- addEmbedderComponents(deployState, cluster, spec);
addModelEvaluation(spec, cluster, context);
addModelEvaluationBundles(cluster);
@@ -352,19 +351,21 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
container.setProp("rotations", String.join(",", rotationsProperty));
}
- private static void addEmbedderComponents(DeployState deployState, ApplicationContainerCluster cluster, Element spec) {
- for (Element node : XML.getChildren(spec, "embedder")) {
+ private static void addEmbedderComponents(DeployState deployState, ApplicationContainerCluster cluster, Element parent) {
+ for (Element node : XML.getChildren(parent, "embedder")) {
Element transformed = EmbedderConfigTransformer.transform(deployState, node);
cluster.addComponent(new DomComponentBuilder().build(deployState, cluster, transformed));
}
}
- private void addConfiguredComponents(DeployState deployState, ApplicationContainerCluster cluster, Element spec) {
- for (Element components : XML.getChildren(spec, "components")) {
+ private void addConfiguredComponents(DeployState deployState, ApplicationContainerCluster cluster, Element parent) {
+ for (Element components : XML.getChildren(parent, "components")) {
addIncludes(components);
addConfiguredComponents(deployState, cluster, components, "component");
+ addEmbedderComponents(deployState, cluster, components);
}
- addConfiguredComponents(deployState, cluster, spec, "component");
+ addConfiguredComponents(deployState, cluster, parent, "component");
+ addEmbedderComponents(deployState, cluster, parent);
}
protected void addStatusHandlers(ApplicationContainerCluster cluster, boolean isHostedVespa) {
@@ -963,8 +964,8 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
}
private static void addConfiguredComponents(DeployState deployState, ContainerCluster<? extends Container> cluster,
- Element spec, String componentName) {
- for (Element node : XML.getChildren(spec, componentName)) {
+ Element parent, String componentName) {
+ for (Element node : XML.getChildren(parent, componentName)) {
cluster.addComponent(new DomComponentBuilder().build(deployState, cluster, node));
}
}