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

Upgrade kubernetes dashboard from v2.3.1 to v2.5.1 #13741

Merged
merged 5 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ var Addons = map[string]*Addon{
MustBinAsset(addons.DashboardAssets, "dashboard/dashboard-secret.yaml", vmpath.GuestAddonsDir, "dashboard-secret.yaml", "0640"),
MustBinAsset(addons.DashboardAssets, "dashboard/dashboard-svc.yaml", vmpath.GuestAddonsDir, "dashboard-svc.yaml", "0640"),
}, false, "dashboard", "kubernetes", map[string]string{
"Dashboard": "kubernetesui/dashboard:v2.3.1@sha256:ec27f462cf1946220f5a9ace416a84a57c18f98c777876a8054405d1428cc92e",
"Dashboard": "kubernetesui/dashboard:v2.5.0@sha256:1b020f566b5d65a0273c3f4ed16f37dedcb95ee2c9fa6f1c42424ec10b2fd2d7",
"MetricsScraper": "kubernetesui/metrics-scraper:v1.0.7@sha256:36d5b3f60e1a144cc5ada820910535074bdf5cf73fb70d1ff1681537eef4e172",
}, nil),
"default-storageclass": NewAddon([]*BinAsset{
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func dashboardFrontend(repo string) string {
repo = "docker.io"
}
// See 'kubernetes-dashboard' in deploy/addons/dashboard/dashboard-dp.yaml
return path.Join(repo, "kubernetesui", "dashboard:v2.3.1")
return path.Join(repo, "kubernetesui", "dashboard:v2.5.0")
}

// dashboardMetrics returns the image used for the dashboard metrics scraper
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/images/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ k8s.gcr.io/coredns/coredns:v1.8.4
func TestAuxiliary(t *testing.T) {
want := []string{
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}
got := auxiliary("")
Expand All @@ -106,7 +106,7 @@ func TestAuxiliary(t *testing.T) {
func TestAuxiliaryMirror(t *testing.T) {
want := []string{
"test.mirror/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"test.mirror/kubernetesui/dashboard:v2.3.1",
"test.mirror/kubernetesui/dashboard:v2.5.0",
"test.mirror/kubernetesui/metrics-scraper:v1.0.7",
}
got := auxiliary("test.mirror")
Expand Down
12 changes: 6 additions & 6 deletions pkg/minikube/bootstrapper/images/kubeadm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/etcd:3.4.3-0",
"k8s.gcr.io/pause:3.1",
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.16.1", "mirror.k8s.io", false, []string{
Expand All @@ -55,7 +55,7 @@ func TestKubeadmImages(t *testing.T) {
"mirror.k8s.io/etcd:3.3.15-0",
"mirror.k8s.io/pause:3.1",
"mirror.k8s.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"mirror.k8s.io/kubernetesui/dashboard:v2.3.1",
"mirror.k8s.io/kubernetesui/dashboard:v2.5.0",
"mirror.k8s.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.15.0", "", false, []string{
Expand All @@ -67,7 +67,7 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/etcd:3.3.10",
"k8s.gcr.io/pause:3.1",
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.14.0", "", false, []string{
Expand All @@ -79,7 +79,7 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/etcd:3.3.10",
"k8s.gcr.io/pause:3.1",
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.13.0", "", false, []string{
Expand All @@ -91,7 +91,7 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/etcd:3.2.24",
"k8s.gcr.io/pause:3.1",
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.12.0", "", false, []string{
Expand All @@ -103,7 +103,7 @@ func TestKubeadmImages(t *testing.T) {
"k8s.gcr.io/etcd:3.2.24",
"k8s.gcr.io/pause:3.1",
"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(),
"docker.io/kubernetesui/dashboard:v2.3.1",
"docker.io/kubernetesui/dashboard:v2.5.0",
"docker.io/kubernetesui/metrics-scraper:v1.0.7",
}},
{"v1.11.0", "", true, nil},
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/containerd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestAddRepoTagToImageName(t *testing.T) {
imgName string
want string
}{
{"kubernetesui/dashboard:v2.1.0", "docker.io/kubernetesui/dashboard:v2.1.0"},
{"kubernetesui/dashboard:v2.5.0", "docker.io/kubernetesui/dashboard:v2.5.0"},
{"kubernetesui/metrics-scraper:v1.0.4", "docker.io/kubernetesui/metrics-scraper:v1.0.4"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the previous upgrade, this file has not been updated, so metrics-scraper is not the latest version.
I think it's better to update from v1.0.4 to v1.0.7.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was corrected and thank you so much for letting me know!

{"gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion(), "gcr.io/k8s-minikube/storage-provisioner:" + version.GetStorageProvisionerVersion()},
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/start_stop_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,10 @@ func testPause(ctx context.Context, t *testing.T, profile string) {
// Remove container-specific prefixes for naming consistency
// for example in `docker` runtime we get this:
// $ docker@minikube:~$ sudo crictl images -o json | grep dash
// "kubernetesui/dashboard:v2.1.0"
// "kubernetesui/dashboard:v2.5.0"
// but for 'containerd' we get full name
// $ docker@minikube:~$ sudo crictl images -o json | grep dash
// "docker.io/kubernetesui/dashboard:v2.1.0"
// "docker.io/kubernetesui/dashboard:v2.5.0"
func trimImageName(name string) string {
name = strings.TrimPrefix(name, "docker.io/")
name = strings.TrimPrefix(name, "localhost/")
Expand Down