From 7ce28bfc8ac4f306196bacbc4ff06671e8a58654 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 17 May 2024 07:20:23 -0500 Subject: internal: add package flagfolder to populate FlagSets with a secret mount Signed-off-by: Xe Iaso --- internal/internal.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/internal.go b/internal/internal.go index b9c1962..671360f 100644 --- a/internal/internal.go +++ b/internal/internal.go @@ -10,6 +10,7 @@ import ( "github.com/posener/complete" "go4.org/legal" + "within.website/x/flagfolder" "within.website/x/internal/confyg/flagconfyg" "within.website/x/internal/flagenv" "within.website/x/internal/manpage" @@ -48,14 +49,16 @@ func configFileLocation() string { // // - command line flags (to get -config) // - environment variables +// - any secrets mounted to /run/secrets // - configuration file (if -config is set) // - command line flags // // This is done this way to ensure that command line flags always are the deciding -// factor as an escape hatch. +// factor as an escape hatch, at the cost of potentially evaluating flags twice. func HandleStartup() { flag.Parse() flagenv.Parse() + flagfolder.Parse() ctx := context.Background() -- cgit v1.2.3