From a43687734935dff99579eeabb78f06015e8fae4e Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Mon, 16 Dec 2024 08:39:44 -0800 Subject: [PATCH] Use dev migrations image for EC dev (#5055) * Use dev migrations image for EC dev --- dev/patches/kotsadm-up.yaml | 5 +++++ dev/scripts/up-ec.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dev/patches/kotsadm-up.yaml b/dev/patches/kotsadm-up.yaml index 167c7c417e..f08028fef1 100644 --- a/dev/patches/kotsadm-up.yaml +++ b/dev/patches/kotsadm-up.yaml @@ -17,6 +17,11 @@ spec: values: - {{ .Env.EC_NODE }} {{- end }} + initContainers: + - name: schemahero-plan + image: kotsadm-migrations-dev + - name: schemahero-apply + image: kotsadm-migrations-dev containers: - name: kotsadm image: kotsadm-api-dev diff --git a/dev/scripts/up-ec.sh b/dev/scripts/up-ec.sh index dfdb165127..630a7b566e 100755 --- a/dev/scripts/up-ec.sh +++ b/dev/scripts/up-ec.sh @@ -21,6 +21,11 @@ fi # Build and load the image into the embedded cluster ec_build_and_load "$component" +# Use the dev image for kotsadm migrations +if [ "$component" == "kotsadm" ]; then + ec_build_and_load "kotsadm-migrations" +fi + # The kotsadm dev image does not have a web component, and kotsadm-web service does not exist in embedded cluster. # Deploy kotsadm-web service instead of shipping a web component in the kotsadm dev image so # we can achieve a faster dev experience with hot reloading.