From 055958d5332d26e7b82789a77bb9e7575eecccc5 Mon Sep 17 00:00:00 2001 From: Matheus Pimenta Date: Sun, 12 Jan 2025 13:58:22 +0000 Subject: [PATCH] Fix create command always using imageRepositoryType Signed-off-by: Matheus Pimenta --- cmd/flux/create.go | 2 +- cmd/flux/testdata/image/create_image_policy.golden | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/flux/create.go b/cmd/flux/create.go index 209c8f0a..d2691397 100644 --- a/cmd/flux/create.go +++ b/cmd/flux/create.go @@ -125,7 +125,7 @@ func (names apiType) upsertAndWait(object upsertWaitable, mutate func() error) e logger.Generatef("generating %s", names.kind) logger.Actionf("applying %s", names.kind) - namespacedName, err := imageRepositoryType.upsert(ctx, kubeClient, object, mutate) + namespacedName, err := names.upsert(ctx, kubeClient, object, mutate) if err != nil { return err } diff --git a/cmd/flux/testdata/image/create_image_policy.golden b/cmd/flux/testdata/image/create_image_policy.golden index d08caac6..7d346943 100644 --- a/cmd/flux/testdata/image/create_image_policy.golden +++ b/cmd/flux/testdata/image/create_image_policy.golden @@ -1,5 +1,5 @@ ✚ generating ImagePolicy ► applying ImagePolicy -✔ ImageRepository created +✔ ImagePolicy created ◎ waiting for ImagePolicy reconciliation ✔ ImagePolicy reconciliation completed