Use the right field for the compute image

This commit is contained in:
Michael Francis 2024-05-26 13:00:54 -04:00
parent 0db4679a29
commit 15ebb45854
2 changed files with 7 additions and 3 deletions

View File

@ -109,7 +109,7 @@ async fn reconcile(neon: Arc<NeonDatabase>, context: Arc<ContextData>) -> 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)))
}

View File

@ -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()