Skip to content

Conversation

@kartikjoshi21
Copy link
Contributor

@kartikjoshi21 kartikjoshi21 commented Oct 13, 2025

minikube: Add integration test for metallb addon

For logs please refer to this comment #21736 (comment)

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kartikjoshi21
Once this PR has been reviewed and has the lgtm label, please assign prezha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from nirs and prezha October 13, 2025 10:22
@k8s-ci-robot
Copy link
Contributor

Hi @kartikjoshi21. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 13, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@kartikjoshi21 kartikjoshi21 force-pushed the kartikjoshi21/metallb-int-test branch from 6211aec to 4981db4 Compare November 6, 2025 07:55
@kartikjoshi21 kartikjoshi21 marked this pull request as ready for review November 6, 2025 07:56
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 6, 2025
@kartikjoshi21
Copy link
Contributor Author

Test Results on Windows + hyperv setup

PS C:\Users\kartikjoshi\headlamp-desktop\minikube> $env:MINIKUBE_START_HOST_TIMEOUT="10m"
>> $isoUrl = "https://storage.googleapis.com/minikube/iso/minikube-v1.37.0-amd64.iso"                                                               >>                                                                                                                                                  >> go test -v ./test/integration `                                                                                                                  >>   -tags=integration `                                                                                                                            >>   -run "^TestAddons($|/(Setup|parallel/MetalLB)$)" `                                                                                             >>   -count=1 -parallel=1 -timeout 60m `
>>   -args -minikube-start-args="--driver=hyperv --hyperv-virtual-switch=MinikubeExternalSwitch  --memory=3072 --iso-url $isoUrl"
>>
--test-parallel=1 was set via flags (system has 8 cores)
=== RUN   TestAddons
=== RUN   TestAddons/PreSetup
=== RUN   TestAddons/PreSetup/EnablingAddonOnNonExistingCluster
=== PAUSE TestAddons/PreSetup/EnablingAddonOnNonExistingCluster
=== RUN   TestAddons/PreSetup/DisablingAddonOnNonExistingCluster
=== PAUSE TestAddons/PreSetup/DisablingAddonOnNonExistingCluster
=== CONT  TestAddons/PreSetup/EnablingAddonOnNonExistingCluster
    addons_test.go:1284: (dbg) Run:  out/minikube addons enable dashboard -p addons-575900
    addons_test.go:1284: (dbg) Non-zero exit: out/minikube addons enable dashboard -p addons-575900: exit status 85 (3.3602322s)

        -- stdout --
                * Profile "addons-575900" not found. Run "minikube profile list" to view all profiles.
                  To start a cluster, run: "minikube start -p addons-575900"

        -- /stdout --
=== CONT  TestAddons/PreSetup/DisablingAddonOnNonExistingCluster
    addons_test.go:1295: (dbg) Run:  out/minikube addons disable dashboard -p addons-575900
    addons_test.go:1295: (dbg) Non-zero exit: out/minikube addons disable dashboard -p addons-575900: exit status 85 (197.6731ms)

        -- stdout --
                * Profile "addons-575900" not found. Run "minikube profile list" to view all profiles.
                  To start a cluster, run: "minikube start -p addons-575900"

        -- /stdout --
=== RUN   TestAddons/Setup
    addons_test.go:109: (dbg) Run:  out/minikube start -p addons-575900 --wait=true --memory=4096 --alsologtostderr --addons=registry --addons=registry-creds --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 --driver=hyperv --hyperv-virtual-switch=MinikubeExternalSwitch  --memory=3072 --iso-url https://storage.googleapis.com/minikube/iso/minikube-v1.37.0-amd64.iso --addons=ingress --addons=ingress-dns --addons=storage-provisioner-rancher
    addons_test.go:109: (dbg) Done: out/minikube start -p addons-575900 --wait=true --memory=4096 --alsologtostderr --addons=registry --addons=registry-creds --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 --driver=hyperv --hyperv-virtual-switch=MinikubeExternalSwitch  --memory=3072 --iso-url https://storage.googleapis.com/minikube/iso/minikube-v1.37.0-amd64.iso --addons=ingress --addons=ingress-dns --addons=storage-provisioner-rancher: (10m9.8555262s)
