Skip to content

feat: create harvester-upgrade-manager chart#492

Merged
starbops merged 7 commits intoharvester:masterfrom
starbops:feat-7112
Mar 20, 2026
Merged

feat: create harvester-upgrade-manager chart#492
starbops merged 7 commits intoharvester:masterfrom
starbops:feat-7112

Conversation

@starbops
Copy link
Copy Markdown
Member

@starbops starbops commented Mar 12, 2026

Problem:

Solution:

harvester-upgrade-manager chart for upgrade v2

Related Issue(s):

harvester/harvester#7112

Test plan:

  1. Prepare a v1.7.1 Harvester cluster
  2. Install the chart
    helm upgrade --install harvester-upgrade-manager ./charts/harvester-upgrade-manager \
        --namespace=harvester-system

Additional documentation or context

Signed-off-by: Zespre Chang <zespre.chang@suse.com>
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
@starbops starbops marked this pull request as ready for review March 16, 2026 07:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new harvester-upgrade Helm chart (harvester-upgrade-toolkit) with controller Deployment, RBAC, CRD templating, metrics/webhook resources, and CI support via stub CRDs for external dependencies.

Changes:

  • Added a full Helm chart under charts/harvester-upgrade/ (templates, values, helpers, CRD, RBAC, webhook, metrics, ServiceMonitor).
  • Added CI-only “external stub CRDs” to allow chart-testing installs in a bare test cluster.
  • Updated GitHub Actions CI workflow to create the new stub CRDs before ct install.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/harvester-upgrade-external-stub-crds.yaml Adds minimal stub CRDs required for chart installation in CI.
charts/harvester-upgrade/Chart.yaml New chart metadata/versioning for harvester-upgrade.
charts/harvester-upgrade/values.yaml Default configuration for manager, CRDs, metrics, webhook, and helper RBAC.
charts/harvester-upgrade/.helmignore Helm packaging ignore rules for the new chart.
charts/harvester-upgrade/templates/_helpers.tpl Adds naming helpers, including truncation-safe resource name generation.
charts/harvester-upgrade/templates/NOTES.txt Helm post-install notes for verifying install.
charts/harvester-upgrade/templates/manager/manager.yaml Deploys the controller manager Deployment.
charts/harvester-upgrade/templates/crd/upgradeplans.management.harvesterhci.io.yaml Templates the UpgradePlan CRD with optional Helm keep policy.
charts/harvester-upgrade/templates/webhook/webhook.yaml Creates webhook TLS Secret and webhook configurations.
charts/harvester-upgrade/templates/webhook/webhook-service.yaml Creates the Service backing the webhook endpoint.
charts/harvester-upgrade/templates/metrics/controller-manager-metrics-service.yaml Service exposing the controller metrics endpoint.
charts/harvester-upgrade/templates/monitoring/servicemonitor.yaml Optional Prometheus ServiceMonitor for scraping metrics.
charts/harvester-upgrade/templates/rbac/controller-manager.yaml ServiceAccount for the controller manager.
charts/harvester-upgrade/templates/rbac/manager-role.yaml ClusterRole granting controller permissions.
charts/harvester-upgrade/templates/rbac/manager-rolebinding.yaml ClusterRoleBinding for controller manager permissions.
charts/harvester-upgrade/templates/rbac/leader-election-role.yaml Role for leader election resources in the release namespace.
charts/harvester-upgrade/templates/rbac/leader-election-rolebinding.yaml RoleBinding for leader election Role.
charts/harvester-upgrade/templates/rbac/metrics-auth-role.yaml ClusterRole for TokenReview/SAR (metrics authn/authz).
charts/harvester-upgrade/templates/rbac/metrics-auth-rolebinding.yaml Binds metrics auth ClusterRole to controller manager SA.
charts/harvester-upgrade/templates/rbac/metrics-reader.yaml ClusterRole granting access to /metrics non-resource URL.
charts/harvester-upgrade/templates/rbac/version-viewer-role.yaml Optional helper ClusterRole for read-only access to Version CRs.
charts/harvester-upgrade/templates/rbac/version-editor-role.yaml Optional helper ClusterRole for edit access to Version CRs.
charts/harvester-upgrade/templates/rbac/version-admin-role.yaml Optional helper ClusterRole for admin access to Version CRs.
charts/harvester-upgrade/templates/rbac/upgradeplan-viewer-role.yaml Optional helper ClusterRole for read-only access to UpgradePlan CRs.
charts/harvester-upgrade/templates/rbac/upgradeplan-editor-role.yaml Optional helper ClusterRole for edit access to UpgradePlan CRs.
charts/harvester-upgrade/templates/rbac/upgradeplan-admin-role.yaml Optional helper ClusterRole for admin access to UpgradePlan CRs.
.github/workflows/ci.yaml Creates the new stub CRDs before running chart-testing install.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## String to fully override chart.fullname template
##
fullnameOverride: "harvester-upgrade-toolkit"
{{- end }}
{{- with .Values.manager.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 16 }}
{{- end }}
Comment on lines +11 to +16
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{- if and $existingSecret $existingSecret.data }}
{{- $ca = index $existingSecret.data "ca.crt" }}
{{- $cert = index $existingSecret.data "tls.crt" }}
{{- $key = index $existingSecret.data "tls.key" }}
{{- else }}
Comment on lines +39 to +46
- args:
{{- if .Values.metrics.enable }}
- --metrics-bind-address=:{{ .Values.metrics.port }}
{{- else }}
# Bind to :0 to disable the controller-runtime managed metrics server
- --metrics-bind-address=0
{{- end }}
- --health-probe-bind-address=:8081
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
Signed-off-by: Zespre Chang <zespre.chang@suse.com>
@starbops starbops changed the title feat(harvester-upgrade): create harvester-upgrade chart feat: create harvester-upgrade-manager chart Mar 19, 2026
Copy link
Copy Markdown
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@starbops starbops merged commit eea73f2 into harvester:master Mar 20, 2026
5 checks passed
@starbops starbops deleted the feat-7112 branch March 20, 2026 07:31
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.

4 participants