1
0
mirror of synced 2026-03-19 17:26:55 +00:00

Merge pull request #1984 from fluxcd/fix-bootstrap-path-check

Fix bootstrap path check
This commit is contained in:
Stefan Prodan
2021-10-22 11:43:53 +03:00
committed by GitHub

View File

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