From 41a9cbceda80027ae9d559273b02f90e1c6c506b Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 7 Jan 2021 16:58:04 -0700 Subject: [PATCH] WIP: Add user flag and log executed commands --- cmd/minikube/cmd/delete.go | 5 ++ cmd/minikube/cmd/root.go | 1 + cmd/minikube/cmd/start.go | 4 ++ cmd/minikube/cmd/stop.go | 3 + pkg/minikube/audit/audit.go | 56 +++++++++++++++++++ pkg/minikube/config/config.go | 2 + pkg/minikube/out/register/json.go | 8 +++ pkg/minikube/out/register/log.go | 24 ++++++++ site/content/en/docs/commands/addons.md | 7 +++ site/content/en/docs/commands/cache.md | 6 ++ site/content/en/docs/commands/completion.md | 1 + site/content/en/docs/commands/config.md | 7 +++ site/content/en/docs/commands/dashboard.md | 1 + site/content/en/docs/commands/delete.md | 1 + site/content/en/docs/commands/docker-env.md | 1 + site/content/en/docs/commands/help.md | 1 + site/content/en/docs/commands/ip.md | 1 + site/content/en/docs/commands/kubectl.md | 1 + site/content/en/docs/commands/logs.md | 1 + site/content/en/docs/commands/mount.md | 1 + site/content/en/docs/commands/node.md | 7 +++ site/content/en/docs/commands/pause.md | 1 + site/content/en/docs/commands/podman-env.md | 1 + site/content/en/docs/commands/profile.md | 3 + site/content/en/docs/commands/service.md | 3 + site/content/en/docs/commands/ssh-host.md | 1 + site/content/en/docs/commands/ssh-key.md | 1 + site/content/en/docs/commands/ssh.md | 1 + site/content/en/docs/commands/start.md | 1 + site/content/en/docs/commands/status.md | 1 + site/content/en/docs/commands/stop.md | 1 + site/content/en/docs/commands/tunnel.md | 1 + site/content/en/docs/commands/unpause.md | 1 + site/content/en/docs/commands/update-check.md | 1 + .../en/docs/commands/update-context.md | 1 + site/content/en/docs/commands/version.md | 1 + 36 files changed, 158 insertions(+) create mode 100644 pkg/minikube/audit/audit.go diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 7bfe9bfda21e..0b7904f5da9b 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -23,6 +23,7 @@ import ( "os/exec" "path/filepath" "strconv" + "time" "github.com/docker/machine/libmachine/mcnerror" "github.com/mitchellh/go-ps" @@ -34,6 +35,7 @@ import ( "k8s.io/klog/v2" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" "k8s.io/minikube/pkg/drivers/kic/oci" + "k8s.io/minikube/pkg/minikube/audit" "k8s.io/minikube/pkg/minikube/cluster" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" @@ -129,6 +131,9 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.Message(reason.Usage, "Usage: minikube delete") } + + defer audit.Log(time.Now()) + // register.SetEventLogPath(localpath.EventLog(ClusterFlagValue())) register.Reg.SetStep(register.Deleting) diff --git a/cmd/minikube/cmd/root.go b/cmd/minikube/cmd/root.go index 1ef8e2fadf26..ab1de32414ef 100644 --- a/cmd/minikube/cmd/root.go +++ b/cmd/minikube/cmd/root.go @@ -170,6 +170,7 @@ func init() { RootCmd.PersistentFlags().StringP(config.ProfileName, "p", constants.DefaultClusterName, `The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently.`) RootCmd.PersistentFlags().StringP(configCmd.Bootstrapper, "b", "kubeadm", "The name of the cluster bootstrapper that will set up the Kubernetes cluster.") + RootCmd.PersistentFlags().String(config.User, "", "Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username.") groups := templates.CommandGroups{ { diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 1c1d7b6c6a52..29dd080f3037 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -28,6 +28,7 @@ import ( "regexp" "runtime" "strings" + "time" "github.com/blang/semver" "github.com/docker/machine/libmachine/ssh" @@ -43,6 +44,7 @@ import ( "k8s.io/klog/v2" cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config" "k8s.io/minikube/pkg/drivers/kic/oci" + "k8s.io/minikube/pkg/minikube/audit" "k8s.io/minikube/pkg/minikube/bootstrapper/bsutil" "k8s.io/minikube/pkg/minikube/bootstrapper/images" "k8s.io/minikube/pkg/minikube/config" @@ -129,6 +131,8 @@ func platform() string { // runStart handles the executes the flow of "minikube start" func runStart(cmd *cobra.Command, args []string) { + defer audit.Log(time.Now()) + register.SetEventLogPath(localpath.EventLog(ClusterFlagValue())) out.SetJSON(outputFormat == "json") diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index 4fd0fadabc49..ba1a442a9347 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "k8s.io/klog/v2" + "k8s.io/minikube/pkg/minikube/audit" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/exit" @@ -75,6 +76,8 @@ func init() { // runStop handles the executes the flow of "minikube stop" func runStop(cmd *cobra.Command, args []string) { + defer audit.Log(time.Now()) + out.SetJSON(outputFormat == "json") register.Reg.SetStep(register.Stopping) diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go new file mode 100644 index 000000000000..40fdc80c7740 --- /dev/null +++ b/pkg/minikube/audit/audit.go @@ -0,0 +1,56 @@ +/* +Copyright 2020 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package audit + +import ( + "os" + "os/user" + "strings" + "time" + + "github.com/spf13/viper" + "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/localpath" + "k8s.io/minikube/pkg/minikube/out/register" +) + +// auditUser pulls the user flag, if empty gets the os user +func auditUser() string { + u := viper.GetString(config.User) + if u != "" { + return u + } + osUser, err := user.Current() + if err != nil { + return "UNKNOWN" + } + return osUser.Username +} + +// auditArgs concats the args into space delimited string +func auditArgs() string { + if len(os.Args) < 3 { + return "" + } + return strings.Join(os.Args[2:], " ") +} + +// Log details about the executed command +func Log(startTime time.Time) { + register.SetEventLogPath(localpath.EventLog("audit")) + register.RecordAudit(os.Args[1], auditArgs(), auditUser(), startTime, time.Now()) +} diff --git a/pkg/minikube/config/config.go b/pkg/minikube/config/config.go index 5fd296630cc9..e4b38e45f59c 100644 --- a/pkg/minikube/config/config.go +++ b/pkg/minikube/config/config.go @@ -48,6 +48,8 @@ const ( ShowDriverDeprecationNotification = "ShowDriverDeprecationNotification" // ShowBootstrapperDeprecationNotification is the key for ShowBootstrapperDeprecationNotification ShowBootstrapperDeprecationNotification = "ShowBootstrapperDeprecationNotification" + // User represents the key for the global user parameter + User = "user" ) var ( diff --git a/pkg/minikube/out/register/json.go b/pkg/minikube/out/register/json.go index 14f9449666fc..b52ad9de6755 100644 --- a/pkg/minikube/out/register/json.go +++ b/pkg/minikube/out/register/json.go @@ -16,6 +16,8 @@ limitations under the License. package register +import "time" + // PrintStep prints a Step type in JSON format func PrintStep(message string) { s := NewStep(message) @@ -69,3 +71,9 @@ func PrintWarning(warning string) { w := NewWarning(warning) printAndRecordCloudEvent(w, w.data) } + +// RecordAudit records an Audit type in JSON format +func RecordAudit(command string, args string, user string, startTime time.Time, endTime time.Time) { + a := NewAudit(command, args, user, startTime, endTime) + recordCloudEvent(a, a.data) +} diff --git a/pkg/minikube/out/register/log.go b/pkg/minikube/out/register/log.go index 9d340d6b4b2c..8fa51edeac1f 100644 --- a/pkg/minikube/out/register/log.go +++ b/pkg/minikube/out/register/log.go @@ -19,6 +19,7 @@ package register import ( "fmt" "strings" + "time" ) // Log represents the different types of logs that can be output as JSON @@ -154,3 +155,26 @@ func NewErrorExitCode(err string, exitcode int, additionalData ...map[string]str func (s *Error) Type() string { return "io.k8s.sigs.minikube.error" } + +// Audit represents the execution of a command +type Audit struct { + data map[string]string +} + +// Type returns the cloud events compatible type of this struct +func (a *Audit) Type() string { + return "io.k8s.sigs.minikube.audit" +} + +// NewAudit returns a new audit type +func NewAudit(command string, args string, user string, startTime time.Time, endTime time.Time) *Audit { + return &Audit{ + map[string]string{ + "args": args, + "command": command, + "endTime": endTime.String(), + "startTime": startTime.String(), + "user": user, + }, + } +} diff --git a/site/content/en/docs/commands/addons.md b/site/content/en/docs/commands/addons.md index c558656d0dd5..5abbd05ffc3b 100644 --- a/site/content/en/docs/commands/addons.md +++ b/site/content/en/docs/commands/addons.md @@ -34,6 +34,7 @@ minikube addons SUBCOMMAND [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -67,6 +68,7 @@ minikube addons configure ADDON_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -100,6 +102,7 @@ minikube addons disable ADDON_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -133,6 +136,7 @@ minikube addons enable ADDON_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -167,6 +171,7 @@ minikube addons help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -206,6 +211,7 @@ minikube addons list [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -249,6 +255,7 @@ minikube addons open ADDON_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/cache.md b/site/content/en/docs/commands/cache.md index c5694102cb60..6f7eff26a93c 100644 --- a/site/content/en/docs/commands/cache.md +++ b/site/content/en/docs/commands/cache.md @@ -30,6 +30,7 @@ Add, delete, or push a local image into minikube --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -63,6 +64,7 @@ minikube cache add [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -96,6 +98,7 @@ minikube cache delete [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -130,6 +133,7 @@ minikube cache help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -170,6 +174,7 @@ minikube cache list [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -203,6 +208,7 @@ minikube cache reload [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/completion.md b/site/content/en/docs/commands/completion.md index 0b10bf41d9b6..a48b575df072 100644 --- a/site/content/en/docs/commands/completion.md +++ b/site/content/en/docs/commands/completion.md @@ -55,6 +55,7 @@ minikube completion SHELL [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/config.md b/site/content/en/docs/commands/config.md index 556be2b56b5f..e4ad6a2e77d8 100644 --- a/site/content/en/docs/commands/config.md +++ b/site/content/en/docs/commands/config.md @@ -64,6 +64,7 @@ minikube config SUBCOMMAND [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -106,6 +107,7 @@ minikube config defaults PROPERTY_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -139,6 +141,7 @@ minikube config get PROPERTY_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -173,6 +176,7 @@ minikube config help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -207,6 +211,7 @@ minikube config set PROPERTY_NAME PROPERTY_VALUE [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -240,6 +245,7 @@ minikube config unset PROPERTY_NAME [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -280,6 +286,7 @@ minikube config view [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/dashboard.md b/site/content/en/docs/commands/dashboard.md index a4cba95564e2..784ec07ef30b 100644 --- a/site/content/en/docs/commands/dashboard.md +++ b/site/content/en/docs/commands/dashboard.md @@ -40,6 +40,7 @@ minikube dashboard [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/delete.md b/site/content/en/docs/commands/delete.md index 65310fdea5b1..2c8576ebc3fd 100644 --- a/site/content/en/docs/commands/delete.md +++ b/site/content/en/docs/commands/delete.md @@ -42,6 +42,7 @@ minikube delete [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/docker-env.md b/site/content/en/docs/commands/docker-env.md index c7bd2615aff8..97273ff4fb0a 100644 --- a/site/content/en/docs/commands/docker-env.md +++ b/site/content/en/docs/commands/docker-env.md @@ -44,6 +44,7 @@ minikube docker-env [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/help.md b/site/content/en/docs/commands/help.md index 3bc45fe4e96c..bdfd5d7df8a9 100644 --- a/site/content/en/docs/commands/help.md +++ b/site/content/en/docs/commands/help.md @@ -35,6 +35,7 @@ minikube help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/ip.md b/site/content/en/docs/commands/ip.md index a460649225eb..33a01a0c6945 100644 --- a/site/content/en/docs/commands/ip.md +++ b/site/content/en/docs/commands/ip.md @@ -40,6 +40,7 @@ minikube ip [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/kubectl.md b/site/content/en/docs/commands/kubectl.md index f3e231b35c35..5d96e314c006 100644 --- a/site/content/en/docs/commands/kubectl.md +++ b/site/content/en/docs/commands/kubectl.md @@ -38,6 +38,7 @@ minikube kubectl [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/logs.md b/site/content/en/docs/commands/logs.md index f84208137c1d..794755c319fc 100644 --- a/site/content/en/docs/commands/logs.md +++ b/site/content/en/docs/commands/logs.md @@ -43,6 +43,7 @@ minikube logs [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/mount.md b/site/content/en/docs/commands/mount.md index 3d6409c178a3..cecac7bfec3a 100644 --- a/site/content/en/docs/commands/mount.md +++ b/site/content/en/docs/commands/mount.md @@ -48,6 +48,7 @@ minikube mount [flags] : --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/node.md b/site/content/en/docs/commands/node.md index 79778a7dfa32..92611db68bd5 100644 --- a/site/content/en/docs/commands/node.md +++ b/site/content/en/docs/commands/node.md @@ -34,6 +34,7 @@ minikube node [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -75,6 +76,7 @@ minikube node add [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -108,6 +110,7 @@ minikube node delete [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -142,6 +145,7 @@ minikube node help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -175,6 +179,7 @@ minikube node list [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -214,6 +219,7 @@ minikube node start [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -247,6 +253,7 @@ minikube node stop [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/pause.md b/site/content/en/docs/commands/pause.md index b6463f1ff9b5..b8bb88d28c61 100644 --- a/site/content/en/docs/commands/pause.md +++ b/site/content/en/docs/commands/pause.md @@ -42,6 +42,7 @@ minikube pause [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/podman-env.md b/site/content/en/docs/commands/podman-env.md index 4ea853f8e1d9..d17d985b3640 100644 --- a/site/content/en/docs/commands/podman-env.md +++ b/site/content/en/docs/commands/podman-env.md @@ -41,6 +41,7 @@ minikube podman-env [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/profile.md b/site/content/en/docs/commands/profile.md index 9f26ea434f11..6bd445f828a1 100644 --- a/site/content/en/docs/commands/profile.md +++ b/site/content/en/docs/commands/profile.md @@ -34,6 +34,7 @@ minikube profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikub --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -68,6 +69,7 @@ minikube profile help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -107,6 +109,7 @@ minikube profile list [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/service.md b/site/content/en/docs/commands/service.md index e10846d67009..6b0fd7d3e204 100644 --- a/site/content/en/docs/commands/service.md +++ b/site/content/en/docs/commands/service.md @@ -45,6 +45,7 @@ minikube service [flags] SERVICE --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -80,6 +81,7 @@ minikube service help [command] [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` @@ -120,6 +122,7 @@ minikube service list [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/ssh-host.md b/site/content/en/docs/commands/ssh-host.md index 38ad0b875060..f034d94bfea2 100644 --- a/site/content/en/docs/commands/ssh-host.md +++ b/site/content/en/docs/commands/ssh-host.md @@ -41,6 +41,7 @@ minikube ssh-host [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/ssh-key.md b/site/content/en/docs/commands/ssh-key.md index 76687f73770a..6b6c4bfc2334 100644 --- a/site/content/en/docs/commands/ssh-key.md +++ b/site/content/en/docs/commands/ssh-key.md @@ -40,6 +40,7 @@ minikube ssh-key [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/ssh.md b/site/content/en/docs/commands/ssh.md index bf37dedc52a1..4263ef11992e 100644 --- a/site/content/en/docs/commands/ssh.md +++ b/site/content/en/docs/commands/ssh.md @@ -41,6 +41,7 @@ minikube ssh [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/start.md b/site/content/en/docs/commands/start.md index aac90df39d8b..a05c86f8b2e9 100644 --- a/site/content/en/docs/commands/start.md +++ b/site/content/en/docs/commands/start.md @@ -113,6 +113,7 @@ minikube start [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/status.md b/site/content/en/docs/commands/status.md index e5c3c89e7dd5..3ff510a84462 100644 --- a/site/content/en/docs/commands/status.md +++ b/site/content/en/docs/commands/status.md @@ -47,6 +47,7 @@ minikube status [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/stop.md b/site/content/en/docs/commands/stop.md index 34db14a875f4..565ebcdb7e4b 100644 --- a/site/content/en/docs/commands/stop.md +++ b/site/content/en/docs/commands/stop.md @@ -43,6 +43,7 @@ minikube stop [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/tunnel.md b/site/content/en/docs/commands/tunnel.md index 62cc1510265c..02cd1579367e 100644 --- a/site/content/en/docs/commands/tunnel.md +++ b/site/content/en/docs/commands/tunnel.md @@ -40,6 +40,7 @@ minikube tunnel [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/unpause.md b/site/content/en/docs/commands/unpause.md index 5ee5c52a7be4..19646750bccb 100644 --- a/site/content/en/docs/commands/unpause.md +++ b/site/content/en/docs/commands/unpause.md @@ -42,6 +42,7 @@ minikube unpause [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/update-check.md b/site/content/en/docs/commands/update-check.md index f4a66c76022f..f30b0663b450 100644 --- a/site/content/en/docs/commands/update-check.md +++ b/site/content/en/docs/commands/update-check.md @@ -34,6 +34,7 @@ minikube update-check [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/update-context.md b/site/content/en/docs/commands/update-context.md index 2725cb81d289..266fd0e3cb56 100644 --- a/site/content/en/docs/commands/update-context.md +++ b/site/content/en/docs/commands/update-context.md @@ -35,6 +35,7 @@ minikube update-context [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` diff --git a/site/content/en/docs/commands/version.md b/site/content/en/docs/commands/version.md index fc223a2e77f5..0bd908fdf3f0 100644 --- a/site/content/en/docs/commands/version.md +++ b/site/content/en/docs/commands/version.md @@ -41,6 +41,7 @@ minikube version [flags] --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --user string Specifies the user executing the operation. Useful for auditing operations executed by 3rd party tools. Defaults to the operating system username. -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ```