Skip to content

Commit

Permalink
feat: add init image name for ceramic
Browse files Browse the repository at this point in the history
  • Loading branch information
3benbox committed Mar 21, 2024
1 parent 9f64d70 commit 54298cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions operator/src/network/ceramic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ pub fn service_spec() -> ServiceSpec {
pub struct CeramicConfig {
pub weight: i32,
pub init_config_map: String,
pub init_image_name: String,
pub image: String,
pub image_pull_policy: String,
pub ipfs: IpfsConfig,
Expand Down Expand Up @@ -254,6 +255,7 @@ impl Default for CeramicConfig {
init_config_map: INIT_CONFIG_MAP_NAME.to_owned(),
image: "ceramicnetwork/composedb:latest".to_owned(),
image_pull_policy: "Always".to_owned(),
init_image_name: "ceramicnetwork/composedb-cli:latestt".to_owned(),
ipfs: IpfsConfig::default(),
resource_limits: ResourceLimitsConfig {
cpu: Some(Quantity("250m".to_owned())),
Expand Down Expand Up @@ -292,6 +294,7 @@ impl From<CeramicSpec> for CeramicConfig {
Self {
weight: value.weight.unwrap_or(default.weight),
init_config_map: value.init_config_map.unwrap_or(default.init_config_map),
init_image_name: value.init_image_name.unwrap_or(default.init_image_name),
image: value.image.unwrap_or(default.image),
image_pull_policy: value.image_pull_policy.unwrap_or(default.image_pull_policy),
ipfs: value.ipfs.map(Into::into).unwrap_or(default.ipfs),
Expand Down
2 changes: 2 additions & 0 deletions operator/src/network/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ pub struct CeramicSpec {
pub weight: Option<i32>,
/// Name of a config map with a ceramic-init.sh script that runs as an initialization step.
pub init_config_map: Option<String>,
/// Name of the image to initialize the ceramic container.
pub init_image_name: Option<String>,
/// Image of the ceramic container.
pub image: Option<String>,
/// Pull policy for the ceramic container image.
Expand Down

0 comments on commit 54298cf

Please sign in to comment.