=== RUN   TestAddons/serial
=== RUN   TestAddons/serial/Volcano
    addons_test.go:1160: volcano-admission stabilized in 434.0543ms
    addons_test.go:1168: volcano-controller stabilized in 436.5989ms
    addons_test.go:1152: volcano-scheduler stabilized in 440.2133ms
    addons_test.go:1174: (dbg) TestAddons/serial/Volcano: waiting 6m0s for pods matching "app=volcano-scheduler" in namespace "volcano-system" ...
    helpers_test.go:352: "volcano-scheduler-76c996c8bf-h2xzh" [3647b799-f5c5-4649-b107-7c15662f31b3] Pending / Ready:ContainersNotReady (containers with unready status: [volcano-scheduler]) / ContainersReady:ContainersNotReady (containers with unready status: [volcano-scheduler])
    helpers_test.go:352: "volcano-scheduler-76c996c8bf-h2xzh" [3647b799-f5c5-4649-b107-7c15662f31b3] Running
    addons_test.go:1174: (dbg) TestAddons/serial/Volcano: app=volcano-scheduler healthy within 38.0066269s
    addons_test.go:1178: (dbg) TestAddons/serial/Volcano: waiting 6m0s for pods matching "app=volcano-admission" in namespace "volcano-system" ...
    helpers_test.go:352: "volcano-admission-6c447bd768-v9wpp" [3557cc3a-bd0d-4e62-83de-022fe0e4fbc3] Pending / Ready:ContainersNotReady (containers with unready status: [admission]) / ContainersReady:ContainersNotReady (containers with unready status: [admission])
    helpers_test.go:352: "volcano-admission-6c447bd768-v9wpp" [3557cc3a-bd0d-4e62-83de-022fe0e4fbc3] Running
    addons_test.go:1178: (dbg) TestAddons/serial/Volcano: app=volcano-admission healthy within 1m0.0088503s
    addons_test.go:1182: (dbg) TestAddons/serial/Volcano: waiting 6m0s for pods matching "app=volcano-controller" in namespace "volcano-system" ...
    helpers_test.go:352: "volcano-controllers-6fd4f85cb8-5k9cj" [8a5934c7-c260-4ee8-add6-f4a10bbb2197] Running
    addons_test.go:1182: (dbg) TestAddons/serial/Volcano: app=volcano-controller healthy within 6.0031576s
    addons_test.go:1187: (dbg) Run:  kubectl --context addons-575900 delete -n volcano-system job volcano-admission-init
    addons_test.go:1187: (dbg) Done: kubectl --context addons-575900 delete -n volcano-system job volcano-admission-init: (1.0103726s)
    addons_test.go:1193: (dbg) Run:  kubectl --context addons-575900 create -f testdata\vcjob.yaml
    addons_test.go:1201: (dbg) Run:  kubectl --context addons-575900 get vcjob -n my-volcano
    addons_test.go:1219: (dbg) TestAddons/serial/Volcano: waiting 3m0s for pods matching "volcano.sh/job-name=test-job" in namespace "my-volcano" ...
    helpers_test.go:352: "test-job-nginx-0" [17248de1-4a6e-4276-b6ae-e16344092545] Pending
    helpers_test.go:352: "test-job-nginx-0" [17248de1-4a6e-4276-b6ae-e16344092545] Pending / Ready:ContainersNotReady (containers with unready status: [nginx]) / ContainersReady:ContainersNotReady (containers with unready status: [nginx])
    helpers_test.go:352: "test-job-nginx-0" [17248de1-4a6e-4276-b6ae-e16344092545] Running
    addons_test.go:1219: (dbg) TestAddons/serial/Volcano: volcano.sh/job-name=test-job healthy within 47.0061643s
    addons_test.go:1337: (dbg) Run:  out/minikube -p addons-575900 addons disable volcano --alsologtostderr -v=1
    addons_test.go:1337: (dbg) Done: out/minikube -p addons-575900 addons disable volcano --alsologtostderr -v=1: (45.5450203s)
=== RUN   TestAddons/serial/GCPAuth
=== RUN   TestAddons/serial/GCPAuth/Namespaces
    addons_test.go:914: (dbg) Run:  kubectl --context addons-575900 create ns new-namespace
    addons_test.go:928: (dbg) Run:  kubectl --context addons-575900 get secret gcp-auth -n new-namespace
