From 4352915945bca4d90b733283d05391495b205fa2 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 22 Oct 2021 10:55:31 +0300 Subject: [PATCH] Fix bootstrap path check Signed-off-by: Stefan Prodan --- internal/bootstrap/bootstrap.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index 96f90490..d3b79ed6 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -159,6 +159,10 @@ func kustomizationPathDiffers(ctx context.Context, kube client.Client, objKey cl return "", err } normalizePath := func(p string) string { + // remove the trailing '/' if the path is not './' + if len(p) > 2 { + p = strings.TrimSuffix(p, "/") + } return fmt.Sprintf("./%s", strings.TrimPrefix(p, "./")) } if normalizePath(path) == normalizePath(k.Spec.Path) {