From ccc07f12413726bc9ccc7f7707e3b70db6632a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gj=C3=B8ran=20Voldengen?= Date: Wed, 2 Oct 2024 14:56:41 +0200 Subject: [PATCH] Revert "Revert "Revert "Inject AsmSecretStore""" --- .../model/container/xml/CloudAsmSecrets.java | 31 ------------------- .../container/xml/ContainerModelBuilder.java | 1 - .../vespa/secret/config/aws/package-info.java | 6 ---- .../ai/vespa/secret/aws/AsmSecretStore.java | 1 - .../configdefinitions/asm-secret.def | 2 +- 5 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 config-model/src/main/java/com/yahoo/vespa/model/container/xml/CloudAsmSecrets.java delete mode 100644 container-disc/src/main/java/ai/vespa/secret/config/aws/package-info.java rename {container-disc => jdisc-cloud-aws}/src/main/resources/configdefinitions/asm-secret.def (55%) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/CloudAsmSecrets.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/CloudAsmSecrets.java deleted file mode 100644 index 019e76e554ec..000000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/CloudAsmSecrets.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.container.xml; - -import ai.vespa.secret.config.aws.AsmSecretConfig; -import com.yahoo.container.bundle.BundleInstantiationSpecification; -import com.yahoo.osgi.provider.model.ComponentModel; -import com.yahoo.vespa.model.container.component.SimpleComponent; - -import java.net.URI; - -/** - * @author lesters - */ -public class CloudAsmSecrets extends SimpleComponent implements AsmSecretConfig.Producer { - - private static final String CLASS = "ai.vespa.secret.aws.AsmSecretStore"; - private static final String BUNDLE = "jdisc-cloud-aws"; - - private final URI ztsUri; - - public CloudAsmSecrets(URI ztsUri) { - super(new ComponentModel(BundleInstantiationSpecification.fromStrings(CLASS, CLASS, BUNDLE))); - this.ztsUri = ztsUri; - } - - @Override - public void getConfig(AsmSecretConfig.Builder builder) { - builder.ztsUri(ztsUri.toString()); - } - -} 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 fbc195d9bec1..4a6cc80173ee 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 @@ -315,7 +315,6 @@ private void addSecrets(ApplicationContainerCluster cluster, Element spec, Deplo secretsConfig.addSecret(key, name, vault); } cluster.addComponent(secretsConfig); - cluster.addComponent(new CloudAsmSecrets(deployState.getProperties().ztsUrl())); } } diff --git a/container-disc/src/main/java/ai/vespa/secret/config/aws/package-info.java b/container-disc/src/main/java/ai/vespa/secret/config/aws/package-info.java deleted file mode 100644 index 1e505273b807..000000000000 --- a/container-disc/src/main/java/ai/vespa/secret/config/aws/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -@ExportPackage -package ai.vespa.secret.config.aws; - -import com.yahoo.osgi.annotation.ExportPackage; diff --git a/jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretStore.java b/jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretStore.java index 078777dfaa5c..0ad1647c5109 100644 --- a/jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretStore.java +++ b/jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretStore.java @@ -1,6 +1,5 @@ package ai.vespa.secret.aws; -import ai.vespa.secret.config.aws.AsmSecretConfig; import ai.vespa.secret.internal.TypedSecretStore; import ai.vespa.secret.model.Key; import ai.vespa.secret.model.Role; diff --git a/container-disc/src/main/resources/configdefinitions/asm-secret.def b/jdisc-cloud-aws/src/main/resources/configdefinitions/asm-secret.def similarity index 55% rename from container-disc/src/main/resources/configdefinitions/asm-secret.def rename to jdisc-cloud-aws/src/main/resources/configdefinitions/asm-secret.def index 56d9ad6d12b5..0ec42b27601d 100644 --- a/container-disc/src/main/resources/configdefinitions/asm-secret.def +++ b/jdisc-cloud-aws/src/main/resources/configdefinitions/asm-secret.def @@ -1,5 +1,5 @@ # Config for AsmSecretStore -package=ai.vespa.secret.config.aws +package=ai.vespa.secret.aws ztsUri string