=== RUN   TestAddons/serial/GCPAuth/FakeCredentials
    addons_test.go:959: (dbg) Run:  kubectl --context addons-575900 create -f testdata\busybox.yaml
    addons_test.go:966: (dbg) Run:  kubectl --context addons-575900 create sa gcp-auth-test
    addons_test.go:972: (dbg) TestAddons/serial/GCPAuth/FakeCredentials: waiting 8m0s for pods matching "integration-test=busybox" in namespace "default" ...
    helpers_test.go:352: "busybox" [15526781-81ee-4372-a105-7d790bf83f07] Pending / Ready:ContainersNotReady (containers with unready status: [busybox]) / ContainersReady:ContainersNotReady (containers with unready status: [busybox])
    helpers_test.go:352: "busybox" [15526781-81ee-4372-a105-7d790bf83f07] Running
    addons_test.go:972: (dbg) TestAddons/serial/GCPAuth/FakeCredentials: integration-test=busybox healthy within 13.0097001s
    addons_test.go:978: (dbg) Run:  kubectl --context addons-575900 exec busybox -- /bin/sh -c "printenv GOOGLE_APPLICATION_CREDENTIALS"
    addons_test.go:990: (dbg) Run:  kubectl --context addons-575900 describe sa gcp-auth-test
    addons_test.go:1004: (dbg) Run:  kubectl --context addons-575900 exec busybox -- /bin/sh -c "cat /google-app-creds.json"
    addons_test.go:1028: (dbg) Run:  kubectl --context addons-575900 exec busybox -- /bin/sh -c "printenv GOOGLE_CLOUD_PROJECT"
=== RUN   TestAddons/serial/GCPAuth/RealCredentials
    addons_test.go:1043: This test requires a GCE instance (excluding Cloud Shell) with a container based driver
=== NAME  TestAddons/serial/GCPAuth
    addons_test.go:1337: (dbg) Run:  out/minikube -p addons-575900 addons disable gcp-auth --alsologtostderr -v=1                                       addons_test.go:1337: (dbg) Done: out/minikube -p addons-575900 addons disable gcp-auth --alsologtostderr -v=1: (10.4569148s)                    === RUN   TestAddons/parallel                                                                                                                       === RUN   TestAddons/parallel/MetalLB                                                                                                               === PAUSE TestAddons/parallel/MetalLB                                                                                                               === CONT  TestAddons/parallel/MetalLB
    addons_test.go:321: Running MetalLB e2e
    addons_test.go:338: (dbg) Run:  out/minikube --alsologtostderr -v=1 addons enable metallb -p addons-575900
    addons_test.go:338: (dbg) Done: out/minikube --alsologtostderr -v=1 addons enable metallb -p addons-575900: (23.6242406s)
    addons_test.go:226: configuring metallb address pool
    addons_test.go:229: (dbg) Run:  kubectl --context addons-575900 api-resources --api-group=metallb.io -o name
    addons_test.go:205: (dbg) Run:  kubectl --context addons-575900 -n metallb-system get cm config -o jsonpath={.data.config}
    addons_test.go:240: (dbg) Run:  out/minikube -p addons-575900 ssh "ip -4 -o addr show dev eth0 | awk '{print $4}'"
    addons_test.go:240: (dbg) Done: out/minikube -p addons-575900 ssh "ip -4 -o addr show dev eth0 | awk '{print $4}'": (12.0379348s)
    addons_test.go:309: (dbg) Run:  kubectl --context addons-575900 apply -f -
    addons_test.go:358: (dbg) Run:  kubectl --context addons-575900 -n metallb-system rollout status ds/speaker --timeout=180s
    addons_test.go:358: (dbg) Done: kubectl --context addons-575900 -n metallb-system rollout status ds/speaker --timeout=180s: (2.3328954s)
    addons_test.go:362: metallb controller stabilized in 2.3450051s
    addons_test.go:366: (dbg) Run:  kubectl --context addons-575900 run mlb-http --image=gcr.io/k8s-minikube/busybox --labels app=mlb-http --restart=Never --command -- sh -c "set -eu; mkdir -p /www; echo ok >/www/index.html; exec httpd -f -p 80 -h /www"
    addons_test.go:378: (dbg) TestAddons/parallel/MetalLB: waiting 6m0s for pods matching "app=mlb-http" in namespace "default" ...
    helpers_test.go:352: "mlb-http" [691b413b-0525-4273-98e3-01ab015bfbf9] Pending
    helpers_test.go:352: "mlb-http" [691b413b-0525-4273-98e3-01ab015bfbf9] Pending / Ready:ContainersNotReady (containers with unready status: [mlb-http]) / ContainersReady:ContainersNotReady (containers with unready status: [mlb-http])
    helpers_test.go:352: "mlb-http" [691b413b-0525-4273-98e3-01ab015bfbf9] Running
    addons_test.go:378: (dbg) TestAddons/parallel/MetalLB: app=mlb-http healthy within 23.0132267s
    addons_test.go:383: (dbg) Run:  kubectl --context addons-575900 expose pod mlb-http --name mlb-http-lb --type LoadBalancer --port 80 --target-port 80
    addons_test.go:400: (dbg) Run:  kubectl --context addons-575900 -n default get endpoints mlb-http-lb -o jsonpath={.subsets[0].addresses[0].ip}
    addons_test.go:419: (dbg) Run:  kubectl --context addons-575900 -n default get svc mlb-http-lb -o jsonpath={.status.loadBalancer.ingress[0].ip}
    addons_test.go:453: mlb-http-lb external IP: 192.168.29.223
