We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
chart_path
While using git repos for helm charts works great for charts that are in subfolders, it becomes impractical once the helm chart is in the root folder.
In a Monrepo approach for GitOps, there is then a git repo in a git repo, which makes checking in the files difficult.
Example:
charts: - name: netbox repo_name: bootc-netbox-git chart_path: / version: 9f537a99928d42f9f1854e95c605db8bc352d4c8 repos: - name: stable url: https://charts.helm.sh/stable - name: bootc-netbox-git type: git url: https://github.com/bootc/netbox-chart.git destinations: - name: default path: ./foobar
Maybe it makes sense here to add an option to delete the .git folder after checkout?
.git
The text was updated successfully, but these errors were encountered:
Hello @Zaunei! I like that idea 😉
Maybe one could use the Skip option when copying the cloned files from the temp directory to the configured destination:
Skip
helm-freeze/exec/helm.go
Line 226 in 9c2d068
opts := copy.Options{ Skip: func(src string) (bool, error) { return filepath.Base(src) == ".git", nil } } err = copy.Copy(clonedRepoDir+"/"+repoPath, chartFolderDestName, opts)
But I don't think we should do it by default, so we would need to add an option to skip copying this file:
repos: # ... - name: bootc-netbox-git type: git keep_git_directory: false url: https://github.com/bootc/netbox-chart.git
keepGitDirectory := true for _, repo := range repos { if repo.kind == "git" && repo.name == chart["repo_name"] { keepGitDirectory = repo.keepGitDirectory chartUrl = repo.url break } } // ... opts := copy.Options{ Skip: func(src string) (bool, error) { return !keepGitDirectory && filepath.Base(src) == ".git", nil } } err = copy.Copy(clonedRepoDir+"/"+repoPath, chartFolderDestName, opts) // ...
Sorry, something went wrong.
No branches or pull requests
While using git repos for helm charts works great for charts that are in subfolders, it becomes impractical once the helm chart is in the root folder.
In a Monrepo approach for GitOps, there is then a git repo in a git repo, which makes checking in the files difficult.
Example:
Maybe it makes sense here to add an option to delete the
.git
folder after checkout?The text was updated successfully, but these errors were encountered: