Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative filepaths in generated kustomization and during build #578

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 10, 2020

Work around for a bug in kustomize causing it to not properly
handle absolute paths on Windows.

  • flux install confirmed working on Windows 10
  • flux bootstrap confirmed working on Windows 10

Fixes #362

Work around for a bug in kustomize causing it to not properly
handle absolute paths on Windows.

Signed-off-by: Hidde Beydals <hello@hidde.co>
This works around another bug on Windows platforms that would cause the
kustomize-controller to choke on the kustomization.yaml generated by the
bootstrap command due to the filepath being in a Windows format.

By using `filepath.Rel`, the output is _just_ the filename for files
relative to the bootstrap path, which is at the moment sufficient to
make it work.

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco requested a review from stefanprodan December 10, 2020 17:47
@hiddeco hiddeco added area/bootstrap Bootstrap related issues and pull requests area/install Install and uninstall related issues and pull requests bug Something isn't working labels Dec 10, 2020
@hiddeco hiddeco marked this pull request as ready for review December 10, 2020 17:48
@hiddeco hiddeco changed the title Use path rel to working dir for kustomize build Use (proper) relative filepaths in generated kustomization and during build Dec 10, 2020
@hiddeco hiddeco changed the title Use (proper) relative filepaths in generated kustomization and during build Use relative filepaths in generated kustomization and during build Dec 10, 2020
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @hiddeco 🥇

@hiddeco hiddeco merged commit be6fab7 into main Dec 10, 2020
@hiddeco hiddeco deleted the rel-base-path branch December 10, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bootstrap Bootstrap related issues and pull requests area/install Install and uninstall related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"gotk install" fails on Windows
2 participants