From 15ebb45854967b25af9895cb9cd7045141158691 Mon Sep 17 00:00:00 2001 From: Michael Francis Date: Sun, 26 May 2024 13:00:54 -0400 Subject: [PATCH] Use the right field for the compute image --- src/main.rs | 2 +- src/neon.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2d67110..96200d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -109,7 +109,7 @@ async fn reconcile(neon: Arc, context: Arc) -> Result neon::reconcile_storage_broker(client.clone(), &namespace).await?; neon::reconcile_page_server(client.clone(), &namespace).await?; neon::reconcile_safe_keepers(client.clone(), &namespace).await?; - neon::reconcile_compute(client.clone(), &namespace, &neon.spec.neon_image_ref).await?; + neon::reconcile_compute(client.clone(), &namespace, &neon.spec.compute_image_ref).await?; Ok(Action::requeue(Duration::from_secs(5))) } diff --git a/src/neon.rs b/src/neon.rs index a7b3e15..65facd8 100644 --- a/src/neon.rs +++ b/src/neon.rs @@ -373,7 +373,11 @@ pub async fn reconcile_safe_keepers(client: Client, namespace: &str) -> Result<( Ok(()) } -pub async fn reconcile_compute(client: Client, namespace: &str, image: &str) -> Result<(), Error> { +pub async fn reconcile_compute( + client: Client, + namespace: &str, + compute_image: &str, +) -> Result<(), Error> { let deployment = Deployment { metadata: ObjectMeta { name: Some("compute".to_string()), @@ -394,7 +398,7 @@ pub async fn reconcile_compute(client: Client, namespace: &str, image: &str) -> spec: Some(PodSpec { containers: vec![Container { name: "compute".to_string(), - image: Some(image.to_string()), + image: Some(compute_image.to_string()), ports: Some(vec![ContainerPort { container_port: 9898, ..Default::default()