2025/11/06 12:58:06 [DEBUG] GET http://192.168.29.223
    addons_test.go:1337: (dbg) Run:  out/minikube -p addons-575900 addons disable metallb --alsologtostderr -v=1
    addons_test.go:1337: (dbg) Done: out/minikube -p addons-575900 addons disable metallb --alsologtostderr -v=1: (29.0570283s)
    addons_test.go:394: (dbg) Run:  kubectl --context addons-575900 delete svc mlb-http-lb --now
    addons_test.go:395: (dbg) Run:  kubectl --context addons-575900 delete pod mlb-http --now
    addons_test.go:395: (dbg) Done: kubectl --context addons-575900 delete pod mlb-http --now: (2.6391893s)
=== RUN   TestAddons/StoppedEnableDisable
    addons_test.go:161: (dbg) Run:  out/minikube stop -p addons-575900
    addons_test.go:161: (dbg) Done: out/minikube stop -p addons-575900: (44.4458247s)
    addons_test.go:165: (dbg) Run:  out/minikube addons enable dashboard -p addons-575900
    addons_test.go:165: (dbg) Done: out/minikube addons enable dashboard -p addons-575900: (7.9503367s)
    addons_test.go:169: (dbg) Run:  out/minikube addons disable dashboard -p addons-575900
    addons_test.go:169: (dbg) Done: out/minikube addons disable dashboard -p addons-575900: (8.9428575s)
    addons_test.go:174: (dbg) Run:  out/minikube addons disable gvisor -p addons-575900
    addons_test.go:174: (dbg) Done: out/minikube addons disable gvisor -p addons-575900: (6.2010837s)
=== NAME  TestAddons
    helpers_test.go:175: Cleaning up "addons-575900" profile ...
    helpers_test.go:178: (dbg) Run:  out/minikube delete -p addons-575900
    helpers_test.go:178: (dbg) Done: out/minikube delete -p addons-575900: (13.8412516s)
--- PASS: TestAddons (1021.22s)
    --- PASS: TestAddons/PreSetup (0.00s)
        --- PASS: TestAddons/PreSetup/EnablingAddonOnNonExistingCluster (3.36s)
        --- PASS: TestAddons/PreSetup/DisablingAddonOnNonExistingCluster (0.20s)
    --- PASS: TestAddons/Setup (610.21s)
    --- PASS: TestAddons/serial (228.33s)
        --- PASS: TestAddons/serial/Volcano (201.17s)
        --- PASS: TestAddons/serial/GCPAuth (27.16s)
            --- PASS: TestAddons/serial/GCPAuth/Namespaces (1.27s)
            --- PASS: TestAddons/serial/GCPAuth/FakeCredentials (15.43s)
            --- SKIP: TestAddons/serial/GCPAuth/RealCredentials (0.00s)
    --- PASS: TestAddons/parallel (0.00s)
        --- PASS: TestAddons/parallel/MetalLB (97.75s)
    --- PASS: TestAddons/StoppedEnableDisable (67.54s)
PASS
Tests completed in 17m1.2243s (result code 0)
ok      k8s.io/minikube/test/integration        1045.049s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants