From 5b896311dbd8a9a686bd315ea57bfe493deac3ae Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:18:13 -0700 Subject: [PATCH 1/6] logviewer-addon-update-pr2-update-docker-image-tag --- 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 db7294252024..870f2c645621 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -505,7 +505,7 @@ var Addons = map[string]*Addon{ "logviewer-rbac.yaml", "0640"), }, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{ - "LogViewer": "ivans3/minikube-log-viewer:latest@sha256:75854f45305cc47d17b04c6c588fa60777391761f951e3a34161ddf1f1b06405", + "LogViewer": "ivans3/minikube-log-viewer:latest@sha256:58879ce5f32d91f4e4624114425eb6ed72f52e54bee26c5d9cee90fbebf3f045", }, map[string]string{ "LogViewer": "docker.io", }), From 1bf26d5c6d490c9bfbdc2c2bd06a2ed66d1dc96f Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:47:22 -0700 Subject: [PATCH 2/6] comments from PR: change tag name to v1 --- 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 effb9b9f4f8e..f24170283c34 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -505,7 +505,7 @@ var Addons = map[string]*Addon{ "logviewer-rbac.yaml", "0640"), }, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{ - "LogViewer": "ivans3/minikube-log-viewer:latest@sha256:58879ce5f32d91f4e4624114425eb6ed72f52e54bee26c5d9cee90fbebf3f045", + "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:56a24469168e9481807004955c29d199590e4e8ca3ce361c0d65ccdd30a4f01b", }, map[string]string{ "LogViewer": "docker.io", }), From 96475cd48353af3501f68403fd983d621a399de5 Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:32:26 -0700 Subject: [PATCH 3/6] feedback from PR: address critical CVEs --- 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 62435b78c601..6798352b2a70 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -506,7 +506,7 @@ var Addons = map[string]*Addon{ "logviewer-rbac.yaml", "0640"), }, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{ - "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:56a24469168e9481807004955c29d199590e4e8ca3ce361c0d65ccdd30a4f01b", + "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:f31dd1b9c2c976b9b7507d8986e805829046cf6236c1096db7beda881e994078", }, map[string]string{ "LogViewer": "docker.io", }), From 1abb706899b836905faf6c5e01bc94d38f42c64f Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:30:50 -0700 Subject: [PATCH 4/6] feedback from PR: address critical CVEs - try 2 --- 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 6798352b2a70..a15f9e0c2475 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -506,7 +506,7 @@ var Addons = map[string]*Addon{ "logviewer-rbac.yaml", "0640"), }, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{ - "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:f31dd1b9c2c976b9b7507d8986e805829046cf6236c1096db7beda881e994078", + "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:166ec61daae88309fbc958507dfdb17b9c2a576c4b0dbc0c4c6354c7ef31b8d4", }, map[string]string{ "LogViewer": "docker.io", }), From 6d300edd4f7c19fec0baf3ede6354901609a4223 Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:59:45 -0700 Subject: [PATCH 5/6] add unit test and multi-arch (amd64 and arm64 platforms...) --- pkg/minikube/assets/addons.go | 2 +- test/integration/addons_test.go | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index a15f9e0c2475..55b40e300feb 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -506,7 +506,7 @@ var Addons = map[string]*Addon{ "logviewer-rbac.yaml", "0640"), }, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{ - "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:166ec61daae88309fbc958507dfdb17b9c2a576c4b0dbc0c4c6354c7ef31b8d4", + "LogViewer": "ivans3/minikube-log-viewer:v1@sha256:e4a607c159c8c28a9c21dec0c1fc90e0165309c272f40b16c5d4088954cd17a9", }, map[string]string{ "LogViewer": "docker.io", }), diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index 759a15d61be4..fa5b6732f1e1 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -100,7 +100,7 @@ func TestAddons(t *testing.T) { // so we override that here to let minikube auto-detect appropriate cgroup driver os.Setenv(constants.MinikubeForceSystemdEnv, "") - args := append([]string{"start", "-p", profile, "--wait=true", "--memory=4000", "--alsologtostderr", "--addons=registry", "--addons=metrics-server", "--addons=volumesnapshots", "--addons=csi-hostpath-driver", "--addons=gcp-auth", "--addons=cloud-spanner", "--addons=inspektor-gadget", "--addons=nvidia-device-plugin", "--addons=yakd", "--addons=volcano"}, StartArgs()...) + args := append([]string{"start", "-p", profile, "--wait=true", "--memory=4000", "--alsologtostderr", "--addons=registry", "--addons=metrics-server", "--addons=volumesnapshots", "--addons=csi-hostpath-driver", "--addons=gcp-auth", "--addons=cloud-spanner", "--addons=inspektor-gadget", "--addons=logviewer", "--addons=nvidia-device-plugin", "--addons=yakd", "--addons=volcano"}, StartArgs()...) if !NoneDriver() { args = append(args, "--addons=ingress", "--addons=ingress-dns", "--addons=storage-provisioner-rancher") } @@ -144,6 +144,7 @@ func TestAddons(t *testing.T) { {"Registry", validateRegistryAddon}, {"Ingress", validateIngressAddon}, {"InspektorGadget", validateInspektorGadgetAddon}, + {"Logviewer", validateLogviewerAddon}, {"MetricsServer", validateMetricsServerAddon}, {"Olm", validateOlmAddon}, {"CSI", validateCSIDriverAndSnapshots}, @@ -760,6 +761,16 @@ func validateInspektorGadgetAddon(ctx context.Context, t *testing.T, profile str } } +// validateLogviewerAddon tests the log-viewer addon by ensuring the pod has come up and addon disables +func validateLogviewerAddon(ctx context.Context, t *testing.T, profile string) { + defer disableAddon(t, "logviewer", profile) + defer PostMortemLogs(t, profile) + + if _, err := PodWait(ctx, t, profile, "logviewer", "app=logviewer", Minutes(8)); err != nil { + t.Fatalf("failed waiting for logviewer pod: %v", err) + } +} + // validateCloudSpannerAddon tests the cloud-spanner addon by ensuring the deployment and pod come up and addon disables func validateCloudSpannerAddon(ctx context.Context, t *testing.T, profile string) { defer disableAddon(t, "cloud-spanner", profile) From 9c905d7ddc6fcb24a41b70e16c9a4a5dd3740602 Mon Sep 17 00:00:00 2001 From: ivans3 <37845520+ivans3@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:23:52 -0700 Subject: [PATCH 6/6] try to fix failing test --- test/integration/addons_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index fa5b6732f1e1..ae8a8681de06 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -766,7 +766,7 @@ func validateLogviewerAddon(ctx context.Context, t *testing.T, profile string) { defer disableAddon(t, "logviewer", profile) defer PostMortemLogs(t, profile) - if _, err := PodWait(ctx, t, profile, "logviewer", "app=logviewer", Minutes(8)); err != nil { + if _, err := PodWait(ctx, t, profile, "kube-system", "app=logviewer", Minutes(8)); err != nil { t.Fatalf("failed waiting for logviewer pod: %v", err) } }