Skip to content

Download remote chart to Archive dir - #30

Merged
databus23 merged 1 commit into
databus23:masterfrom
codenio:bug-fix/fix-remote-repo-access
Feb 28, 2018
Merged

databus23 merged 1 commit into
databus23:masterfrom
codenio:bug-fix/fix-remote-repo-access

Conversation

@codenio

@codenio codenio commented Feb 20, 2018

Copy link
Copy Markdown
Contributor

Downloading remote chart to Archive dir (~/.helm/cache/archive) would keep the current dir clean.

@elemental-lf

Copy link
Copy Markdown
Contributor

Sounds like a good idea to prevent clutter. Could there be any issues when running multiple helm instances in parallel? I haven't looked into DownloadTo to see if it does any locking or so.

@codenio

codenio commented Feb 22, 2018

Copy link
Copy Markdown
Contributor Author

I just made it to mimics the way, Helm works. It works fine to me (as am using them often)
BTW what do you mean by running multiple helm instances in parallel? could you be brief?

@elemental-lf

Copy link
Copy Markdown
Contributor

@aananthraj I mean multiple instances of helm running under the same user account at the same time and so using the same archive directory. I haven't looked into the Helm source code if it does anything to prevent races between different processes when both try to download the same chart to the archive directory at the same time and so possibly corrupting the file or leading to failed verifications of the chart. If locking is done in downloadTo we'd be fine. If this isn't the case then we'd need to mimic the locking logic in helm diff, too, when writing to the shared archive directory.

@codenio

codenio commented Feb 25, 2018 •

Copy link
Copy Markdown
Contributor Author

@elemental-lf , That was nice. Thanks..!!.

I have a query.

when both try to download the same chart to the archive directory at the same time and so possibly corrupting the file or leading to failed verifications of the chart.

This could happen in PWD as well right..?, I mean when charts are downloaded to current working directory.

upon inspection codes of helm and helm diff plugin, I would like to share the following infrence.

helm diff plugin uses DownloadTo func from Helm's official k8s.io/helm/pkg/downloader package.

If this isn't the case then we'd need to mimic the locking logic in helm diff, too, when writing to the shared archive directory

so logic would be exactly the same.

@elemental-lf

Copy link
Copy Markdown
Contributor

This would also happen with the download to the cwd. But if there is a locking problem (at all), then it would be confined. I took a quick look at Helm now and I don't see any looking, so we're probably fine (or not worse than Helm itself).

@codenio

codenio commented Feb 28, 2018

Copy link
Copy Markdown
Contributor Author

ya, exactly 😄 , can this be merged..? now.

@databus23
databus23 merged commit 1d3b781 into databus23:master Feb 28, 2018
@databus23

Copy link
Copy Markdown
Owner

Thanks!

@codenio

codenio commented Mar 1, 2018

Copy link
Copy Markdown
Contributor Author

Thanks @databus23 and @elemental-lf .
It would be helpful , If we could work together on PR #22 and #24 as well.

@codenio
codenio deleted the bug-fix/fix-remote-repo-access branch April 26, 2018 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants