From c19a972739627baea316f735fdf5a9dd8e1cef54 Mon Sep 17 00:00:00 2001 From: Khris Richardson Date: Tue, 15 Jun 2021 12:30:37 -0700 Subject: [PATCH] expose --as-current-user via AddFunctionBasicsFlags --- kustomize/commands/build/flagsforfunctions.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kustomize/commands/build/flagsforfunctions.go b/kustomize/commands/build/flagsforfunctions.go index 2ece5d392..8b22f5a20 100644 --- a/kustomize/commands/build/flagsforfunctions.go +++ b/kustomize/commands/build/flagsforfunctions.go @@ -20,6 +20,9 @@ func AddFunctionBasicsFlags(set *pflag.FlagSet) { set.StringArrayVarP( &theFlags.fnOptions.Env, "env", "e", []string{}, "a list of environment variables to be used by functions") + set.BoolVar( + &theFlags.fnOptions.AsCurrentUser, "as-current-user", false, + "use the uid and gid of the command executor to run the function in the container") } func AddFunctionAlphaEnablementFlags(set *pflag.FlagSet) {