diff --git a/bootstrap/stage1/crd.tf b/bootstrap/stage1/crd.tf index c1e8b3f..f0f4816 100644 --- a/bootstrap/stage1/crd.tf +++ b/bootstrap/stage1/crd.tf @@ -60,14 +60,6 @@ resource "kubernetes_manifest" "customresourcedefinition_hydradoomnodes_hydra_do } "type" = "array" } - "configmap" = { - "nullable" = true - "type" = "string" - } - "image" = { - "nullable" = true - "type" = "string" - } "initialUtxoAddress" = { "nullable" = true "type" = "string" @@ -81,10 +73,6 @@ resource "kubernetes_manifest" "customresourcedefinition_hydradoomnodes_hydra_do "nullable" = true "type" = "boolean" } - "openHeadImage" = { - "nullable" = true - "type" = "string" - } "participant" = { "type" = "string" } @@ -94,10 +82,6 @@ resource "kubernetes_manifest" "customresourcedefinition_hydradoomnodes_hydra_do "seedInput" = { "type" = "string" } - "sidecarImage" = { - "nullable" = true - "type" = "string" - } } "required" = [ "commitInputs", diff --git a/src/custom_resource.rs b/src/custom_resource.rs index 440c5e0..059347d 100644 --- a/src/custom_resource.rs +++ b/src/custom_resource.rs @@ -39,12 +39,9 @@ pub static HYDRA_DOOM_NODE_FINALIZER: &str = "hydradoomnode/finalizer"; "#)] #[serde(rename_all = "camelCase")] pub struct HydraDoomNodeSpec { - pub image: Option, pub offline: Option, pub initial_utxo_address: Option, - pub open_head_image: Option, - pub sidecar_image: Option, - pub configmap: Option, + // Open head pub network_id: u8, pub seed_input: String, pub participant: String, @@ -172,7 +169,7 @@ impl HydraDoomNode { spec: Some(PodSpec { init_containers: Some(vec![Container { name: "init".to_string(), - image: Some(self.spec.image.clone().unwrap_or(config.image.clone())), + image: Some(config.image.clone()), args: Some(vec![ "gen-hydra-key".to_string(), "--output-file".to_string(), @@ -188,9 +185,7 @@ impl HydraDoomNode { containers: vec![ Container { name: "main".to_string(), - image: Some( - self.spec.image.clone().unwrap_or(config.image.clone()), - ), + image: Some(config.image.clone()), args: Some(vec![ "offline".to_string(), "--host".to_string(), @@ -238,12 +233,7 @@ impl HydraDoomNode { }, Container { name: "sidecar".to_string(), - image: Some( - self.spec - .sidecar_image - .clone() - .unwrap_or(config.sidecar_image.clone()), - ), + image: Some(config.sidecar_image.clone()), args: Some(vec![ "metrics-exporter".to_string(), "--host".to_string(), @@ -281,11 +271,7 @@ impl HydraDoomNode { Volume { name: "config".to_string(), config_map: Some(ConfigMapVolumeSource { - name: self - .spec - .configmap - .clone() - .unwrap_or(config.configmap.clone()), + name: config.configmap.clone(), ..Default::default() }), ..Default::default()