Skip to content

Convert dashboard addon from static YAML to Helm-based installation - #3

Draft
divysinghvi with Copilot wants to merge 6 commits into
masterfrom
copilot/convert-dashboard-addon-to-helm
Draft

Convert dashboard addon from static YAML to Helm-based installation#3
divysinghvi with Copilot wants to merge 6 commits into
masterfrom
copilot/convert-dashboard-addon-to-helm

Conversation

Copilot AI commented Dec 21, 2025

Copy link
Copy Markdown

Description

Converts the Kubernetes Dashboard addon from static YAML manifests (v2.7.0) to Helm-based deployment using the official upstream Helm chart (v7.x). Enables easier version tracking and aligns with Minikube's Helm addon framework.

Changes

Enhanced Helm Framework (pkg/addons/helm.go)

  • Added RepoURL field to HelmChart struct for standard Helm repositories
  • Implemented automatic helm repo add and helm repo update before chart installation
  • Added repo name extraction from chart reference (e.g., kubernetes-dashboard from kubernetes-dashboard/kubernetes-dashboard)

Dashboard Addon (pkg/minikube/assets/addons.go)

  • Replaced 10+ static BinAsset YAML files with single HelmChart configuration
  • Chart: kubernetes-dashboard/kubernetes-dashboard from https://kubernetes.github.io/dashboard/
  • Values: Enable metrics scraper, disable nginx/cert-manager (not needed in Minikube)

Tests (pkg/addons/helm_test.go)

  • Updated mockRunner to implement full Runner interface
  • Added test coverage for repo name extraction

Example

"dashboard": NewAddon([]*BinAsset{}, false, "dashboard", "Kubernetes", "", 
    "https://minikube.sigs.k8s.io/docs/handbook/dashboard/", nil, nil, 
    &HelmChart{
        Name:      "kubernetes-dashboard",
        Repo:      "kubernetes-dashboard/kubernetes-dashboard",
        RepoURL:   "https://kubernetes.github.io/dashboard/",
        Namespace: "kubernetes-dashboard",
        Values: []string{
            "metricsScraper.enabled=true",
            "nginx.enabled=false",
            "cert-manager.enabled=false",
        },
    }),

Breaking Change

Dashboard v7.x requires authentication—--enable-skip-login flag removed by upstream for security. Users should use minikube dashboard command (handles token automatically) or manually create token: kubectl -n kubernetes-dashboard create token kubernetes-dashboard.

Benefits

  • Version upgrades: single line change vs. updating 10+ YAML files
  • Upstream alignment: uses official Kubernetes Dashboard Helm chart
  • Better security: authentication enforced by default
  • Extensibility: pattern for other Helm-based addons

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/kubernetes/dashboard/contents/charts
    • Triggering command: /usr/bin/curl curl -s REDACTED grep -l on.*helm s/timeToK8s/v1.31.0.md nfig/composer/vendor/bin/grep (http block)
  • https://api.github.com/repos/kubernetes/dashboard/releases
    • Triggering command: /usr/bin/curl curl -s REDACTED grep -l on.*helm s/timeToK8s/v1.25.1.md /snap/bin/grep (http block)
  • https://api.github.com/repos/kubernetes/dashboard/releases/latest
    • Triggering command: /usr/bin/curl curl -s REDACTED grep -l on.*helm s/timeToK8s/v1.25.0.md /home/REDACTED/.local/bin/grep (http block)
  • hub.helm.sh
    • Triggering command: /usr/local/bin/helm helm search hub kubernetes-dashboard --max-col-width=0 on.*helm s/timeToK8s/v1.29.0.md ep (dns block)
  • kubernetes.github.io
    • Triggering command: /usr/bin/curl curl -s REDACTED grep -l on.*helm s/timeToK8s/v1.32.0.md rep (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

You are an experienced Kubernetes & Minikube contributor.

Goal: Convert the Kubernetes Dashboard addon in Minikube from static YAML-based installation (v2.x) to a Helm-based addon using the new Helm addon framework introduced in PR kubernetes#21847
.

Context:

Minikube currently installs Kubernetes Dashboard using static manifests (v2.x) defined in pkg/minikube/assets/addons.go.

The official Kubernetes Dashboard is now at v7.x and supports installation via Helm: https://github.com/kubernetes/dashboard

We want Minikube’s dashboard addon to:

Use Helm instead of raw YAML

Track newer dashboard versions more easily

Align with Minikube’s new Helm-based addon architecture

Tasks:

Study how Helm-based addons are defined using the framework added in PR kubernetes#21847.

Replace the existing dashboard addon definition with a Helm-based addon:

Use the official Kubernetes Dashboard Helm chart

Pin to a stable dashboard version (v7.x)

Configure namespace, service account, and RBAC as needed for Minikube

Ensure the addon works with:

minikube addons enable dashboard

minikube addons disable dashboard

Remove or deprecate old static YAML assets related to the dashboard.

Add/update documentation or comments explaining the Helm-based approach.

Follow Minikube coding conventions and keep the PR minimal and clean.

Expected Output:

Code changes converting the dashboard addon to Helm

Clear commit messages

A well-written PR description explaining:

Why Helm is used

Benefits (easier upgrades, version parity with upstream)

Any limitations or follow-ups

Constraints:

Do not change the addon name (dashboard)

Avoid breaking existing users

Prefer upstream defaults unless Minikube-specific config is required

Act like you are submitting this PR to the Minikube maintainers.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits December 21, 2025 04:50
- Replace static YAML assets with HelmChart definition
- Add RepoURL support to HelmChart struct for dynamic repo addition
- Update helm.go to add and update Helm repositories before install
- Configure kubernetes-dashboard v7.x from official Helm repository
- Update helm_test.go with mock runner for testing
- Dashboard now uses kubernetes-dashboard/kubernetes-dashboard chart
- Enable metricsScraper, disable nginx and cert-manager for minikube

Co-authored-by: divysinghvi <75575922+divysinghvi@users.noreply.github.com>
- Add comprehensive comments to dashboard addon explaining v7.x changes
- Document Helm-based approach and authentication requirements
- Add usage instructions for accessing dashboard
- Improve HelmChart struct documentation with examples
- Add detailed comments to installHelmChart function
- Format code with gofmt

Co-authored-by: divysinghvi <75575922+divysinghvi@users.noreply.github.com>
- Add comprehensive README.md explaining the migration
- Document breaking changes and authentication requirements
- Provide access instructions for users
- Explain benefits of Helm-based approach
- Mark old YAML files as deprecated

Co-authored-by: divysinghvi <75575922+divysinghvi@users.noreply.github.com>
- Fix repo name extraction to properly parse from Repo field
- Add strings import to helm.go
- Update mockRunner to implement full Runner interface
- Add test for repo name extraction logic
- All tests passing

Co-authored-by: divysinghvi <75575922+divysinghvi@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert Kubernetes Dashboard addon to Helm-based installation Convert dashboard addon from static YAML to Helm-based installation Dec 21, 2025
Copilot AI requested a review from divysinghvi December 21, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants