Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Enable consumers of gitops-engine API to specify an alternative temp directory for generated manifests, as an alternative '/dev/shm'#613

Closed
jgwest wants to merge 1 commit intoargoproj:masterfrom
jgwest:customize-manifest-store-path-may-2024
Closed

Enable consumers of gitops-engine API to specify an alternative temp directory for generated manifests, as an alternative '/dev/shm'#613
jgwest wants to merge 1 commit intoargoproj:masterfrom
jgwest:customize-manifest-store-path-may-2024

Conversation

@jgwest
Copy link
Member

@jgwest jgwest commented Jul 17, 2024

See parent issue for details: #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 in pkg/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)
  • 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

@jgwest jgwest force-pushed the customize-manifest-store-path-may-2024 branch 2 times, most recently from d002f02 to a88f580 Compare July 17, 2024 11:55
@jgwest jgwest changed the title Enable consumers of gitops-engine API to specify an alternative temp directory to '/dev/shm', for generated manifests Enable consumers of gitops-engine API to specify an alternative temp directory for generated manifests, as an alternative '/dev/shm' Jul 18, 2024
Signed-off-by: Jonathan West <jonwest@redhat.com>
@jgwest jgwest force-pushed the customize-manifest-store-path-may-2024 branch from a88f580 to 73c025b Compare July 26, 2024 20:41
@sonarqubecloud
Copy link

@ppapapetrou76
Copy link
Contributor

The gitops-engine repository is migrating to https://github.com/argoproj/argo-cd. We are closing all draft PRs.
Please feel free to submit it again once the migration is over.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants