plan to inject arbitrary string secrets defined in periphery config into deployment configuration

This commit is contained in:
beckerinj
2022-11-21 19:35:25 -05:00
parent a91fd11844
commit d15d2ca56b
2 changed files with 8 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
port = 9001 # optional. 9001 is default
is_builder = false # optional. false is default
repo_dir = "/repos" # optional. /repos is default
repo_dir = "/repos" # optional. /repos is default. no reason to change if running the docker container, just mount your desired repo dir to /repos in the container
[secrets] # optional. can inject these values into your deployments configuration.
secret_variable = "secret_value"
[github_accounts] # optional
github_username1 = "github_token1"

View File

@@ -20,6 +20,8 @@ pub type DockerUsername = String;
pub type DockerToken = String;
pub type DockerAccounts = HashMap<DockerUsername, DockerToken>;
pub type SecretsMap = HashMap<String, String>; // these are used for injection into deployments run commands
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
pub struct User {
#[serde(rename = "_id", skip_serializing_if = "Option::is_none")]
@@ -325,6 +327,8 @@ pub struct PeripheryConfig {
pub docker_accounts: DockerAccounts,
#[serde(default)]
pub github_accounts: GithubAccounts,
#[serde(default)]
pub secrets: SecretsMap,
#[serde(default = "default_repo_dir")]
pub repo_dir: String,
}