Fix bootstrap path check

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
pull/1984/head
Stefan Prodan 3 years ago
parent ebd145f7f7
commit 4352915945
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF

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

Loading…
Cancel
Save