-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implement cleanup of temporary files after execution #62
Conversation
…helmfile_release_set to NewCommandWithKubeconfig of helmfile_release_set. This is a function that actually executes helmfile binary.
7182039
to
34dba79
Compare
…t used temporarty helmfile path. Handle tmpHelmfilPath removal in all places where `NewCommandWithKubeconfig` executed. Unify path for temporart helmfile and other tmp provider resources.
… cause it causes issue that dir not exist. Making provider delete tmp directory after run
@mumoshu PR is ready for review. |
@mumoshu PR is ready for review. Each change and it's reason described in commit messages |
Any chance to get it merged? |
// panic: interface conversion: interface {} is nil, not string | ||
if path := d.Get(KeyPath); path != nil { | ||
f.Path = path.(string) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this and make necessary changes(if any) later but one thing to ask here- What was the rationale behind removing this feature (specifying an existing path) in this pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mumoshu When I started finding root cause of persisting tmp files, i found that there's two separate pieces of code creating tmp files for releases:
- Creation of helmfile for standalone helm release
- Copying existing helmfile before apply
This cases had completely different places where tmp files were created, so I refactored both cases to pass helmfile content same way and make same tmp file creation code for them.
When I sent this PR I tested that both terraform resources works fine with this PR, so my idea was unification of tmp file creation without breaking how terraform resources works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM with only one question! Thanks for your contribution @dm3ch
Implement cleanup of temporary helmfiles after execution
/fix #59