Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logviewer addon update:containerd log format support and some bugfixes #19546

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,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:v1@sha256:e4a607c159c8c28a9c21dec0c1fc90e0165309c272f40b16c5d4088954cd17a9",
}, map[string]string{
"LogViewer": "docker.io",
}),
Expand Down
13 changes: 12 additions & 1 deletion test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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", "--addons=amd-gpu-device-plugin"}, 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", "--addons=amd-gpu-device-plugin"}, StartArgs()...)
if !NoneDriver() {
args = append(args, "--addons=ingress", "--addons=ingress-dns", "--addons=storage-provisioner-rancher")
}
Expand Down Expand Up @@ -142,6 +142,7 @@ func TestAddons(t *testing.T) {
{"Registry", validateRegistryAddon},
{"Ingress", validateIngressAddon},
{"InspektorGadget", validateInspektorGadgetAddon},
{"Logviewer", validateLogviewerAddon},
{"MetricsServer", validateMetricsServerAddon},
{"Olm", validateOlmAddon},
{"CSI", validateCSIDriverAndSnapshots},
Expand Down Expand Up @@ -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, "kube-system", "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)
Expand Down