gitops-engine
gitops-engine copied to clipboard
Enable consumers of gitops-engine API to specify an alternative temp directory for generated manifests, as an alternative '/dev/shm'
See parent issue for details: https://github.com/argoproj/gitops-engine/issues/614
This PR:
- When calling gitops-engine, you will now need to explicitly define the temporary path to write kubectl manifests to:
- Add new parameter
tmpManifestPath
to public APIs:-
NewEngine
inpkg/engine/engine.go
-
NewClusterCache
in `pkg/cache/cluster.go
-
- In both cases, when calling these functions, you now must specify where to store temporary manifest files that are generated
- If you wish to preserve the existing behaviour, just use the value from calling
io.TempPathUseDevShmIfAvailable()
(see examples in this PR)
- Add new parameter
- Updates existing gitops-engine code to use new API
- Preserves the existing behaviour of the code: code and tests that were previously using
/dev/shm
will continue to do so - Updates
pkg/utils/io/io.go
API to make it more explicit about behaviour