-
Notifications
You must be signed in to change notification settings - Fork 578
feat: make host mode directory paths configurable #7225
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
base: main
Are you sure you want to change the base?
feat: make host mode directory paths configurable #7225
Conversation
license check fails due to not indexed yet. I'll fix the other things later https://deps.dev/go/github.com%2Ftetratelabs%2Ffunc-e |
6383591
to
5398829
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7225 +/- ##
==========================================
+ Coverage 71.12% 71.19% +0.07%
==========================================
Files 228 229 +1
Lines 40703 40806 +103
==========================================
+ Hits 28949 29051 +102
+ Misses 10061 10059 -2
- Partials 1693 1696 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🤞 build is green now |
@arkodg @nacx @missBerg fyi I am off next week but wanted to eliminate this nagging tech debt for good. This PR uses XDG conventions (like prometheus, goose etc), which map into the same change made in func-e. The result is no more hard-coded /tmp/envoy-gateway and flexibility to change things in docker etc. Most importantly, envoy-ai-gateway is blocked on this because the certs directory is hard-coded here. This causes problems as when you run tests that update certs it breaks your host configuration, as there's no way to overwrite it before this change. So, TL;DR; this isn't just a random TODO fix, this is a big deal for sustainability forward and we should merge soon, especially as I can finish up the whole thing soup-to-nuts including ai gateway if folks can prioritize it this week! |
OIDC_with_BackendCluster is a very flaky test.
Please kick the build. Maybe we can prioritize deflaking this after merge, especially as you can use a clean certs directory after. The certs being hard-coded directory smashed by other tests, caused flakes in ai-gateway also. |
incidentally this flake reminded me certs should be in the ConfigHome as they are configuration bound (for exactly the same reason as flakes when one test needs certs for its config). changing this now |
5398829
to
66871b3
Compare
updated wrt cert location |
This adds configuration fields to EnvoyGatewayHostInfrastructureProvider to allow users to specify custom paths for configuration, data, state, and runtime directories, following XDG Base Directory Specification conventions while maintaining backward compatibility. The implementation introduces four configurable directory paths: - configHome: certificates and configuration files (default: ~/.config/envoy-gateway) - dataHome: Envoy binaries, sharable across configs (default: ~/.local/share/envoy-gateway) - stateHome: logs and persistent state (default: ~/.local/state/envoy-gateway) - runtimeDir: ephemeral runtime files (default: /tmp/envoy-gateway-${UID}) Certificates are stored under configHome to ensure isolation between different configurations when running multiple EnvoyGateway instances in parallel, preventing certificate conflicts. These paths are propagated to func-e which creates subdirectories as needed: - dataHome/envoy-versions/ for Envoy binaries - stateHome/envoy-runs/{runID}/ for per-run logs - runtimeDir/{runID}/ for per-run runtime files The changes include path resolution helpers, updated runners to use configurable paths, comprehensive test coverage, and updated documentation. Signed-off-by: Adrian Cole <[email protected]>
84779d3
to
935470e
Compare
/retest |
/retest |
What this PR does / why we need it:
Before, all paths were hard coded to start with /tmp/envoy-gateway, making parallel runs impractical, especially when certs change.
This adds configuration fields to EnvoyGatewayHostInfrastructureProvider to allow users to specify custom paths for configuration, data, state, and runtime directories, following XDG Base Directory Specification conventions while maintaining backward compatibility.
The implementation introduces four configurable directory paths:
Certificates are stored under configHome to ensure isolation between different configurations when running multiple EnvoyGateway instances in parallel, preventing certificate conflicts.
These paths are propagated to func-e which creates subdirectories as needed: