Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix issue preventing includeed sources from being mapped to the repo root #1659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

solidDoWant
Copy link

This PR fixes #1657. With this change, it should be possible to configure a GitRepository like so:

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: example
spec:
  # Omitting boilerplate for brevity
  include:
    - repository:
        name: some-other-repo
      fromPath: /some/other/repos/path
      toPath: /  # This line does not work without this patch

This approach is nice because Kustomizations using the example GitRepository can now set the path field to /some/subdirectory instead of /some/other/repos/path/some/subdirectory, making it easier to read. I've deployed this change and an example of its usage here. An image is available to test this here.

…o root

Signed-off-by: Fred Heinecke <fred.heinecke@yahoo.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot include a repo at the root of another repo (one line fix in description)
1 participant