From 92982c6dc3ad99c8f219f95e82214b3930859af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Sat, 17 Apr 2021 10:02:57 +0800 Subject: [PATCH 01/33] filemode value is not correct ,0o777 to 0777 --- cmd/minikube/cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/root.go b/cmd/minikube/cmd/root.go index 5f63436e8b..8d755bb129 100644 --- a/cmd/minikube/cmd/root.go +++ b/cmd/minikube/cmd/root.go @@ -62,7 +62,7 @@ var RootCmd = &cobra.Command{ Long: `minikube provisions and manages local Kubernetes clusters optimized for development workflows.`, PersistentPreRun: func(cmd *cobra.Command, args []string) { for _, path := range dirs { - if err := os.MkdirAll(path, 0o777); err != nil { + if err := os.MkdirAll(path, 0777); err != nil { exit.Error(reason.HostHomeMkdir, "Error creating minikube directory", err) } } From cdab039184316f15cf83048dc7da978d517d82e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 26 Apr 2021 08:59:38 +0800 Subject: [PATCH 02/33] Add Asset method --- pkg/minikube/assets/vm_assets.go | 20 ++++++++++++++++++++ pkg/minikube/translate/translate.go | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/pkg/minikube/assets/vm_assets.go b/pkg/minikube/assets/vm_assets.go index d453bf78b2..c9d242cd37 100644 --- a/pkg/minikube/assets/vm_assets.go +++ b/pkg/minikube/assets/vm_assets.go @@ -21,8 +21,11 @@ import ( "fmt" "html/template" "io" + "io/ioutil" "os" "path" + "runtime" + "strings" "time" "github.com/pkg/errors" @@ -291,3 +294,20 @@ func (m *BinAsset) Read(p []byte) (int, error) { func (m *BinAsset) Seek(offset int64, whence int) (int64, error) { return m.reader.Seek(offset, whence) } + +//Get file bytes from filePath +func Asset(sourcePath string) ([]byte, error) { + execDirAbsPath, err := os.Getwd() + if err != nil { + return nil, fmt.Errorf("getting exec dir abspath is error: %v", err) + } + if runtime.GOOS == "windows" { + replacePathDelimiter := strings.Replace(execDirAbsPath, "\\", "/", -1) + execDirAbsPath = replacePathDelimiter[:strings.Index(replacePathDelimiter, "minikube")+len("minikube")] + } + contents, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", execDirAbsPath, sourcePath)) + if err != nil { + return nil, fmt.Errorf("asset %s can't read by error: %v", sourcePath, err) + } + return contents, nil +} diff --git a/pkg/minikube/translate/translate.go b/pkg/minikube/translate/translate.go index 892450e604..b245d260f8 100644 --- a/pkg/minikube/translate/translate.go +++ b/pkg/minikube/translate/translate.go @@ -19,6 +19,7 @@ package translate import ( "encoding/json" "fmt" + "io/ioutil" "path" "strings" @@ -124,3 +125,12 @@ func SetPreferredLanguage(s string) { func GetPreferredLanguage() language.Tag { return preferredLanguage } + +//Get translationFile bytes from filePath +func Asset(translationFile string) ([]byte,error){ + t, err := ioutil.ReadFile(translationFile) + if err != nil { + return nil, fmt.Errorf("asset %s can't read by error: %v", translationFile, err) + } + return t, nil +} From 3460e9e91a04706fa3478bb2de011746f83f3840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 26 Apr 2021 10:50:47 +0800 Subject: [PATCH 03/33] go-bindata tool generate file --- pkg/minikube/assets/vm_assets.go | 17 ----------------- pkg/minikube/translate/translate.go | 9 --------- 2 files changed, 26 deletions(-) diff --git a/pkg/minikube/assets/vm_assets.go b/pkg/minikube/assets/vm_assets.go index c9d242cd37..feb3336a8a 100644 --- a/pkg/minikube/assets/vm_assets.go +++ b/pkg/minikube/assets/vm_assets.go @@ -294,20 +294,3 @@ func (m *BinAsset) Read(p []byte) (int, error) { func (m *BinAsset) Seek(offset int64, whence int) (int64, error) { return m.reader.Seek(offset, whence) } - -//Get file bytes from filePath -func Asset(sourcePath string) ([]byte, error) { - execDirAbsPath, err := os.Getwd() - if err != nil { - return nil, fmt.Errorf("getting exec dir abspath is error: %v", err) - } - if runtime.GOOS == "windows" { - replacePathDelimiter := strings.Replace(execDirAbsPath, "\\", "/", -1) - execDirAbsPath = replacePathDelimiter[:strings.Index(replacePathDelimiter, "minikube")+len("minikube")] - } - contents, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", execDirAbsPath, sourcePath)) - if err != nil { - return nil, fmt.Errorf("asset %s can't read by error: %v", sourcePath, err) - } - return contents, nil -} diff --git a/pkg/minikube/translate/translate.go b/pkg/minikube/translate/translate.go index b245d260f8..fd79188006 100644 --- a/pkg/minikube/translate/translate.go +++ b/pkg/minikube/translate/translate.go @@ -125,12 +125,3 @@ func SetPreferredLanguage(s string) { func GetPreferredLanguage() language.Tag { return preferredLanguage } - -//Get translationFile bytes from filePath -func Asset(translationFile string) ([]byte,error){ - t, err := ioutil.ReadFile(translationFile) - if err != nil { - return nil, fmt.Errorf("asset %s can't read by error: %v", translationFile, err) - } - return t, nil -} From 3389bacef0a64524f484dcdc4fd2b21336757b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 26 Apr 2021 13:59:35 +0800 Subject: [PATCH 04/33] remove unused package --- pkg/minikube/translate/translate.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/minikube/translate/translate.go b/pkg/minikube/translate/translate.go index fd79188006..892450e604 100644 --- a/pkg/minikube/translate/translate.go +++ b/pkg/minikube/translate/translate.go @@ -19,7 +19,6 @@ package translate import ( "encoding/json" "fmt" - "io/ioutil" "path" "strings" From 02c683641714ceff6a0474c34e4078d1987cd8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 26 Apr 2021 14:01:48 +0800 Subject: [PATCH 05/33] rm unused package --- pkg/minikube/assets/vm_assets.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/minikube/assets/vm_assets.go b/pkg/minikube/assets/vm_assets.go index feb3336a8a..d453bf78b2 100644 --- a/pkg/minikube/assets/vm_assets.go +++ b/pkg/minikube/assets/vm_assets.go @@ -21,11 +21,8 @@ import ( "fmt" "html/template" "io" - "io/ioutil" "os" "path" - "runtime" - "strings" "time" "github.com/pkg/errors" From fcd9d3fe0fbb026be07a07d5ccc9a14eda1d993c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 26 Apr 2021 14:24:40 +0800 Subject: [PATCH 06/33] slice declaration: nil better than empty --- cmd/minikube/cmd/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index bf2abd281c..c52d8da829 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -191,7 +191,7 @@ Configurable fields: ` + "\n\n" + configurableFields(), } func configurableFields() string { - fields := []string{} + var fields []string for _, s := range settings { fields = append(fields, " * "+s.name) } From c7707168f5cc8826b8ab6cd9e020b6e9b7b5fb38 Mon Sep 17 00:00:00 2001 From: layakdev <107048101+layakdev@users.noreply.github.com> Date: Tue, 7 Jun 2022 14:51:10 +0200 Subject: [PATCH 07/33] Make closing CLI-terminal more visible --- site/content/en/docs/start/_index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/content/en/docs/start/_index.md b/site/content/en/docs/start/_index.md index 7e245b8de9..93f8b54d99 100644 --- a/site/content/en/docs/start/_index.md +++ b/site/content/en/docs/start/_index.md @@ -455,7 +455,8 @@ choco install minikube [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine) ` } ``` - _If you used a CLI to perform the installation, you will need to close that CLI and open a new one before proceeding._ + + _If you used a CLI to perform the installation, you will need to close that CLI and open a new one before proceeding._ {{% /quiz_instruction %}} {{% quiz_instruction id="/Windows/x86-64/Beta/.exe download" %}} From 26afc8f85cffb258572fe41dc386d4e84a65a1cf Mon Sep 17 00:00:00 2001 From: Santhosh Nagaraj S Date: Mon, 6 Jun 2022 12:47:55 +0530 Subject: [PATCH 08/33] Addon: add headlamp Signed-off-by: Santhosh Nagaraj S --- cmd/minikube/cmd/config/addons_list_test.go | 2 +- cmd/minikube/cmd/config/enable.go | 23 +++++++++ deploy/addons/assets.go | 4 ++ .../headlamp/headlamp-clusterrolebinding.yaml | 18 +++++++ .../headlamp/headlamp-deployment.yaml.tmpl | 42 +++++++++++++++ .../addons/headlamp/headlamp-namespace.yaml | 6 +++ deploy/addons/headlamp/headlamp-service.yaml | 21 ++++++++ .../headlamp/headlamp-serviceaccount.yaml | 10 ++++ pkg/addons/config.go | 5 ++ pkg/minikube/assets/addons.go | 13 +++++ .../en/docs/handbook/addons/headlamp.md | 51 +++++++++++++++++++ test/integration/addons_test.go | 14 +++++ 12 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 deploy/addons/headlamp/headlamp-clusterrolebinding.yaml create mode 100644 deploy/addons/headlamp/headlamp-deployment.yaml.tmpl create mode 100644 deploy/addons/headlamp/headlamp-namespace.yaml create mode 100644 deploy/addons/headlamp/headlamp-service.yaml create mode 100644 deploy/addons/headlamp/headlamp-serviceaccount.yaml create mode 100644 site/content/en/docs/handbook/addons/headlamp.md diff --git a/cmd/minikube/cmd/config/addons_list_test.go b/cmd/minikube/cmd/config/addons_list_test.go index ae4a53ca25..1398508c2d 100644 --- a/cmd/minikube/cmd/config/addons_list_test.go +++ b/cmd/minikube/cmd/config/addons_list_test.go @@ -77,7 +77,7 @@ func TestAddonsList(t *testing.T) { Ambassador *interface{} `json:"ambassador"` } - b := make([]byte, 557) + b := make([]byte, 571) r, w, err := os.Pipe() if err != nil { t.Fatalf("failed to create pipe: %v", err) diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index 28da1eb43f..36c38c1ed8 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -67,6 +67,29 @@ var addonsEnableCmd = &cobra.Command{ minikube{{.profileArg}} addons enable metrics-server +`, out.V{"profileArg": tipProfileArg}) + + } + if addon == "headlamp" { + out.Styled(style.Tip, `To access Headlamp, use the following command: +minikube service headlamp -n headlamp + +`) + out.Styled(style.Tip, `To authenticate in Headlamp, fetch the Authentication Token using the following command: + +export SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=":metadata.name" | grep "headlamp-token") +kubectl get secret $SECRET --namespace headlamp --template=\{\{.data.token\}\} | base64 --decode + +`) + + tipProfileArg := "" + if ClusterFlagValue() != constants.DefaultClusterName { + tipProfileArg = fmt.Sprintf(" -p %s", ClusterFlagValue()) + } + out.Styled(style.Tip, `Headlamp can display more detailed information when metrics-server is installed. To install it, run: + +minikube{{.profileArg}} addons enable metrics-server + `, out.V{"profileArg": tipProfileArg}) } diff --git a/deploy/addons/assets.go b/deploy/addons/assets.go index 84b6b644d5..209f0560d4 100644 --- a/deploy/addons/assets.go +++ b/deploy/addons/assets.go @@ -147,4 +147,8 @@ var ( // InAccelAssets assets for inaccel addon //go:embed inaccel/fpga-operator.yaml.tmpl InAccelAssets embed.FS + + // HeadlampAssets assets for headlamp addon + //go:embed headlamp/*.yaml headlamp/*.tmpl + HeadlampAssets embed.FS ) diff --git a/deploy/addons/headlamp/headlamp-clusterrolebinding.yaml b/deploy/addons/headlamp/headlamp-clusterrolebinding.yaml new file mode 100644 index 0000000000..1f516989ed --- /dev/null +++ b/deploy/addons/headlamp/headlamp-clusterrolebinding.yaml @@ -0,0 +1,18 @@ +--- +# ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: headlamp-admin + namespace: headlamp + labels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: headlamp + namespace: headlamp diff --git a/deploy/addons/headlamp/headlamp-deployment.yaml.tmpl b/deploy/addons/headlamp/headlamp-deployment.yaml.tmpl new file mode 100644 index 0000000000..63da3b3433 --- /dev/null +++ b/deploy/addons/headlamp/headlamp-deployment.yaml.tmpl @@ -0,0 +1,42 @@ +--- +# Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: headlamp + namespace: headlamp + labels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp + template: + metadata: + labels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp + spec: + serviceAccountName: headlamp + containers: + - name: headlamp + image: {{.CustomRegistries.Headlamp | default .ImageRepository | default .Registries.Headlamp }}{{.Images.Headlamp}} + imagePullPolicy: IfNotPresent + args: + - "-in-cluster" + - "-plugins-dir=/headlamp/plugins" + ports: + - name: http + containerPort: 4466 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http diff --git a/deploy/addons/headlamp/headlamp-namespace.yaml b/deploy/addons/headlamp/headlamp-namespace.yaml new file mode 100644 index 0000000000..85d4ae0a2e --- /dev/null +++ b/deploy/addons/headlamp/headlamp-namespace.yaml @@ -0,0 +1,6 @@ +--- +# Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: headlamp diff --git a/deploy/addons/headlamp/headlamp-service.yaml b/deploy/addons/headlamp/headlamp-service.yaml new file mode 100644 index 0000000000..1eca749b82 --- /dev/null +++ b/deploy/addons/headlamp/headlamp-service.yaml @@ -0,0 +1,21 @@ +--- +# Service +apiVersion: v1 +kind: Service +metadata: + name: headlamp + namespace: headlamp + labels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp + kubernetes.io/minikube-addons-endpoint: headlamp +spec: + type: NodePort + ports: + - port: 80 + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp diff --git a/deploy/addons/headlamp/headlamp-serviceaccount.yaml b/deploy/addons/headlamp/headlamp-serviceaccount.yaml new file mode 100644 index 0000000000..2dfba7fc61 --- /dev/null +++ b/deploy/addons/headlamp/headlamp-serviceaccount.yaml @@ -0,0 +1,10 @@ +--- +# ServiceAccount +apiVersion: v1 +kind: ServiceAccount +metadata: + name: headlamp + namespace: headlamp + labels: + app.kubernetes.io/name: headlamp + app.kubernetes.io/instance: headlamp diff --git a/pkg/addons/config.go b/pkg/addons/config.go index 81db657897..6aba241a00 100644 --- a/pkg/addons/config.go +++ b/pkg/addons/config.go @@ -202,4 +202,9 @@ var Addons = []*Addon{ set: SetBool, callbacks: []setFn{EnableOrDisableAddon}, }, + { + name: "headlamp", + set: SetBool, + callbacks: []setFn{EnableOrDisableAddon}, + }, } diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index 5b3dec96bc..c7ed128430 100755 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -701,6 +701,19 @@ var Addons = map[string]*Addon{ }, map[string]string{ "Helm3": "docker.io", }), + "headlamp": NewAddon([]*BinAsset{ + MustBinAsset(addons.HeadlampAssets, "headlamp/headlamp-namespace.yaml", vmpath.GuestAddonsDir, "headlamp-namespace.yaml", "6040"), + MustBinAsset(addons.HeadlampAssets, "headlamp/headlamp-service.yaml", vmpath.GuestAddonsDir, "headlamp-service.yaml", "6040"), + MustBinAsset(addons.HeadlampAssets, "headlamp/headlamp-deployment.yaml.tmpl", vmpath.GuestAddonsDir, "headlamp-deployment.yaml", "6040"), + MustBinAsset(addons.HeadlampAssets, "headlamp/headlamp-serviceaccount.yaml", vmpath.GuestAddonsDir, "headlamp-serviceaccount.yaml", "6040"), + MustBinAsset(addons.HeadlampAssets, "headlamp/headlamp-clusterrolebinding.yaml", vmpath.GuestAddonsDir, "headlamp-clusterrolebinding.yaml", "6040"), + }, false, "headlamp", "kinvolk.io", "https://minikube.sigs.k8s.io/docs/handbook/addons/headlamp/", + map[string]string{ + "Headlamp": "kinvolk/headlamp:v0.9.0@sha256:465aaee6518f3fdd032965eccd6a8f49e924d144b1c86115bad613872672ec02", + }, + map[string]string{ + "Headlamp": "ghcr.io", + }), } // parseMapString creates a map based on `str` which is encoded as =,=,... diff --git a/site/content/en/docs/handbook/addons/headlamp.md b/site/content/en/docs/handbook/addons/headlamp.md new file mode 100644 index 0000000000..f72e3aa2ad --- /dev/null +++ b/site/content/en/docs/handbook/addons/headlamp.md @@ -0,0 +1,51 @@ +--- +title: "Using Headlamp Addon" +linkTitle: "Headlamp" +weight: 1 +date: 2022-06-08 +--- + +## Headlamp Addon + +[Headlamp](https://kinvolk.github.io/headlamp) is an easy-to-use and extensible Kubernetes web UI. + +### Enable Headlamp on minikube + +To enable this addon, simply run: +```shell script +minikube addons enable headlamp +``` + +Once the addon is enabled, you can access the Headlamp's web UI using the following command. +```shell script +minikube service headlamp -n headlamp +``` + +To authenticate in Headlamp, fetch the Authentication Token using the following command: + +```shell script +export SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=":metadata.name" | grep "headlamp-token") +kubectl get secret $SECRET --namespace headlamp --template=\{\{.data.token\}\} | base64 --decode +``` + +Headlamp can display more detailed information when metrics-server is installed. To install it, run: + +```shell script +minikube addons enable metrics-server +``` + +### Testing installation + +```shell script +kubectl get pods -n headlamp +``` + +If everything went well, there should be no errors about Headlamp's installation in your minikube cluster. + +### Disable headlamp + +To disable this addon, simply run: + +```shell script +minikube addons disable headlamp +``` \ No newline at end of file diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 7b85db6b33..9071afee10 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -95,6 +95,7 @@ func TestAddons(t *testing.T) { {"HelmTiller", validateHelmTillerAddon}, {"Olm", validateOlmAddon}, {"CSI", validateCSIDriverAndSnapshots}, + {"Headlamp", validateHeadlampAddon}, } for _, tc := range tests { tc := tc @@ -708,3 +709,16 @@ func validateGCPAuthAddon(ctx context.Context, t *testing.T, profile string) { } } } + +func validateHeadlampAddon(ctx context.Context, t *testing.T, profile string) { + defer PostMortemLogs(t, profile) + + rr, err := Run(t, exec.CommandContext(ctx, Target(), "addons", "enable", "headlamp", "-p", profile, "--alsologtostderr", "-v=1")) + if err != nil { + t.Fatalf("failed to enable headlamp addon: args: %q: %v", rr.Command(), err) + } + + if _, err := PodWait(ctx, t, profile, "headlamp", "app.kubernetes.io/name=headlamp", Minutes(8)); err != nil { + t.Fatalf("failed waiting for headlamp pod: %v", err) + } +} From cc1fba4411ac3b58c5bfe61e5dbbe864d88cadec Mon Sep 17 00:00:00 2001 From: lakshkeswani Date: Sat, 11 Jun 2022 09:29:43 +0000 Subject: [PATCH 09/33] Don't allow --control-plane=true for node add --- cmd/minikube/cmd/node_add.go | 9 +++++++-- site/content/en/docs/commands/node.md | 2 +- translations/de.json | 2 ++ translations/es.json | 3 ++- translations/fr.json | 2 ++ translations/ja.json | 2 ++ translations/ko.json | 3 ++- translations/pl.json | 3 ++- translations/ru.json | 3 ++- translations/strings.txt | 3 ++- translations/zh-CN.json | 3 ++- 11 files changed, 26 insertions(+), 9 deletions(-) diff --git a/cmd/minikube/cmd/node_add.go b/cmd/minikube/cmd/node_add.go index 5f281ab04f..1e54aec7fb 100644 --- a/cmd/minikube/cmd/node_add.go +++ b/cmd/minikube/cmd/node_add.go @@ -50,8 +50,13 @@ var nodeAddCmd = &cobra.Command{ name := node.Name(len(cc.Nodes) + 1) - out.Step(style.Happy, "Adding node {{.name}} to cluster {{.cluster}}", out.V{"name": name, "cluster": cc.Name}) + // for now control-plane feature is not supported + if cp { + out.Step(style.Unsupported, "Adding a control-plane node is not yet supported, setting control-plane flag to false") + cp = false + } + out.Step(style.Happy, "Adding node {{.name}} to cluster {{.cluster}}", out.V{"name": name, "cluster": cc.Name}) // TODO: Deal with parameters better. Ideally we should be able to acceot any node-specific minikube start params here. n := config.Node{ Name: name, @@ -89,7 +94,7 @@ var nodeAddCmd = &cobra.Command{ func init() { // TODO(https://github.com/kubernetes/minikube/issues/7366): We should figure out which minikube start flags to actually import - nodeAddCmd.Flags().BoolVar(&cp, "control-plane", false, "If true, the node added will also be a control plane in addition to a worker.") + nodeAddCmd.Flags().BoolVar(&cp, "control-plane", false, "This flag is currently unsupported.") nodeAddCmd.Flags().BoolVar(&worker, "worker", true, "If true, the added node will be marked for work. Defaults to true.") nodeAddCmd.Flags().Bool(deleteOnFailure, false, "If set, delete the current cluster if start fails and try again. Defaults to false.") diff --git a/site/content/en/docs/commands/node.md b/site/content/en/docs/commands/node.md index 3214262e0d..3268727416 100644 --- a/site/content/en/docs/commands/node.md +++ b/site/content/en/docs/commands/node.md @@ -55,7 +55,7 @@ minikube node add [flags] ### Options ``` - --control-plane If true, the node added will also be a control plane in addition to a worker. + --control-plane This flag is currently unsupported. --delete-on-failure If set, delete the current cluster if start fails and try again. Defaults to false. --worker If true, the added node will be marked for work. Defaults to true. (default true) ``` diff --git a/translations/de.json b/translations/de.json index f8079cfff9..7beb28f015 100644 --- a/translations/de.json +++ b/translations/de.json @@ -48,6 +48,7 @@ "Add machine IP to NO_PROXY environment variable": "Die IP der Maschine zur NO_PROXY Umgebungsvariable hinzufügen", "Add, delete, or push a local image into minikube": "Lokales Image zu Minikube hinzufügen, löschen oder pushen", "Add, remove, or list additional nodes": "Hinzufügen, Löschen oder auflisten von zusätzlichen Nodes", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "Node {{.name}} zu Cluster {{.cluster}} hinzufügen", "Additional help topics": "Weitere Hilfe-Themen", "Adds a node to the given cluster config, and starts it.": "Fügt einen Node zur angegebenen Cluster-Konfiguration hinzu und startet es.", @@ -734,6 +735,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "Dies kann auch automatisch erfolgen, indem Sie die env var CHANGE_MINIKUBE_NONE_USER = true setzen", "This control plane is not running! (state={{.state}})": "Diese Kontroll-Ebene läuft nicht! (state={{.state}})", "This driver does not yet work on your architecture. Maybe try --driver=none": "Dieser Treiber funktioniert noch nicht mit dieser Architektur. Versuche --driver=none zu verwenden", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "Dies ist ein bekanntes Problem mit dem BTRFS Treiber. Es exisitiert ein Workaround. Bitte schaue das GitHub Issue an", "This is unusual - you may want to investigate using \"{{.command}}\"": "Das ist ungewöhnlich - Du könntest versuchen \"{{.command}}\" zu verwenden", "This will keep the existing kubectl context and will create a minikube context.": "Dadurch wird der vorhandene Kubectl-Kontext beibehalten und ein minikube-Kontext erstellt.", diff --git a/translations/es.json b/translations/es.json index 49a9e40b67..e21e5bb1d3 100644 --- a/translations/es.json +++ b/translations/es.json @@ -49,6 +49,7 @@ "Add machine IP to NO_PROXY environment variable": "Agregar una IP de máquina a la variable de entorno NO_PROXY", "Add, delete, or push a local image into minikube": "Agrega, elimina, o empuja una imagen local dentro de minikube, haciendo (add, delete, push) respectivamente.", "Add, remove, or list additional nodes": "Usa (add, remove, list) para agregar, eliminar o listar nodos adicionales.", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "Agregando el nodo {{.name}} al cluster {{.cluster}}.", "Additional help topics": "Temas de ayuda adicionales", "Additional mount options, such as cache=fscache": "Opciones de montaje adicionales, por ejemplo cache=fscache", @@ -357,7 +358,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If you are running minikube within a VM, consider using --driver=none:": "", "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:": "", @@ -737,6 +737,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "El proceso se puede automatizar si se define la variable de entorno CHANGE_MINIKUBE_NONE_USER=true", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "Se conservará el contexto de kubectl actual y se creará uno de minikube.", diff --git a/translations/fr.json b/translations/fr.json index 605ed5f438..4cb4dc53cc 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -49,6 +49,7 @@ "Add machine IP to NO_PROXY environment variable": "Ajouter l'IP de la machine à la variable d'environnement NO_PROXY", "Add, delete, or push a local image into minikube": "Ajouter, supprimer ou pousser une image locale dans minikube", "Add, remove, or list additional nodes": "Ajouter, supprimer ou lister des nœuds supplémentaires", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "Ajout du nœud {{.name}} au cluster {{.cluster}}", "Additional help topics": "Rubriques d'aide supplémentaires", "Additional mount options, such as cache=fscache": "Options de montage supplémentaires, telles que cache=fscache", @@ -708,6 +709,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "Cette opération peut également être réalisée en définissant la variable d'environment \"CHANGE_MINIKUBE_NONE_USER=true\".", "This control plane is not running! (state={{.state}})": "Ce plan de contrôle ne fonctionne pas ! (état={{.state}})", "This driver does not yet work on your architecture. Maybe try --driver=none": "Ce pilote ne fonctionne pas encore sur votre architecture. Essayez peut-être --driver=none", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "Il s'agit d'un problème connu avec le pilote de stockage BTRFS, il existe une solution de contournement, veuillez vérifier le problème sur GitHub", "This is unusual - you may want to investigate using \"{{.command}}\"": "C'est inhabituel - vous voudrez peut-être investiguer en utilisant \"{{.command}}\"", "This will keep the existing kubectl context and will create a minikube context.": "Cela permet de conserver le contexte kubectl existent et de créer un contexte minikube.", diff --git a/translations/ja.json b/translations/ja.json index 9fb0045d1d..bcdf4df7f0 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -50,6 +50,7 @@ "Add machine IP to NO_PROXY environment variable": "マシンの IP アドレスを NO_PROXY 環境変数に追加します", "Add, delete, or push a local image into minikube": "ローカルイメージを minikube に追加、削除、またはプッシュします", "Add, remove, or list additional nodes": "追加のノードを追加、削除またはリストアップします", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "{{.name}} ノードを {{.cluster}} クラスターに追加します", "Additional help topics": "追加のトピック", "Additional mount options, such as cache=fscache": "cache=fscache などの追加のマウントオプション", @@ -734,6 +735,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "これは環境変数 CHANGE_MINIKUBE_NONE_USER=true を設定して自動的に行うこともできます", "This control plane is not running! (state={{.state}})": "このコントロールプレーンは動作していません!(state={{.state}})", "This driver does not yet work on your architecture. Maybe try --driver=none": "このドライバーはあなたのアーキテクチャではまだ機能しません。もしかしたら、--driver=none を試してみてください", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "これは BTRFS ストレージドライバーの既知の問題です (回避策があります)。GitHub の issue を確認してください", "This is unusual - you may want to investigate using \"{{.command}}\"": "これは異常です - 「{{.command}}」を使って調査できます", "This will keep the existing kubectl context and will create a minikube context.": "これにより既存の kubectl コンテキストが保持され、minikube コンテキストが作成されます。", diff --git a/translations/ko.json b/translations/ko.json index 6d553b11d5..1d67e51371 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -52,6 +52,7 @@ "Add or delete an image from the local cache.": "로컬 캐시에 이미지를 추가하거나 삭제합니다", "Add, delete, or push a local image into minikube": "minikube에 로컬 이미지를 추가하거나 삭제, 푸시합니다", "Add, remove, or list additional nodes": "노드를 추가하거나 삭제, 나열합니다", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "노드 {{.name}} 를 클러스터 {{.cluster}} 에 추가합니다", "Additional help topics": "", "Additional mount options, such as cache=fscache": "cache=fscache 와 같은 추가적인 마운트 옵션", @@ -374,7 +375,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If you are running minikube within a VM, consider using --driver=none:": "", "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:": "", @@ -740,6 +740,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "", diff --git a/translations/pl.json b/translations/pl.json index 6f70148964..132e785741 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -50,6 +50,7 @@ "Add machine IP to NO_PROXY environment variable": "Dodaj IP serwera do zmiennej środowiskowej NO_PROXY", "Add, delete, or push a local image into minikube": "Dodaj, usuń lub wypchnij lokalny obraz do minikube", "Add, remove, or list additional nodes": "Dodaj, usuń lub wylistuj pozostałe węzły", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "Dodawanie węzła {{.name}} do klastra {{.cluster}}", "Additional help topics": "Dodatkowe tematy pomocy", "Additional mount options, such as cache=fscache": "Dodatkowe opcje montowania, jak na przykład cache=fscache", @@ -360,7 +361,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If using the none driver, ensure that systemctl is installed": "Jeśli użyto sterownika 'none', upewnij się że systemctl jest zainstalowany", "If you are running minikube within a VM, consider using --driver=none:": "", @@ -750,6 +750,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "", diff --git a/translations/ru.json b/translations/ru.json index bbb156f5a3..dca55b5c52 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -44,6 +44,7 @@ "Add image to cache for all running minikube clusters": "", "Add machine IP to NO_PROXY environment variable": "", "Add, remove, or list additional nodes": "", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "", "Additional help topics": "", "Adds a node to the given cluster config, and starts it.": "", @@ -327,7 +328,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If you are running minikube within a VM, consider using --driver=none:": "", "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:": "", @@ -682,6 +682,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "", diff --git a/translations/strings.txt b/translations/strings.txt index f1d330ecc4..eb5a88c8d0 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -44,6 +44,7 @@ "Add image to cache for all running minikube clusters": "", "Add machine IP to NO_PROXY environment variable": "", "Add, remove, or list additional nodes": "", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "", "Additional help topics": "", "Adds a node to the given cluster config, and starts it.": "", @@ -327,7 +328,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If you are running minikube within a VM, consider using --driver=none:": "", "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:": "", @@ -682,6 +682,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index dc7e7f1c87..4b194fe183 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -57,6 +57,7 @@ "Add machine IP to NO_PROXY environment variable": "将机器IP添加到环境变量 NO_PROXY 中", "Add or delete an image from the local cache.": "在本地缓存中添加或删除 image。", "Add, remove, or list additional nodes": "", + "Adding a control-plane node is not yet supported, setting control-plane flag to false": "", "Adding node {{.name}} to cluster {{.cluster}}": "添加节点 {{.name}} 至集群 {{.cluster}}", "Additional help topics": "其他帮助", "Additional mount options, such as cache=fscache": "其他挂载选项,例如:cache=fscache", @@ -432,7 +433,6 @@ "If true, print web links to addons' documentation if using --output=list (default).": "", "If true, returns list of profiles faster by skipping validating the status of the cluster.": "", "If true, the added node will be marked for work. Defaults to true.": "", - "If true, the node added will also be a control plane in addition to a worker.": "", "If true, will perform potentially dangerous operations. Use with discretion.": "", "If you are running minikube within a VM, consider using --driver=none:": "", "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:": "", @@ -839,6 +839,7 @@ "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "此操作还可通过设置环境变量 CHANGE_MINIKUBE_NONE_USER=true 自动完成", "This control plane is not running! (state={{.state}})": "", "This driver does not yet work on your architecture. Maybe try --driver=none": "", + "This flag is currently unsupported.": "", "This is a known issue with BTRFS storage driver, there is a workaround, please checkout the issue on GitHub": "", "This is unusual - you may want to investigate using \"{{.command}}\"": "", "This will keep the existing kubectl context and will create a minikube context.": "这将保留现有 kubectl 上下文并创建 minikube 上下文。", From 9fe8946e6610fcd6f7c7bb24c750409024e2d9b6 Mon Sep 17 00:00:00 2001 From: Nikhil Sharma Date: Wed, 11 May 2022 22:38:01 +0530 Subject: [PATCH 10/33] Made changes so that we get logs when a command starts no matter that it is finished or not --- cmd/minikube/cmd/root.go | 13 +++-- pkg/minikube/audit/audit.go | 78 +++++++++++++++++++++++++++--- pkg/minikube/audit/audit_test.go | 49 +++++++++++++++++-- pkg/minikube/audit/logFile_test.go | 3 +- pkg/minikube/audit/row.go | 9 ++-- pkg/minikube/audit/row_test.go | 15 +++--- 6 files changed, 145 insertions(+), 22 deletions(-) diff --git a/cmd/minikube/cmd/root.go b/cmd/minikube/cmd/root.go index 870518cddc..6b7b13d082 100644 --- a/cmd/minikube/cmd/root.go +++ b/cmd/minikube/cmd/root.go @@ -23,7 +23,6 @@ import ( "path/filepath" "runtime" "strings" - "time" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -84,8 +83,16 @@ var RootCmd = &cobra.Command{ // Execute adds all child commands to the root command sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { - defer audit.Log(time.Now()) - + auditID, err := audit.LogCommandStart() + if err != nil { + klog.Errorf("failed to log command start to audit: %v", err) + } + defer func() { + err := audit.LogCommandEnd(auditID) + if err != nil { + klog.Errorf("failed to log command end to audit: %v", err) + } + }() // Check whether this is a windows binary (.exe) running inisde WSL. if runtime.GOOS == "windows" && detect.IsMicrosoftWSL() { var found = false diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index eb4b0ead71..8a41b47ef4 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -17,18 +17,25 @@ limitations under the License. package audit import ( + "bufio" + "encoding/json" + "fmt" "os" "os/user" "strings" + "sync" "time" + "github.com/google/uuid" "github.com/spf13/pflag" "github.com/spf13/viper" - "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/config" + "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/version" ) +var mutex sync.Mutex + // userName pulls the user flag, if empty gets the os username. func userName() string { u := viper.GetString(config.UserFlag) @@ -52,14 +59,73 @@ func args() string { } // Log details about the executed command. -func Log(startTime time.Time) { - if !shouldLog() { - return +func LogCommandStart() (string, error) { + mutex.Lock() + defer mutex.Unlock() + if len(os.Args) < 2 || !shouldLog() { + return "", nil } - r := newRow(pflag.Arg(0), args(), userName(), version.GetVersion(), startTime, time.Now()) + id := uuid.New().String() + r := newRow(pflag.Arg(0), args(), userName(), version.GetVersion(), time.Now(), id) if err := appendToLog(r); err != nil { - klog.Warning(err) + return "", err } + return r.id, nil +} + +func LogCommandEnd(id string) error { + mutex.Lock() + defer mutex.Unlock() + if id == "" { + return nil + } + if currentLogFile == nil { + if err := setLogFile(); err != nil { + return fmt.Errorf("failed to set the log file: %v", err) + } + } + _, err := currentLogFile.Seek(0, 0) + if err != nil { + return fmt.Errorf("failed to offset for the next Read or Write on currentLogFile: %v", err) + } + var logs []string + s := bufio.NewScanner(currentLogFile) + for s.Scan() { + logs = append(logs, s.Text()) + } + if err = s.Err(); err != nil { + return fmt.Errorf("failed to read from audit file: %v", err) + } + rowSlice, err := logsToRows(logs) + if err != nil { + return fmt.Errorf("failed to convert logs to rows: %v", err) + } + auditContents := "" + var entriesNeedsToUpdate int + for _, v := range rowSlice { + if v.id == id { + v.endTime = time.Now().Format(constants.TimeFormat) + v.Data = v.toMap() + entriesNeedsToUpdate++ + } + auditLog, err := json.Marshal(v) + if err != nil { + return err + } + auditContents += string(auditLog) + "\n" + } + if entriesNeedsToUpdate == 0 { + return fmt.Errorf("failed to find a log row with id equals to %v", id) + } + _, err = currentLogFile.Seek(0, 0) + if err != nil { + return fmt.Errorf("failed to offset for the next Read or Write on currentLogFile: %v", err) + } + _, err = currentLogFile.Write([]byte(auditContents)) + if err != nil { + return err + } + return nil } // shouldLog returns if the command should be logged. diff --git a/pkg/minikube/audit/audit_test.go b/pkg/minikube/audit/audit_test.go index e91f7d972a..a79b255603 100644 --- a/pkg/minikube/audit/audit_test.go +++ b/pkg/minikube/audit/audit_test.go @@ -20,7 +20,6 @@ import ( "os" "os/user" "testing" - "time" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -177,7 +176,27 @@ func TestAudit(t *testing.T) { }) // Check if logging with limited args causes a panic - t.Run("Log", func(t *testing.T) { + t.Run("LogCommandStart", func(t *testing.T) { + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + os.Args = []string{"minikube", "start"} + + oldCommandLine := pflag.CommandLine + defer func() { + pflag.CommandLine = oldCommandLine + pflag.Parse() + }() + mockArgs(t, os.Args) + auditID, err := LogCommandStart() + if auditID == "" { + t.Fatal("audit ID should not be empty") + } + if err != nil { + t.Fatal(err) + } + }) + + t.Run("LogCommandEnd", func(t *testing.T) { oldArgs := os.Args defer func() { os.Args = oldArgs }() os.Args = []string{"minikube"} @@ -188,8 +207,32 @@ func TestAudit(t *testing.T) { pflag.Parse() }() mockArgs(t, os.Args) + auditID, err := LogCommandStart() + if err != nil { + t.Fatal("start failed") + } + err = LogCommandEnd(auditID) - Log(time.Now()) + if err != nil { + t.Fatal(err) + } + }) + + t.Run("LogCommandEnd", func(t *testing.T) { + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + os.Args = []string{"minikube"} + + oldCommandLine := pflag.CommandLine + defer func() { + pflag.CommandLine = oldCommandLine + pflag.Parse() + }() + mockArgs(t, os.Args) + err := LogCommandEnd("non-existing-id") + if err == nil { + t.Fatal("function LogCommandEnd should return an error when a non-existing id is passed in it as an argument") + } }) } diff --git a/pkg/minikube/audit/logFile_test.go b/pkg/minikube/audit/logFile_test.go index 617a43b8e0..1757df00d0 100644 --- a/pkg/minikube/audit/logFile_test.go +++ b/pkg/minikube/audit/logFile_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + "github.com/google/uuid" "k8s.io/minikube/pkg/minikube/localpath" ) @@ -48,7 +49,7 @@ func TestLogFile(t *testing.T) { defer func() { currentLogFile = &oldLogFile }() currentLogFile = f - r := newRow("start", "-v", "user1", "v0.17.1", time.Now(), time.Now()) + r := newRow("start", "-v", "user1", "v0.17.1", time.Now(), uuid.New().String()) if err := appendToLog(r); err != nil { t.Fatalf("Error appendingToLog: %v", err) } diff --git a/pkg/minikube/audit/row.go b/pkg/minikube/audit/row.go index fb5991a008..94edc406aa 100644 --- a/pkg/minikube/audit/row.go +++ b/pkg/minikube/audit/row.go @@ -37,6 +37,7 @@ type row struct { startTime string user string version string + id string Data map[string]string `json:"data"` } @@ -55,6 +56,7 @@ func (e *row) assignFields() { e.startTime = e.Data["startTime"] e.user = e.Data["user"] e.version = e.Data["version"] + e.id = e.Data["id"] } // toMap combines fields into a string map, @@ -68,11 +70,12 @@ func (e *row) toMap() map[string]string { "startTime": e.startTime, "user": e.user, "version": e.version, + "id": e.id, } } // newRow creates a new audit row. -func newRow(command string, args string, user string, version string, startTime time.Time, endTime time.Time, profile ...string) *row { +func newRow(command string, args string, user string, version string, startTime time.Time, id string, profile ...string) *row { p := viper.GetString(config.ProfileName) if len(profile) > 0 { p = profile[0] @@ -80,18 +83,18 @@ func newRow(command string, args string, user string, version string, startTime return &row{ args: args, command: command, - endTime: endTime.Format(constants.TimeFormat), profile: p, startTime: startTime.Format(constants.TimeFormat), user: user, version: version, + id: id, } } // toFields converts a row to an array of fields, // to be used when converting to a table. func (e *row) toFields() []string { - return []string{e.command, e.args, e.profile, e.user, e.version, e.startTime, e.endTime} + return []string{e.command, e.args, e.profile, e.user, e.version, e.startTime, e.endTime, e.id} } // logsToRows converts audit logs into arrays of rows. diff --git a/pkg/minikube/audit/row_test.go b/pkg/minikube/audit/row_test.go index 88b54174df..8e53e52d45 100644 --- a/pkg/minikube/audit/row_test.go +++ b/pkg/minikube/audit/row_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + "github.com/google/uuid" "k8s.io/minikube/pkg/minikube/constants" ) @@ -36,8 +37,10 @@ func TestRow(t *testing.T) { stFormatted := st.Format(constants.TimeFormat) et := time.Now() etFormatted := et.Format(constants.TimeFormat) + id := uuid.New().String() - r := newRow(c, a, u, v, st, et, p) + r := newRow(c, a, u, v, st, id, p) + r.endTime = etFormatted t.Run("NewRow", func(t *testing.T) { tests := []struct { @@ -51,7 +54,7 @@ func TestRow(t *testing.T) { {"user", r.user, u}, {"version", r.version, v}, {"startTime", r.startTime, stFormatted}, - {"endTime", r.endTime, etFormatted}, + {"id", r.id, id}, } for _, tt := range tests { @@ -83,7 +86,7 @@ func TestRow(t *testing.T) { {"user", u}, {"version", v}, {"startTime", stFormatted}, - {"endTime", etFormatted}, + {"id", id}, } for _, tt := range tests { @@ -97,7 +100,7 @@ func TestRow(t *testing.T) { t.Run("toFields", func(t *testing.T) { got := r.toFields() gotString := strings.Join(got, ",") - want := []string{c, a, p, u, v, stFormatted, etFormatted} + want := []string{c, a, p, u, v, stFormatted, etFormatted, id} wantString := strings.Join(want, ",") if gotString != wantString { @@ -106,7 +109,7 @@ func TestRow(t *testing.T) { }) t.Run("assignFields", func(t *testing.T) { - l := fmt.Sprintf(`{"data":{"args":"%s","command":"%s","endTime":"%s","profile":"%s","startTime":"%s","user":"%s","version":"v0.17.1"},"datacontenttype":"application/json","id":"bc6ec9d4-0d08-4b57-ac3b-db8d67774768","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.audit"}`, a, c, etFormatted, p, stFormatted, u) + l := fmt.Sprintf(`{"data":{"args":"%s","command":"%s","id":"%s","profile":"%s","startTime":"%s","user":"%s","version":"v0.17.1"},"datacontenttype":"application/json","id":"bc6ec9d4-0d08-4b57-ac3b-db8d67774768","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.audit"}`, a, c, id, p, stFormatted, u) r := &row{} if err := json.Unmarshal([]byte(l), r); err != nil { @@ -126,7 +129,7 @@ func TestRow(t *testing.T) { {"user", r.user, u}, {"version", r.version, v}, {"startTime", r.startTime, stFormatted}, - {"endTime", r.endTime, etFormatted}, + {"id", r.id, id}, } for _, tt := range tests { From d125e3fd8e6f4f4f17e3e199af502db3ff677def Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 14 Jun 2022 15:04:13 -0700 Subject: [PATCH 11/33] fix bugs --- pkg/minikube/audit/audit.go | 14 ++++++-------- pkg/minikube/audit/logFile.go | 8 ++++++++ pkg/minikube/audit/report.go | 3 +++ pkg/minikube/audit/row.go | 25 +++++++++++++++---------- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index 8a41b47ef4..adc59e2680 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -84,16 +84,15 @@ func LogCommandEnd(id string) error { return fmt.Errorf("failed to set the log file: %v", err) } } - _, err := currentLogFile.Seek(0, 0) - if err != nil { - return fmt.Errorf("failed to offset for the next Read or Write on currentLogFile: %v", err) + if err := seekToBeginning(); err != nil { + return err } var logs []string s := bufio.NewScanner(currentLogFile) for s.Scan() { logs = append(logs, s.Text()) } - if err = s.Err(); err != nil { + if err := s.Err(); err != nil { return fmt.Errorf("failed to read from audit file: %v", err) } rowSlice, err := logsToRows(logs) @@ -117,9 +116,8 @@ func LogCommandEnd(id string) error { if entriesNeedsToUpdate == 0 { return fmt.Errorf("failed to find a log row with id equals to %v", id) } - _, err = currentLogFile.Seek(0, 0) - if err != nil { - return fmt.Errorf("failed to offset for the next Read or Write on currentLogFile: %v", err) + if err := currentLogFile.Truncate(0); err != nil { + return err } _, err = currentLogFile.Write([]byte(auditContents)) if err != nil { @@ -140,7 +138,7 @@ func shouldLog() bool { } // commands that should not be logged. - no := []string{"status", "version"} + no := []string{"status", "version", "logs", "generate-docs"} a := pflag.Arg(0) for _, c := range no { if a == c { diff --git a/pkg/minikube/audit/logFile.go b/pkg/minikube/audit/logFile.go index 1762070f1e..7d7bffc976 100644 --- a/pkg/minikube/audit/logFile.go +++ b/pkg/minikube/audit/logFile.go @@ -55,3 +55,11 @@ func appendToLog(row *row) error { } return nil } + +func seekToBeginning() error { + _, err := currentLogFile.Seek(0, 0) + if err != nil { + return fmt.Errorf("failed to seek to beginning of audit file: %v", err) + } + return nil +} diff --git a/pkg/minikube/audit/report.go b/pkg/minikube/audit/report.go index 6816757126..9c25f10925 100644 --- a/pkg/minikube/audit/report.go +++ b/pkg/minikube/audit/report.go @@ -37,6 +37,9 @@ func Report(lastNLines int) (*RawReport, error) { return nil, fmt.Errorf("failed to set the log file: %v", err) } } + if err := seekToBeginning(); err != nil { + return nil, err + } var logs []string s := bufio.NewScanner(currentLogFile) for s.Scan() { diff --git a/pkg/minikube/audit/row.go b/pkg/minikube/audit/row.go index 94edc406aa..29c5d0b49e 100644 --- a/pkg/minikube/audit/row.go +++ b/pkg/minikube/audit/row.go @@ -30,15 +30,20 @@ import ( // row is the log of a single command. type row struct { - args string - command string - endTime string - profile string - startTime string - user string - version string - id string - Data map[string]string `json:"data"` + SpecVersion string `json:"specversion"` + ID string `json:"id"` + Source string `json:"source"` + TypeField string `json:"type"` + DataContentType string `json:"datacontenttype"` + Data map[string]string `json:"data"` + args string + command string + endTime string + id string + profile string + startTime string + user string + version string } // Type returns the cloud events compatible type of this struct. @@ -94,7 +99,7 @@ func newRow(command string, args string, user string, version string, startTime // toFields converts a row to an array of fields, // to be used when converting to a table. func (e *row) toFields() []string { - return []string{e.command, e.args, e.profile, e.user, e.version, e.startTime, e.endTime, e.id} + return []string{e.command, e.args, e.profile, e.user, e.version, e.startTime, e.endTime} } // logsToRows converts audit logs into arrays of rows. From 6694cf5088ab77ed91de233bd74132f146c2fe85 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 14 Jun 2022 15:37:03 -0700 Subject: [PATCH 12/33] fix truncating on Windows --- pkg/minikube/audit/audit.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index adc59e2680..db232ba5b3 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -31,6 +31,7 @@ import ( "github.com/spf13/viper" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/constants" + "k8s.io/minikube/pkg/minikube/localpath" "k8s.io/minikube/pkg/version" ) @@ -116,7 +117,14 @@ func LogCommandEnd(id string) error { if entriesNeedsToUpdate == 0 { return fmt.Errorf("failed to find a log row with id equals to %v", id) } - if err := currentLogFile.Truncate(0); err != nil { + // have to close the audit file, truncate it, then reopen it as Windows can't truncate an open file + if err := currentLogFile.Close(); err != nil { + return fmt.Errorf("failed to close audit file: %v", err) + } + if err := os.Truncate(localpath.AuditLog(), 0); err != nil { + return fmt.Errorf("failed to truncate audit file: %v", err) + } + if err := setLogFile(); err != nil { return err } _, err = currentLogFile.Write([]byte(auditContents)) From 5b75fd5cb12b8eab97beab8ebdc7824f1c129d2e Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 14 Jun 2022 15:40:18 -0700 Subject: [PATCH 13/33] fix test --- pkg/minikube/audit/row_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/audit/row_test.go b/pkg/minikube/audit/row_test.go index 8e53e52d45..a951234858 100644 --- a/pkg/minikube/audit/row_test.go +++ b/pkg/minikube/audit/row_test.go @@ -100,7 +100,7 @@ func TestRow(t *testing.T) { t.Run("toFields", func(t *testing.T) { got := r.toFields() gotString := strings.Join(got, ",") - want := []string{c, a, p, u, v, stFormatted, etFormatted, id} + want := []string{c, a, p, u, v, stFormatted, etFormatted} wantString := strings.Join(want, ",") if gotString != wantString { From dbc0ced19ecdb9bfc10a10a93cbad0a8bd95f147 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 14 Jun 2022 16:31:09 -0700 Subject: [PATCH 14/33] fixed duplicate test name --- pkg/minikube/audit/audit_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/audit/audit_test.go b/pkg/minikube/audit/audit_test.go index a79b255603..262ceac821 100644 --- a/pkg/minikube/audit/audit_test.go +++ b/pkg/minikube/audit/audit_test.go @@ -218,7 +218,7 @@ func TestAudit(t *testing.T) { } }) - t.Run("LogCommandEnd", func(t *testing.T) { + t.Run("LogCommandEndNonExistingID", func(t *testing.T) { oldArgs := os.Args defer func() { os.Args = oldArgs }() os.Args = []string{"minikube"} From 63259b55569f7510f392372a9d53828d5e28049a Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 15 Jun 2022 14:40:53 -0700 Subject: [PATCH 15/33] only keep audit log file open for as long as needed --- pkg/minikube/audit/audit.go | 33 +++++++++--------------------- pkg/minikube/audit/logFile.go | 32 ++++++++++++++--------------- pkg/minikube/audit/logFile_test.go | 9 +++++--- pkg/minikube/audit/report.go | 10 ++++----- 4 files changed, 35 insertions(+), 49 deletions(-) diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index db232ba5b3..dc3c46057a 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -23,7 +23,6 @@ import ( "os" "os/user" "strings" - "sync" "time" "github.com/google/uuid" @@ -35,8 +34,6 @@ import ( "k8s.io/minikube/pkg/version" ) -var mutex sync.Mutex - // userName pulls the user flag, if empty gets the os username. func userName() string { u := viper.GetString(config.UserFlag) @@ -61,8 +58,6 @@ func args() string { // Log details about the executed command. func LogCommandStart() (string, error) { - mutex.Lock() - defer mutex.Unlock() if len(os.Args) < 2 || !shouldLog() { return "", nil } @@ -75,17 +70,10 @@ func LogCommandStart() (string, error) { } func LogCommandEnd(id string) error { - mutex.Lock() - defer mutex.Unlock() if id == "" { return nil } - if currentLogFile == nil { - if err := setLogFile(); err != nil { - return fmt.Errorf("failed to set the log file: %v", err) - } - } - if err := seekToBeginning(); err != nil { + if err := openAuditLog(); err != nil { return err } var logs []string @@ -96,6 +84,9 @@ func LogCommandEnd(id string) error { if err := s.Err(); err != nil { return fmt.Errorf("failed to read from audit file: %v", err) } + if err := closeAuditLog(); err != nil { + return err + } rowSlice, err := logsToRows(logs) if err != nil { return fmt.Errorf("failed to convert logs to rows: %v", err) @@ -117,21 +108,17 @@ func LogCommandEnd(id string) error { if entriesNeedsToUpdate == 0 { return fmt.Errorf("failed to find a log row with id equals to %v", id) } - // have to close the audit file, truncate it, then reopen it as Windows can't truncate an open file - if err := currentLogFile.Close(); err != nil { - return fmt.Errorf("failed to close audit file: %v", err) - } + // have to truncate the audit log while closed as Windows can't truncate an open file if err := os.Truncate(localpath.AuditLog(), 0); err != nil { - return fmt.Errorf("failed to truncate audit file: %v", err) + return fmt.Errorf("failed to truncate audit log: %v", err) } - if err := setLogFile(); err != nil { + if err := openAuditLog(); err != nil { return err } - _, err = currentLogFile.Write([]byte(auditContents)) - if err != nil { - return err + if _, err = currentLogFile.Write([]byte(auditContents)); err != nil { + return fmt.Errorf("failed to write to audit log: %v", err) } - return nil + return closeAuditLog() } // shouldLog returns if the command should be logged. diff --git a/pkg/minikube/audit/logFile.go b/pkg/minikube/audit/logFile.go index 7d7bffc976..9d9bbf9456 100644 --- a/pkg/minikube/audit/logFile.go +++ b/pkg/minikube/audit/logFile.go @@ -27,39 +27,37 @@ import ( // currentLogFile the file that's used to store audit logs var currentLogFile *os.File -// setLogFile sets the logPath and creates the log file if it doesn't exist. -func setLogFile() error { +// openAuditLog opens the audit log file or creates it if it doesn't exist. +func openAuditLog() error { lp := localpath.AuditLog() f, err := os.OpenFile(lp, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0644) if err != nil { - return fmt.Errorf("unable to open %s: %v", lp, err) + return fmt.Errorf("failed to open the audit log: %v", err) } currentLogFile = f return nil } +// closeAuditLog closes the audit log file +func closeAuditLog() error { + if err := currentLogFile.Close(); err != nil { + return fmt.Errorf("failed to close the audit log: %v", err) + } + return nil +} + // appendToLog appends the row to the log file. func appendToLog(row *row) error { - if currentLogFile == nil { - if err := setLogFile(); err != nil { - return err - } - } ce := register.CloudEvent(row, row.toMap()) bs, err := ce.MarshalJSON() if err != nil { return fmt.Errorf("error marshalling event: %v", err) } + if err := openAuditLog(); err != nil { + return err + } if _, err := currentLogFile.WriteString(string(bs) + "\n"); err != nil { return fmt.Errorf("unable to write to audit log: %v", err) } - return nil -} - -func seekToBeginning() error { - _, err := currentLogFile.Seek(0, 0) - if err != nil { - return fmt.Errorf("failed to seek to beginning of audit file: %v", err) - } - return nil + return closeAuditLog() } diff --git a/pkg/minikube/audit/logFile_test.go b/pkg/minikube/audit/logFile_test.go index 1757df00d0..8c697a40c8 100644 --- a/pkg/minikube/audit/logFile_test.go +++ b/pkg/minikube/audit/logFile_test.go @@ -28,13 +28,16 @@ import ( ) func TestLogFile(t *testing.T) { - t.Run("SetLogFile", func(t *testing.T) { + t.Run("OpenAndCloseAuditLog", func(t *testing.T) { // make sure logs directory exists if err := os.MkdirAll(filepath.Dir(localpath.AuditLog()), 0755); err != nil { t.Fatalf("Error creating logs directory: %v", err) } - if err := setLogFile(); err != nil { - t.Error(err) + if err := openAuditLog(); err != nil { + t.Fatal(err) + } + if err := closeAuditLog(); err != nil { + t.Fatal(err) } }) diff --git a/pkg/minikube/audit/report.go b/pkg/minikube/audit/report.go index 9c25f10925..8b5bc69628 100644 --- a/pkg/minikube/audit/report.go +++ b/pkg/minikube/audit/report.go @@ -32,12 +32,7 @@ func Report(lastNLines int) (*RawReport, error) { if lastNLines <= 0 { return nil, fmt.Errorf("last n lines must be 1 or greater") } - if currentLogFile == nil { - if err := setLogFile(); err != nil { - return nil, fmt.Errorf("failed to set the log file: %v", err) - } - } - if err := seekToBeginning(); err != nil { + if err := openAuditLog(); err != nil { return nil, err } var logs []string @@ -52,6 +47,9 @@ func Report(lastNLines int) (*RawReport, error) { if err := s.Err(); err != nil { return nil, fmt.Errorf("failed to read from audit file: %v", err) } + if err := closeAuditLog(); err != nil { + return nil, err + } rows, err := logsToRows(logs) if err != nil { return nil, fmt.Errorf("failed to convert logs to rows: %v", err) From 75f99c924bfcb4cf2d49789871d62ce54da9dbda Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 15 Jun 2022 14:55:25 -0700 Subject: [PATCH 16/33] defer closing the audit file --- pkg/minikube/audit/audit.go | 7 +++---- pkg/minikube/audit/logFile.go | 9 +++++---- pkg/minikube/audit/logFile_test.go | 6 ++---- pkg/minikube/audit/report.go | 4 +--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index dc3c46057a..e119429dad 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -76,6 +76,7 @@ func LogCommandEnd(id string) error { if err := openAuditLog(); err != nil { return err } + defer closeAuditLog() var logs []string s := bufio.NewScanner(currentLogFile) for s.Scan() { @@ -84,9 +85,7 @@ func LogCommandEnd(id string) error { if err := s.Err(); err != nil { return fmt.Errorf("failed to read from audit file: %v", err) } - if err := closeAuditLog(); err != nil { - return err - } + closeAuditLog() rowSlice, err := logsToRows(logs) if err != nil { return fmt.Errorf("failed to convert logs to rows: %v", err) @@ -118,7 +117,7 @@ func LogCommandEnd(id string) error { if _, err = currentLogFile.Write([]byte(auditContents)); err != nil { return fmt.Errorf("failed to write to audit log: %v", err) } - return closeAuditLog() + return nil } // shouldLog returns if the command should be logged. diff --git a/pkg/minikube/audit/logFile.go b/pkg/minikube/audit/logFile.go index 9d9bbf9456..437114aa8d 100644 --- a/pkg/minikube/audit/logFile.go +++ b/pkg/minikube/audit/logFile.go @@ -20,6 +20,7 @@ import ( "fmt" "os" + "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/localpath" "k8s.io/minikube/pkg/minikube/out/register" ) @@ -39,11 +40,10 @@ func openAuditLog() error { } // closeAuditLog closes the audit log file -func closeAuditLog() error { +func closeAuditLog() { if err := currentLogFile.Close(); err != nil { - return fmt.Errorf("failed to close the audit log: %v", err) + klog.Errorf("failed to close the audit log: %v", err) } - return nil } // appendToLog appends the row to the log file. @@ -56,8 +56,9 @@ func appendToLog(row *row) error { if err := openAuditLog(); err != nil { return err } + defer closeAuditLog() if _, err := currentLogFile.WriteString(string(bs) + "\n"); err != nil { return fmt.Errorf("unable to write to audit log: %v", err) } - return closeAuditLog() + return nil } diff --git a/pkg/minikube/audit/logFile_test.go b/pkg/minikube/audit/logFile_test.go index 8c697a40c8..9167911084 100644 --- a/pkg/minikube/audit/logFile_test.go +++ b/pkg/minikube/audit/logFile_test.go @@ -28,7 +28,7 @@ import ( ) func TestLogFile(t *testing.T) { - t.Run("OpenAndCloseAuditLog", func(t *testing.T) { + t.Run("OpenAuditLog", func(t *testing.T) { // make sure logs directory exists if err := os.MkdirAll(filepath.Dir(localpath.AuditLog()), 0755); err != nil { t.Fatalf("Error creating logs directory: %v", err) @@ -36,12 +36,10 @@ func TestLogFile(t *testing.T) { if err := openAuditLog(); err != nil { t.Fatal(err) } - if err := closeAuditLog(); err != nil { - t.Fatal(err) - } }) t.Run("AppendToLog", func(t *testing.T) { + defer closeAuditLog() f, err := os.CreateTemp("", "audit.json") if err != nil { t.Fatalf("Error creating temporary file: %v", err) diff --git a/pkg/minikube/audit/report.go b/pkg/minikube/audit/report.go index 8b5bc69628..1c255086cb 100644 --- a/pkg/minikube/audit/report.go +++ b/pkg/minikube/audit/report.go @@ -35,6 +35,7 @@ func Report(lastNLines int) (*RawReport, error) { if err := openAuditLog(); err != nil { return nil, err } + defer closeAuditLog() var logs []string s := bufio.NewScanner(currentLogFile) for s.Scan() { @@ -47,9 +48,6 @@ func Report(lastNLines int) (*RawReport, error) { if err := s.Err(); err != nil { return nil, fmt.Errorf("failed to read from audit file: %v", err) } - if err := closeAuditLog(); err != nil { - return nil, err - } rows, err := logsToRows(logs) if err != nil { return nil, fmt.Errorf("failed to convert logs to rows: %v", err) From 7439783a69481b6393dbab8c2204067696d8cc8b Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Mon, 20 Jun 2022 06:05:38 +0000 Subject: [PATCH 17/33] update image constants for kubeadm images --- pkg/minikube/constants/constants_kubeadm_images.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/constants/constants_kubeadm_images.go b/pkg/minikube/constants/constants_kubeadm_images.go index 5c11be816d..be36232481 100644 --- a/pkg/minikube/constants/constants_kubeadm_images.go +++ b/pkg/minikube/constants/constants_kubeadm_images.go @@ -19,8 +19,8 @@ package constants var ( KubeadmImages = map[string]map[string]string{ "v1.25": { - "coredns/coredns": "v1.8.6", - "etcd": "3.5.3-0", + "coredns/coredns": "v1.9.3", + "etcd": "3.5.4-0", "pause": "3.7", }, "v1.24": { From 01c48b8b408ab3bfccfa27618a89de96a8b0e8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 20 Jun 2022 15:36:08 +0800 Subject: [PATCH 18/33] occurring not occuring --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c85acc2bb3..51ef9ce530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ QEMU driver enhancements: Features: * Add configure option to registry-aliases addon [#13912](https://github.com/kubernetes/minikube/pull/13912) -For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). +For a more detailed changelog, including changes occurring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). Thank you to our contributors for this release! @@ -75,7 +75,7 @@ Version Upgrades: * ISO: Upgrade Podman from 2.2.1 to 3.4.2 [#13126](https://github.com/kubernetes/minikube/pull/13126) * ISO: Add packaging for crun [#11679](https://github.com/kubernetes/minikube/pull/11679) -For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). +For a more detailed changelog, including changes occurring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). Thank you to our contributors for this release! @@ -161,7 +161,7 @@ Version Upgrades: * ISO: Add packaging for cri-dockerd [#13191](https://github.com/kubernetes/minikube/pull/13191) -For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). +For a more detailed changelog, including changes occurring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md). Thank you to our contributors for this release! From dde17c0786bb402bbe1d48b29aa48f6d1db21e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 20 Jun 2022 15:43:32 +0800 Subject: [PATCH 19/33] not need modify --- cmd/minikube/cmd/config/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index b344c17044..cef701b87e 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -20,7 +20,6 @@ import ( "strings" "github.com/spf13/cobra" - "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/localpath" @@ -184,7 +183,7 @@ Configurable fields: ` + "\n\n" + configurableFields(), } func configurableFields() string { - var fields []string + fields := []string{} for _, s := range settings { fields = append(fields, " * "+s.name) } From 816966290eb0156214c04d631aee61aef977d819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=E5=B3=B0?= Date: Mon, 20 Jun 2022 15:46:55 +0800 Subject: [PATCH 20/33] import klog --- cmd/minikube/cmd/config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index cef701b87e..4af7698da3 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -20,6 +20,7 @@ import ( "strings" "github.com/spf13/cobra" + "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/localpath" From a05641e2fd44c149fb8e5cfd4b7b25cca797df8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 18:07:12 +0000 Subject: [PATCH 21/33] Bump k8s.io/apimachinery from 0.24.1 to 0.24.2 Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.24.1 to 0.24.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.24.1...v0.24.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index d810f2608b..31e8ea6cad 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.1 - k8s.io/apimachinery v0.24.1 + k8s.io/apimachinery v0.24.2 k8s.io/client-go v0.24.1 k8s.io/cluster-bootstrap v0.0.0 k8s.io/component-base v0.24.1 diff --git a/go.sum b/go.sum index ab9144fb06..d8759352a5 100644 --- a/go.sum +++ b/go.sum @@ -2225,8 +2225,9 @@ k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRp k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= +k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= From 1d0714f85bc1f0150842c534d5460af637e9d06a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 18:07:32 +0000 Subject: [PATCH 22/33] Bump github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace Bumps [github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/releases) - [Commits](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/compare/exporter/trace/v1.8.1...exporter/trace/v1.8.2) --- updated-dependencies: - dependency-name: github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index d810f2608b..f54736a4f6 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.12 github.com/Delta456/box-cli-maker/v2 v2.2.2 github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 github.com/Microsoft/hcsshim v0.8.17 // indirect github.com/Parallels/docker-machine-parallels/v2 v2.0.1 github.com/VividCortex/godaemon v1.0.0 @@ -112,7 +112,7 @@ require ( cloud.google.com/go/trace v1.2.0 // indirect git.sr.ht/~sbinet/gg v0.3.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect diff --git a/go.sum b/go.sum index ab9144fb06..53663aa45c 100644 --- a/go.sum +++ b/go.sum @@ -118,10 +118,10 @@ github.com/Delta456/box-cli-maker/v2 v2.2.2/go.mod h1:idItIMZeyx3bg73XwSgsLeZd+g github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 h1:rMamBsR6iCT9Y5m2Il6vFGJvY7FAgck4AoA/LobheKU= github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2/go.mod h1:BB1eHdMLYEFuFdBlRMb0N7YGVdM5s6Pt0njxgvfbGGs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1 h1:Tn/3pMqRSsI09jFVdGEuMqLIBNOmRHVqKp9DSQg4HPM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1/go.mod h1:KddM1vG3MS+CRfmoFBqeUIICfd9nS8pLHKtwJ/kt0QQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1 h1:SixyMKTOWhEWISdA7PB7vOxkvOP8BIgW5uzbyIf0kXM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= From 59c70fad9462a0d12777f08e51b96f6b0a4a629e Mon Sep 17 00:00:00 2001 From: layakdev <107048101+layakdev@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:53:01 +0200 Subject: [PATCH 23/33] Update _index.md --- site/content/en/docs/start/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/start/_index.md b/site/content/en/docs/start/_index.md index 93f8b54d99..5c9ebb1d32 100644 --- a/site/content/en/docs/start/_index.md +++ b/site/content/en/docs/start/_index.md @@ -456,7 +456,7 @@ choco install minikube } ``` - _If you used a CLI to perform the installation, you will need to close that CLI and open a new one before proceeding._ + *If you used a terminal (like powershell) for the installation, please close the terminal and reopen it before running minikube.* {{% /quiz_instruction %}} {{% quiz_instruction id="/Windows/x86-64/Beta/.exe download" %}} From 6c75050d12ff2ab1e448d01be7b01c3375e1484f Mon Sep 17 00:00:00 2001 From: layakdev <107048101+layakdev@users.noreply.github.com> Date: Tue, 21 Jun 2022 17:01:07 +0200 Subject: [PATCH 24/33] Update _index.md --- site/content/en/docs/start/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/en/docs/start/_index.md b/site/content/en/docs/start/_index.md index 5c9ebb1d32..504d799b6b 100644 --- a/site/content/en/docs/start/_index.md +++ b/site/content/en/docs/start/_index.md @@ -456,7 +456,7 @@ choco install minikube } ``` - *If you used a terminal (like powershell) for the installation, please close the terminal and reopen it before running minikube.* + If you used a terminal (like powershell) for the installation, please close the terminal and reopen it before running minikube. {{% /quiz_instruction %}} {{% quiz_instruction id="/Windows/x86-64/Beta/.exe download" %}} From a26b75af68e35dd11cb14282f0ae974a34ce1361 Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Tue, 21 Jun 2022 17:40:39 +0000 Subject: [PATCH 25/33] Update auto-generated docs and translations --- site/content/en/docs/contrib/tests.en.md | 2 ++ translations/de.json | 3 +++ translations/es.json | 3 +++ translations/fr.json | 3 +++ translations/ja.json | 3 +++ translations/ko.json | 3 +++ translations/pl.json | 3 +++ translations/ru.json | 3 +++ translations/strings.txt | 3 +++ translations/zh-CN.json | 3 +++ 10 files changed, 29 insertions(+) diff --git a/site/content/en/docs/contrib/tests.en.md b/site/content/en/docs/contrib/tests.en.md index cff97fd455..4e807d0bb5 100644 --- a/site/content/en/docs/contrib/tests.en.md +++ b/site/content/en/docs/contrib/tests.en.md @@ -42,6 +42,8 @@ tests the csi hostpath driver by creating a persistent volume, snapshotting it a #### validateGCPAuthAddon tests the GCP Auth addon with either phony or real credentials and makes sure the files are mounted into pods correctly +#### validateHeadlampAddon + ## TestCertOptions makes sure minikube certs respect the --apiserver-ips and --apiserver-names parameters diff --git a/translations/de.json b/translations/de.json index c95e4e1c81..e1b3c68fbc 100644 --- a/translations/de.json +++ b/translations/de.json @@ -323,6 +323,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "Go Template Format String für die Ausgabe der Konfigurations-Ansicht Ausgabe. Das Format von Go Templates ist hier beschrieben: https://golang.org/pkg/text/template/\nFür eine Liste der im Template verfügbaren Variablen, kann man die struct Werte hier einsehen: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "Go Template Format String für die Status Ausgabe. Das Format von Go Templates ist hier beschrieben: https://golang.org/pkg/text/template/\nFür eine Liste der im Template verfügbaren Variablen, kann man die struct Werte hier einsehen: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status", "Group ID: {{.groupID}}": "Gruppen ID: {{.groupID}}", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "Hypervisor-Signatur vor dem Gast in minikube verbergen (nur kvm2-Treiber)", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "Hyperkit ist kaputt. Aktualisieren Sie auf die neueste Version von Hyperkit und/oder Docker Desktop. Alternativ können Sie einen anderen Treiber auswählen mit --driver", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "Das Hyperkit Netzwerk ist kaputt. Versuchen Sie das Internet Sharing zu deaktivieren: System Preference \u003e Sharing \u003e Internet Sharing. Alternativ können Sie versuchen auf die aktuellste Hyperkit Version zu aktualisieren oder einen anderen Treiber zu verwenden.", @@ -741,6 +742,8 @@ "This {{.type}} is having trouble accessing https://{{.repository}}": "Dieser {{.type}} hat Probleme beim Zugriff auf https://{{.repository}}", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "Tip: Um diesen zu root gehörenden Cluster zu entfernen, führe {{.cmd}} aus", "Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "Tipp: Um diesen Root-Cluster zu entfernen, führen Sie Folgendes aus: sudo {{.cmd}} delete", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "Um zu diesem Cluster zu verbinden, verwende --context={{.name}}", "To connect to this cluster, use: kubectl --context={{.name}}": "Verwenden Sie zum Herstellen einer Verbindung zu diesem Cluster: kubectl --context = {{.name}}", "To connect to this cluster, use: kubectl --context={{.name}}__1": "Verwenden Sie zum Herstellen einer Verbindung zu diesem Cluster: kubectl --context = {{.name}}", diff --git a/translations/es.json b/translations/es.json index 6a1eb947fb..14b9d5d860 100644 --- a/translations/es.json +++ b/translations/es.json @@ -332,6 +332,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "Permite ocultar la firma del hipervisor al invitado en minikube (solo con el controlador de kvm2)", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "", @@ -745,6 +746,8 @@ "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "Para eliminar este clúster de raíz, ejecuta: sudo {{.cmd}} delete", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.name}}": "Para conectarte a este clúster, usa: kubectl --context={{.name}}", "To connect to this cluster, use: kubectl --context={{.name}}__1": "Para conectarte a este clúster, usa: kubectl --context={{.name}}", diff --git a/translations/fr.json b/translations/fr.json index f5b62af785..f323e7a76c 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -314,6 +314,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "Go chaîne de format de modèle pour la sortie de la vue de configuration. Le format des modèles Go peut être trouvé ici : https://golang.org/pkg/text/template/\nPour la liste des variables accessibles pour le modèle, voir les valeurs de structure ici : https://godoc.org/k8s .io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "Go chaîne de format de modèle pour la sortie d'état. Le format des modèles Go peut être trouvé ici : https://golang.org/pkg/text/template/\nPour la liste des variables accessibles pour le modèle, consultez les valeurs de structure ici : https://godoc.org/k8s. io/minikube/cmd/minikube/cmd#Status", "Group ID: {{.groupID}}": "Identifiant du groupe: {{.groupID}}", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "Masque la signature de l'hyperviseur de l'invité dans minikube (pilote kvm2 uniquement).", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "Hyperkit ne fonctionne pas. Mettez à niveau vers la dernière version d'hyperkit et/ou Docker for Desktop. Alternativement, vous pouvez choisir un autre --driver", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "Le réseau Hyperkit est cassé. Essayez de désactiver le partage Internet : Préférence système \u003e Partage \u003e Partage Internet. \nVous pouvez également essayer de mettre à niveau vers la dernière version d'hyperkit ou d'utiliser un autre pilote.", @@ -715,6 +716,8 @@ "This will start the mount daemon and automatically mount files into minikube.": "Cela démarrera le démon de montage et montera automatiquement les fichiers dans minikube.", "This {{.type}} is having trouble accessing https://{{.repository}}": "Ce {{.type}} rencontre des difficultés pour accéder à https://{{.repository}}", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "Astuce : Pour supprimer ce cluster appartenant à la racine, exécutez : sudo {{.cmd}}", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "Pour vous connecter à ce cluster, utilisez : --context={{.name}}", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "Pour vous connecter à ce cluster, utilisez : kubectl --context={{.profile_name}}", "To disable beta notices, run: 'minikube config set WantBetaUpdateNotification false'": "Pour désactiver les notifications bêta, exécutez : 'minikube config set WantBetaUpdateNotification false'", diff --git a/translations/ja.json b/translations/ja.json index 7c538116e0..282195554a 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -322,6 +322,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "設定ビュー出力用の Go テンプレートフォーマット文字列。Go テンプレートのフォーマットはこちら: https://golang.org/pkg/text/template/\nテンプレートでアクセス可能な変数の一覧は、こちらの構造化変数を参照してください: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "状態出力用の Go テンプレートフォーマット文字列。Go テンプレートのフォーマットはこちら: https://golang.org/pkg/text/template/\nテンプレートでアクセス可能な変数の一覧は、こちらの構造化変数を参照してください: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status", "Group ID: {{.groupID}}": "グループ ID: {{.groupID}}", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "minikube 中のゲストに対してハイパーバイザー署名を非表示にします (kvm2 ドライバーのみ)", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "Hyperkit は故障しています。最新バージョンの Hyperkit と Docker for Desktop にアップグレードしてください。あるいは、別の --driver を選択することもできます。", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "Hyperkit ネットワーキングは故障しています。インターネット共有の無効化を試してください: システム環境設定 \u003e 共有 \u003e インターネット共有。\nあるいは、最新の Hyperkit バージョンへのアップグレードか、別のドライバー使用を試すこともできます。", @@ -743,6 +744,8 @@ "This {{.type}} is having trouble accessing https://{{.repository}}": "この {{.type}} は https://{{.repository}} アクセスにおける問題があります", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "ヒント: この root 所有クラスターの削除コマンド: sudo {{.cmd}}", "Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "ヒント: この root 所有クラスターの削除コマンド: sudo {{.cmd}} delete", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "このクラスターに接続するためには、--context={{.name}} を使用します", "To connect to this cluster, use: kubectl --context={{.name}}": "このクラスターに接続するためには、kubectl --context={{.name}} を使用します", "To connect to this cluster, use: kubectl --context={{.name}}__1": "このクラスターに接続するためには、kubectl --context={{.name}} を使用します", diff --git a/translations/ko.json b/translations/ko.json index d3dbed1917..cd82eb91b1 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -350,6 +350,7 @@ "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "libvirt 설정을 알맞게 하셨습니까?", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "", @@ -746,6 +747,8 @@ "This will start the mount daemon and automatically mount files into minikube.": "", "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "", "To disable beta notices, run: 'minikube config set WantBetaUpdateNotification false'": "", diff --git a/translations/pl.json b/translations/pl.json index 25e99394f7..d51cdc0302 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -336,6 +336,7 @@ "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "Czy napewno skonfigurowano libvirt w sposób prawidłowy?", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "", @@ -757,6 +758,8 @@ "This will start the mount daemon and automatically mount files into minikube.": "", "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.name}}": "Aby połączyć się z klastrem użyj: kubectl --context={{.name}}", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "Aby połaczyć się z klastrem użyj: kubectl --context={{.profile_name}}", diff --git a/translations/ru.json b/translations/ru.json index 4cd6cb232d..6404047e54 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -303,6 +303,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "", @@ -688,6 +689,8 @@ "This will start the mount daemon and automatically mount files into minikube.": "", "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "", "To disable beta notices, run: 'minikube config set WantBetaUpdateNotification false'": "", diff --git a/translations/strings.txt b/translations/strings.txt index 6dcf250bdd..69bc1bf4fb 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -303,6 +303,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit networking is broken. Try disabling Internet Sharing: System Preference \u003e Sharing \u003e Internet Sharing. \nAlternatively, you can try upgrading to the latest hyperkit version, or using an alternate driver.": "", @@ -688,6 +689,8 @@ "This will start the mount daemon and automatically mount files into minikube.": "", "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.profile_name}}": "", "To disable beta notices, run: 'minikube config set WantBetaUpdateNotification false'": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index a2e0c872fe..b45f18d53c 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -405,6 +405,7 @@ "Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate": "", "Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/\nFor the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status": "", "Group ID: {{.groupID}}": "", + "Headlamp can display more detailed information when metrics-server is installed. To install it, run:\n\nminikube{{.profileArg}} addons enable metrics-server\t\n\n": "", "Hide the hypervisor signature from the guest in minikube (kvm2 driver only)": "向 minikube 中的访客隐藏管理程序签名(仅限 kvm2 驱动程序)", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver": "", "Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --vm-driver": "Hyperkit 已损坏。升级到最新的 hyperkit 版本以及/或者 Docker 桌面版。或者,你可以通过 --vm-driver 切换其他选项", @@ -847,6 +848,8 @@ "This {{.type}} is having trouble accessing https://{{.repository}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}}": "", "Tip: To remove this root owned cluster, run: sudo {{.cmd}} delete": "提示:要移除这个由根用户拥有的集群,请运行 sudo {{.cmd}} delete", + "To access Headlamp, use the following command:\nminikube service headlamp -n headlamp\n\n": "", + "To authenticate in Headlamp, fetch the Authentication Token using the following command:\n\nexport SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=\":metadata.name\" | grep \"headlamp-token\")\nkubectl get secret $SECRET --namespace headlamp --template=\\{\\{.data.token\\}\\} | base64 --decode\n\t\t\t\n": "", "To connect to this cluster, use: --context={{.name}}": "", "To connect to this cluster, use: kubectl --context={{.name}}": "如需连接到此集群,请使用 kubectl --context={{.name}}", "To connect to this cluster, use: kubectl --context={{.name}}__1": "如需连接到此集群,请使用 kubectl --context={{.name}}", From cd0b8adb5d15a6354532596dce6ae42ee8e56d00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 17:46:15 +0000 Subject: [PATCH 26/33] Bump k8s.io/kubectl from 0.24.1 to 0.24.2 Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.24.1 to 0.24.2. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.24.1...v0.24.2) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 31e8ea6cad..94bfa25d10 100644 --- a/go.mod +++ b/go.mod @@ -83,13 +83,13 @@ require ( google.golang.org/api v0.83.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.1 + k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 - k8s.io/client-go v0.24.1 + k8s.io/client-go v0.24.2 k8s.io/cluster-bootstrap v0.0.0 - k8s.io/component-base v0.24.1 + k8s.io/component-base v0.24.2 k8s.io/klog/v2 v2.60.1 - k8s.io/kubectl v0.24.1 + k8s.io/kubectl v0.24.2 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 libvirt.org/go/libvirt v1.8004.0 sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0 diff --git a/go.sum b/go.sum index d8759352a5..9ec1396a98 100644 --- a/go.sum +++ b/go.sum @@ -2218,35 +2218,34 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= -k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= +k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= +k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/apimachinery v0.19.1/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/cli-runtime v0.24.1/go.mod h1:14aVvCTqkA7dNXY51N/6hRY3GUjchyWDOwW84qmR3bs= +k8s.io/cli-runtime v0.24.2/go.mod h1:1LIhKL2RblkhfG4v5lZEt7FtgFG5mVb8wqv5lE9m5qY= k8s.io/client-go v0.19.1/go.mod h1:AZOIVSI9UUtQPeJD3zJFp15CEhSjRgAuQP5PWRJrCIQ= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= -k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= +k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= +k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/cluster-bootstrap v0.22.4 h1:2ZhV/1K4GiCrnmDHHbBnN3bERWn+Nxrtxmxp6uYYThI= k8s.io/cluster-bootstrap v0.22.4/go.mod h1:fTQZ6u9G6fg2LHhB8nEgZLnXIhCDSRYuLUUS5pgW8RY= -k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.24.1 h1:APv6W/YmfOWZfo+XJ1mZwep/f7g7Tpwvdbo9CQLDuts= -k8s.io/component-base v0.24.1/go.mod h1:DW5vQGYVCog8WYpNob3PMmmsY8A3L9QZNg4j/dV3s38= -k8s.io/component-helpers v0.24.1/go.mod h1:q5Z1pWV/QfX9ThuNeywxasiwkLw9KsR4Q9TAOdb/Y3s= +k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU= +k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= +k8s.io/component-helpers v0.24.2/go.mod h1:TRQPBQKfmqkmV6c0HAmUs8cXVNYYYLsXy4zu8eODi9g= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2267,10 +2266,10 @@ k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2R k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kubectl v0.24.1 h1:gxcjHrnwntV1c+G/BHWVv4Mtk8CQJ0WTraElLBG+ddk= -k8s.io/kubectl v0.24.1/go.mod h1:NzFqQ50B004fHYWOfhHTrAm4TY6oGF5FAAL13LEaeUI= +k8s.io/kubectl v0.24.2 h1:+RfQVhth8akUmIc2Ge8krMl/pt66V7210ka3RE/p0J4= +k8s.io/kubectl v0.24.2/go.mod h1:+HIFJc0bA6Tzu5O/YcuUt45APAxnNL8LeMuXwoiGsPg= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/metrics v0.24.1/go.mod h1:vMs5xpcOyY9D+/XVwlaw8oUHYCo6JTGBCZfyXOOkAhE= +k8s.io/metrics v0.24.2/go.mod h1:5NWURxZ6Lz5gj8TFU83+vdWIVASx7W8lwPpHYCqopMo= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From aba4bfaa50267e990ee067c5163b768e63e32737 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Tue, 21 Jun 2022 12:00:11 -0700 Subject: [PATCH 27/33] update gcp-auth-webhook to v0.0.9 --- pkg/minikube/assets/addons.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index c7ed128430..6b227b02d3 100755 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -552,7 +552,7 @@ var Addons = map[string]*Addon{ "0640"), }, false, "gcp-auth", "Google", "https://minikube.sigs.k8s.io/docs/handbook/addons/gcp-auth/", map[string]string{ "KubeWebhookCertgen": "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.0@sha256:f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068", - "GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.8@sha256:26c7b2454f1c946d7c80839251d939606620f37c2f275be2796c1ffd96c438f6", + "GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.9@sha256:25e1c616444d5b2b404c43ce878f320a265fd663b4fcd4c2ad5c12de316612da", }, map[string]string{ "GCPAuthWebhook": "gcr.io", }), From 7467c86613227ebbd0f77d2d48be679945736a0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 19:16:01 +0000 Subject: [PATCH 28/33] Bump github.com/spf13/cobra from 1.4.0 to 1.5.0 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 14 +++++++------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 31e8ea6cad..3bc4e81959 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.12 github.com/Delta456/box-cli-maker/v2 v2.2.2 github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 github.com/Microsoft/hcsshim v0.8.17 // indirect github.com/Parallels/docker-machine-parallels/v2 v2.0.1 github.com/VividCortex/godaemon v1.0.0 @@ -62,7 +62,7 @@ require ( github.com/russross/blackfriday v1.6.0 // indirect github.com/samalba/dockerclient v0.0.0-20160414174713-91d7393ff859 // indirect github.com/shirou/gopsutil/v3 v3.22.5 - github.com/spf13/cobra v1.4.0 + github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.12.0 github.com/zchee/go-vmnet v0.0.0-20161021174912-97ebf9174097 @@ -83,13 +83,13 @@ require ( google.golang.org/api v0.83.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.1 + k8s.io/api v0.24.2 k8s.io/apimachinery v0.24.2 - k8s.io/client-go v0.24.1 + k8s.io/client-go v0.24.2 k8s.io/cluster-bootstrap v0.0.0 - k8s.io/component-base v0.24.1 + k8s.io/component-base v0.24.2 k8s.io/klog/v2 v2.60.1 - k8s.io/kubectl v0.24.1 + k8s.io/kubectl v0.24.2 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 libvirt.org/go/libvirt v1.8004.0 sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0 @@ -112,7 +112,7 @@ require ( cloud.google.com/go/trace v1.2.0 // indirect git.sr.ht/~sbinet/gg v0.3.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect diff --git a/go.sum b/go.sum index d8759352a5..b164199c62 100644 --- a/go.sum +++ b/go.sum @@ -118,10 +118,10 @@ github.com/Delta456/box-cli-maker/v2 v2.2.2/go.mod h1:idItIMZeyx3bg73XwSgsLeZd+g github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 h1:rMamBsR6iCT9Y5m2Il6vFGJvY7FAgck4AoA/LobheKU= github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2/go.mod h1:BB1eHdMLYEFuFdBlRMb0N7YGVdM5s6Pt0njxgvfbGGs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1 h1:Tn/3pMqRSsI09jFVdGEuMqLIBNOmRHVqKp9DSQg4HPM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.1/go.mod h1:KddM1vG3MS+CRfmoFBqeUIICfd9nS8pLHKtwJ/kt0QQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1 h1:SixyMKTOWhEWISdA7PB7vOxkvOP8BIgW5uzbyIf0kXM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.1/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -1298,8 +1298,9 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -2218,35 +2219,34 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= -k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= +k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI= +k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/apimachinery v0.19.1/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/cli-runtime v0.24.1/go.mod h1:14aVvCTqkA7dNXY51N/6hRY3GUjchyWDOwW84qmR3bs= +k8s.io/cli-runtime v0.24.2/go.mod h1:1LIhKL2RblkhfG4v5lZEt7FtgFG5mVb8wqv5lE9m5qY= k8s.io/client-go v0.19.1/go.mod h1:AZOIVSI9UUtQPeJD3zJFp15CEhSjRgAuQP5PWRJrCIQ= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= -k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= +k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA= +k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/cluster-bootstrap v0.22.4 h1:2ZhV/1K4GiCrnmDHHbBnN3bERWn+Nxrtxmxp6uYYThI= k8s.io/cluster-bootstrap v0.22.4/go.mod h1:fTQZ6u9G6fg2LHhB8nEgZLnXIhCDSRYuLUUS5pgW8RY= -k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.24.1 h1:APv6W/YmfOWZfo+XJ1mZwep/f7g7Tpwvdbo9CQLDuts= -k8s.io/component-base v0.24.1/go.mod h1:DW5vQGYVCog8WYpNob3PMmmsY8A3L9QZNg4j/dV3s38= -k8s.io/component-helpers v0.24.1/go.mod h1:q5Z1pWV/QfX9ThuNeywxasiwkLw9KsR4Q9TAOdb/Y3s= +k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU= +k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= +k8s.io/component-helpers v0.24.2/go.mod h1:TRQPBQKfmqkmV6c0HAmUs8cXVNYYYLsXy4zu8eODi9g= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2267,10 +2267,10 @@ k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2R k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kubectl v0.24.1 h1:gxcjHrnwntV1c+G/BHWVv4Mtk8CQJ0WTraElLBG+ddk= -k8s.io/kubectl v0.24.1/go.mod h1:NzFqQ50B004fHYWOfhHTrAm4TY6oGF5FAAL13LEaeUI= +k8s.io/kubectl v0.24.2 h1:+RfQVhth8akUmIc2Ge8krMl/pt66V7210ka3RE/p0J4= +k8s.io/kubectl v0.24.2/go.mod h1:+HIFJc0bA6Tzu5O/YcuUt45APAxnNL8LeMuXwoiGsPg= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/metrics v0.24.1/go.mod h1:vMs5xpcOyY9D+/XVwlaw8oUHYCo6JTGBCZfyXOOkAhE= +k8s.io/metrics v0.24.2/go.mod h1:5NWURxZ6Lz5gj8TFU83+vdWIVASx7W8lwPpHYCqopMo= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 45df2bca9d2012edc25a4a1b5aea3d1515903c55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 19:16:47 +0000 Subject: [PATCH 29/33] Bump google.golang.org/api from 0.83.0 to 0.84.0 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.83.0 to 0.84.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.83.0...v0.84.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 7 ++++--- go.sum | 15 ++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index f47571217d..40a1907c89 100644 --- a/go.mod +++ b/go.mod @@ -76,11 +76,11 @@ require ( golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f - golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 + golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/text v0.3.7 gonum.org/v1/plot v0.11.0 - google.golang.org/api v0.83.0 + google.golang.org/api v0.84.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.2 @@ -155,6 +155,7 @@ require ( github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa // indirect github.com/googleapis/gax-go/v2 v2.4.0 // indirect github.com/googleapis/go-type-adapters v1.0.0 // indirect github.com/gookit/color v1.4.2 // indirect @@ -214,7 +215,7 @@ require ( golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac // indirect google.golang.org/grpc v1.47.0 // indirect diff --git a/go.sum b/go.sum index e9073704c0..a32e1b6cbf 100644 --- a/go.sum +++ b/go.sum @@ -705,6 +705,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa h1:7MYGT2XEMam7Mtzv1yDUYXANedWvwk3HKkR3MyGowy8= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1653,7 +1655,6 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= @@ -1801,8 +1802,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 h1:z8Hj/bl9cOV2grsOpEaQFUaly0JWN3i97mo3jXKJNp0= -golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d h1:Zu/JngovGLVi6t2J3nmAf3AoTDwuzw85YZ3b9o4yU7s= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1940,8 +1941,9 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= gonum.org/v1/plot v0.11.0 h1:z2ZkgNqW34d0oYUzd80RRlc0L9kWtenqK4kflZG1lGc= gonum.org/v1/plot v0.11.0/go.mod h1:fH9YnKnDKax0u5EzHVXvhN5HJwtMFWIOLNuhgUahbCQ= @@ -1988,8 +1990,8 @@ google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRR google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= -google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= +google.golang.org/api v0.84.0 h1:NMB9J4cCxs9xEm+1Z9QiO3eFvn7EnQj3Eo3hN6ugVlg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2093,7 +2095,6 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= From 2ee63b4b1e4dc15ee4938fc4d623f2e42bd9514b Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Tue, 21 Jun 2022 13:39:50 -0700 Subject: [PATCH 30/33] add a test for image pull secrets for gcp-auth --- test/integration/addons_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 9071afee10..6b3510ab39 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -29,6 +29,7 @@ import ( "os/exec" "path/filepath" "reflect" + "regexp" "strings" "testing" "time" @@ -606,6 +607,13 @@ func validateGCPAuthAddon(ctx context.Context, t *testing.T, profile string) { t.Fatalf("%s failed: %v", rr.Command(), err) } + serviceAccountName := "gcp-auth-test" + // create a dummy service account so we know the pull secret got added + rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "sa", serviceAccountName)) + if err != nil { + t.Fatalf("%s failed: %v", rr.Command(), err) + } + // 8 minutes, because 4 is not enough for images to pull in all cases. names, err := PodWait(ctx, t, profile, "default", "integration-test=busybox", Minutes(8)) if err != nil { @@ -624,6 +632,22 @@ func validateGCPAuthAddon(ctx context.Context, t *testing.T, profile string) { t.Errorf("'printenv GOOGLE_APPLICATION_CREDENTIALS' returned %s, expected %s", got, expected) } + // Now check the service account and make sure the "gcp-auth" image pull secret is present + rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "describe", "sa", serviceAccountName)) + if err != nil { + t.Fatalf("%s failed: %v", rr.Command(), err) + } + + expectedPullSecret := "gcp-auth" + re, err := regexp.Compile(`.*Image pull secrets:.*`) + if err != nil { + t.Errorf("Image pull secret not found in service account output: %v", err) + } + secrets := re.FindString(rr.Stdout.String()) + if !strings.Contains(secrets, expectedPullSecret) { + t.Errorf("Unexpected image pull secrets. expected %s, got %s", expectedPullSecret, secrets) + } + if !detect.IsOnGCE() || detect.IsCloudShell() { // Make sure the file contents are correct rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "exec", names[0], "--", "/bin/sh", "-c", "cat /google-app-creds.json")) From 4bc3d98bb641a14c09ba1e9ed0e72515b8ceec71 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Tue, 21 Jun 2022 13:53:02 -0700 Subject: [PATCH 31/33] use MustCompile for lint --- test/integration/addons_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 6b3510ab39..ca123a98ae 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -639,10 +639,7 @@ func validateGCPAuthAddon(ctx context.Context, t *testing.T, profile string) { } expectedPullSecret := "gcp-auth" - re, err := regexp.Compile(`.*Image pull secrets:.*`) - if err != nil { - t.Errorf("Image pull secret not found in service account output: %v", err) - } + re := regexp.MustCompile(`.*Image pull secrets:.*`) secrets := re.FindString(rr.Stdout.String()) if !strings.Contains(secrets, expectedPullSecret) { t.Errorf("Unexpected image pull secrets. expected %s, got %s", expectedPullSecret, secrets) From 77c805bcdd6170f51a51d40c92ded18f88d01bae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 22:23:09 +0000 Subject: [PATCH 32/33] Bump google.golang.org/api from 0.83.0 to 0.85.0 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.83.0 to 0.85.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.83.0...v0.85.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 12 ++++++------ go.sum | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index dd4148a20e..e65bb500f2 100644 --- a/go.mod +++ b/go.mod @@ -76,11 +76,11 @@ require ( golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f - golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d + golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/text v0.3.7 gonum.org/v1/plot v0.11.0 - google.golang.org/api v0.84.0 + google.golang.org/api v0.85.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.2 @@ -106,7 +106,7 @@ require ( require ( cloud.google.com/go v0.102.0 // indirect - cloud.google.com/go/compute v1.6.1 // indirect + cloud.google.com/go/compute v1.7.0 // indirect cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/monitoring v1.1.0 // indirect cloud.google.com/go/trace v1.2.0 // indirect @@ -155,7 +155,7 @@ require ( github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect github.com/googleapis/gax-go/v2 v2.4.0 // indirect github.com/googleapis/go-type-adapters v1.0.0 // indirect github.com/gookit/color v1.4.2 // indirect @@ -213,11 +213,11 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.19.0 // indirect golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect - golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac // indirect + google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index b3dd0a1812..9e3b85fb03 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,9 @@ cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTB cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -705,8 +706,9 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa h1:7MYGT2XEMam7Mtzv1yDUYXANedWvwk3HKkR3MyGowy8= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1632,8 +1634,9 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1803,8 +1806,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d h1:Zu/JngovGLVi6t2J3nmAf3AoTDwuzw85YZ3b9o4yU7s= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1991,8 +1995,9 @@ google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRR google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0 h1:NMB9J4cCxs9xEm+1Z9QiO3eFvn7EnQj3Eo3hN6ugVlg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2096,8 +2101,10 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= From 98377c37b0c1e73a8fc6af7739ed83e22e40669e Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 21 Jun 2022 15:44:26 -0700 Subject: [PATCH 33/33] automate updating yearly leaderboard --- .github/workflows/build.yml | 3 - .github/workflows/docs.yml | 1 - .github/workflows/functional_verified.yml | 2 - .github/workflows/leaderboard.yml | 1 - .github/workflows/master.yml | 8 -- .github/workflows/pr.yml | 8 -- .../workflows/time-to-k8s-public-chart.yml | 2 - .github/workflows/time-to-k8s.yml | 1 - .github/workflows/translations.yml | 1 - .github/workflows/update-golang-version.yml | 1 - .github/workflows/update-golint-version.yml | 1 - .github/workflows/update-gopogh-version.yml | 1 - .../workflows/update-gotestsum-version.yml | 1 - .github/workflows/update-kubadm-constants.yml | 1 - .github/workflows/yearly-leaderboard.yml | 47 ++++++++++++ Makefile | 4 + .../golang_version/update_golang_version.go | 5 ++ hack/update_contributions.sh | 6 +- hack/yearly-leaderboard.sh | 74 +++++++++++++++++++ 19 files changed, 133 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/yearly-leaderboard.yml create mode 100755 hack/yearly-leaderboard.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b56461286..d300bfafe8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Download Dependencies run: go mod download - name: Build Binaries @@ -51,7 +50,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update @@ -70,7 +68,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 85d3d6a898..96bd80c0f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,7 +19,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Generate Docs id: gendocs run: | diff --git a/.github/workflows/functional_verified.yml b/.github/workflows/functional_verified.yml index f22f34aa7d..71f364b502 100644 --- a/.github/workflows/functional_verified.yml +++ b/.github/workflows/functional_verified.yml @@ -38,7 +38,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Download Dependencies run: go mod download - name: Build Binaries @@ -118,7 +117,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 diff --git a/.github/workflows/leaderboard.yml b/.github/workflows/leaderboard.yml index 2c7652583b..53eedcd185 100644 --- a/.github/workflows/leaderboard.yml +++ b/.github/workflows/leaderboard.yml @@ -20,7 +20,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Update Leaderboard id: leaderboard run: | diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 97ebe97cbe..f892eaaf1d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -28,7 +28,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Download Dependencies run: go mod download - name: Build Binaries @@ -55,7 +54,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update @@ -74,7 +72,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update @@ -122,7 +119,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash @@ -222,7 +218,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash @@ -326,7 +321,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash run: | @@ -412,7 +406,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash @@ -522,7 +515,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4c38b5aeb7..5cebd39069 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -26,7 +26,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Download Dependencies run: go mod download - name: Build Binaries @@ -53,7 +52,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update @@ -72,7 +70,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update @@ -120,7 +117,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash run: | @@ -220,7 +216,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash @@ -325,7 +320,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash run: | @@ -412,7 +406,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash @@ -523,7 +516,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install gopogh shell: bash diff --git a/.github/workflows/time-to-k8s-public-chart.yml b/.github/workflows/time-to-k8s-public-chart.yml index 6947cf76db..d6861b7bba 100644 --- a/.github/workflows/time-to-k8s-public-chart.yml +++ b/.github/workflows/time-to-k8s-public-chart.yml @@ -23,7 +23,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Benchmark time-to-k8s for Docker driver with Docker runtime run: | ./hack/benchmark/time-to-k8s/public-chart/public-chart.sh docker docker @@ -48,7 +47,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Disable firewall run: | sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off diff --git a/.github/workflows/time-to-k8s.yml b/.github/workflows/time-to-k8s.yml index e50ebea6ab..331bb6ee79 100644 --- a/.github/workflows/time-to-k8s.yml +++ b/.github/workflows/time-to-k8s.yml @@ -19,7 +19,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: time-to-k8s Benchmark id: timeToK8sBenchmark run: | diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 4fd24629f7..1566bc8641 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Install libvirt run: | sudo apt-get update diff --git a/.github/workflows/update-golang-version.yml b/.github/workflows/update-golang-version.yml index 14108420e0..0ad5234b23 100644 --- a/.github/workflows/update-golang-version.yml +++ b/.github/workflows/update-golang-version.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Bump Golang Versions id: bumpGolang run: | diff --git a/.github/workflows/update-golint-version.yml b/.github/workflows/update-golint-version.yml index 54a43fe690..fddc0a1844 100644 --- a/.github/workflows/update-golint-version.yml +++ b/.github/workflows/update-golint-version.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Bump Golint Versions id: bumpGolint run: | diff --git a/.github/workflows/update-gopogh-version.yml b/.github/workflows/update-gopogh-version.yml index 154412e028..16ff8995f4 100644 --- a/.github/workflows/update-gopogh-version.yml +++ b/.github/workflows/update-gopogh-version.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Bump gopogh Versions id: bumpGopogh run: | diff --git a/.github/workflows/update-gotestsum-version.yml b/.github/workflows/update-gotestsum-version.yml index f2bfd7dd0d..e46292170f 100644 --- a/.github/workflows/update-gotestsum-version.yml +++ b/.github/workflows/update-gotestsum-version.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Bump Gotestsum Versions id: bumpGotestsum run: | diff --git a/.github/workflows/update-kubadm-constants.yml b/.github/workflows/update-kubadm-constants.yml index f2b4bd8c77..40227e1111 100644 --- a/.github/workflows/update-kubadm-constants.yml +++ b/.github/workflows/update-kubadm-constants.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 with: go-version: ${{env.GO_VERSION}} - stable: true - name: Bump Kubeadm Constants for Kubernetes Images id: bumpKubAdmConsts run: | diff --git a/.github/workflows/yearly-leaderboard.yml b/.github/workflows/yearly-leaderboard.yml new file mode 100644 index 0000000000..3402d493da --- /dev/null +++ b/.github/workflows/yearly-leaderboard.yml @@ -0,0 +1,47 @@ +name: "update-yearly-leaderboard" +on: + workflow_dispatch: + schedule: + # The 2nd of every month + - cron: "0 0 2 * *" +env: + GOPROXY: https://proxy.golang.org + GO_VERSION: '1.18.3' +permissions: + contents: read + +jobs: + update-yearly-leaderboard: + if: github.repository == 'kubernetes/minikube' + runs-on: ubuntu-20.04 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: 'us-west-1' + steps: + - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 + - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 + with: + go-version: ${{env.GO_VERSION}} + - name: Update Yearly Leaderboard + id: yearly-leaderboard + run: | + make update-yearly-leaderboard + env: + GITHUB_TOKEN: ${{ secrets.MINIKUBE_BOT_PAT }} + - name: Create PR + if: ${{ steps.leaderboard.outputs.changes != '' }} + uses: peter-evans/create-pull-request@923ad837f191474af6b1721408744feb989a4c27 + with: + token: ${{ secrets.MINIKUBE_BOT_PAT }} + commit-message: Update yearly leaderboard + committer: minikube-bot + author: minikube-bot + branch: yearly-leaderboard + push-to-fork: minikube-bot/minikube + base: master + delete-branch: true + title: 'Update Yearly Leaderboard' + body: | + Committing changes resulting from `make update-yearly-leaderboard`. + This PR is auto-generated by the [update-yearly-leaderboard](https://github.com/kubernetes/minikube/blob/master/.github/workflows/yearly-leaderboard.yml) CI workflow. diff --git a/Makefile b/Makefile index 8896c1a836..3398ac6910 100644 --- a/Makefile +++ b/Makefile @@ -813,6 +813,10 @@ release-notes: update-leaderboard: hack/update_contributions.sh +.PHONY: update-yearly-leaderboard +update-yearly-leaderboard: + hack/yearly-leaderboard.sh + out/docker-machine-driver-kvm2: out/docker-machine-driver-kvm2-$(GOARCH) $(if $(quiet),@echo " CP $@") $(Q)cp $< $@ diff --git a/hack/update/golang_version/update_golang_version.go b/hack/update/golang_version/update_golang_version.go index c315cc40ec..f29de3aa21 100644 --- a/hack/update/golang_version/update_golang_version.go +++ b/hack/update/golang_version/update_golang_version.go @@ -58,6 +58,11 @@ var ( `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`, }, }, + ".github/workflows/yearly-leaderboard.yml": { + Replace: map[string]string{ + `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`, + }, + }, ".github/workflows/translations.yml": { Replace: map[string]string{ `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`, diff --git a/hack/update_contributions.sh b/hack/update_contributions.sh index 9d0118643f..08060e4b4f 100755 --- a/hack/update_contributions.sh +++ b/hack/update_contributions.sh @@ -70,7 +70,7 @@ while read -r tag_index tag_name tag_start tag_end; do echo "Generating leaderboard for" "$tag_name" "(from $tag_start to $tag_end)" # Print header for page. printf -- "---\ntitle: \"$tag_name - $tag_end\"\nlinkTitle: \"$tag_name - $tag_end\"\nweight: $tag_index\n---\n" > "$destination/$tag_name.html" - # Add pullsheet content (deleting the lines consisting of the command used to generate it). - $DIR/pullsheet leaderboard --token-path "$TMP_TOKEN" --repos kubernetes/minikube --since "$tag_start" --until "$tag_end" --logtostderr=false --stderrthreshold=2 \ - | sed -r -e "/Command\-line/,/pullsheet/d" >> "$destination/$tag_name.html" + # Add pullsheet content + $DIR/pullsheet leaderboard --token-path "$TMP_TOKEN" --repos kubernetes/minikube --since "$tag_start" --until "$tag_end" --hide-command --logtostderr=false --stderrthreshold=2 \ + >> "$destination/$tag_name.html" done <<< "$tags_with_range" diff --git a/hack/yearly-leaderboard.sh b/hack/yearly-leaderboard.sh new file mode 100755 index 0000000000..35943de750 --- /dev/null +++ b/hack/yearly-leaderboard.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Copyright 2022 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. + +set -eu -o pipefail + +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +DESTINATION="$DIR/../site/content/en/docs/contrib/leaderboard" +TMP_TOKEN=$(mktemp) +BUCKET="s3://minikube-leaderboard" +YEAR=$(date +"%Y" --date "last month") +MONTH=$(date +"%m" --date "last month") +DAYS_IN_MONTH=$(cal $(date +"%m %Y" --date "last month") | awk 'NF {DAYS = $NF}; END {print DAYS}') + +install_pullsheet() { + echo >&2 'Installing pullsheet' + go install github.com/google/pullsheet@latest +} + +verify_gh_auth() { + gh auth status -t 2>&1 | sed -n -r 's/^.*Token: ([a-zA-Z0-9_]*)/\1/p' > "$TMP_TOKEN" + if [ ! -s "$TMP_TOKEN" ]; then + echo "Failed to acquire token from 'gh auth'. Ensure 'gh' is authenticated." 1>&2 + exit 1 + fi +} + +# Ensure the token is deleted when the script exits, so the token is not leaked. +cleanup_token() { + rm -f "$TMP_TOKEN" +} + +copy() { + aws s3 cp "$1" "$2" +} + +generate_leaderboard() { + echo "Generating leaderboard for" "$YEAR" + # Print header for page + printf -- "---\ntitle: \"$YEAR\"\nlinkTitle: \"$YEAR\"\nweight: -9999$YEAR\n---\n" > "$DESTINATION/$YEAR.html" + # Add pullsheet content + pullsheet leaderboard --token-path "$TMP_TOKEN" --repos kubernetes/minikube --since-display "$YEAR-01-01" --since "$YEAR-$MONTH-01" --until "$YEAR-$MONTH-$DAYS_IN_MONTH" --json-files "./$YEAR.json" --json-output "./$YEAR.json" --hide-command --logtostderr=false --stderrthreshold=2 >> "$DESTINATION/$YEAR.html" +} + +cleanup() { + rm "$YEAR.json" +} + +install_pullsheet + +verify_gh_auth + +trap cleanup_token EXIT + +copy "$BUCKET/$YEAR.json" "$YEAR.json" || printf -- "{}" > "$YEAR.json" + +generate_leaderboard + +copy "$YEAR.json" "$BUCKET/$YEAR.json" +copy "$YEAR.json" "$BUCKET/$YEAR-$MONTH.json" + +cleanup