forked from vespa-engine/vespa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Inject AsmSecretStore""
- Loading branch information
Showing
5 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
config-model/src/main/java/com/yahoo/vespa/model/container/xml/CloudAsmSecrets.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// 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()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
container-disc/src/main/java/ai/vespa/secret/config/aws/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// 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; |
2 changes: 1 addition & 1 deletion
2
...esources/configdefinitions/asm-secret.def → ...esources/configdefinitions/asm-secret.def
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Config for AsmSecretStore | ||
|
||
package=ai.vespa.secret.aws | ||
package=ai.vespa.secret.config.aws | ||
|
||
ztsUri string |
1 change: 1 addition & 0 deletions
1
jdisc-cloud-aws/src/main/java/ai/vespa/secret/aws/AsmSecretStore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters