Skip to content

Remove helmify / kustomize, switch to helm-chart only.#71

Open
notandy wants to merge 1 commit intomainfrom
remove-kustomize_helmify
Open

Remove helmify / kustomize, switch to helm-chart only.#71
notandy wants to merge 1 commit intomainfrom
remove-kustomize_helmify

Conversation

@notandy
Copy link
Contributor

@notandy notandy commented Mar 16, 2026

This PR removes the helmify step and removes kustomize as an option to
render the manager/rbacs/crd.
Helmify took a lot of work creating a helm-chart based on the
boilerplate generated by kubebuilder. But ultimatively, it imposes too
many constraints to the outcome of the helm-chart and makes it hard to
implement custom renditions (like using .AppVersion as a image tag).

Thus this PR is removing the kustomize files, leaving only the generated
CRDs in the config directory (which don't need any templating) and
symlinks it to the helm chart.

Summary by CodeRabbit

  • Chores
    • Updated Docker GitHub Actions dependencies (metadata-action v5→v6, setup-qemu-action v3→v4).
    • Removed pre-commit hooks (helmify, go-build).
    • Reorganized CRD output locations in build configuration.
    • Removed explicit image tag specification in Helm values.
    • Consolidated deployment configuration structure.

This PR removes the helmify step and removes kustomize as an option to
render the manager/rbacs/crd.
Helmify took a lot of work creating a helm-chart based on the
boilerplate generated by kubebuilder. But ultimatively, it imposes too
many constraints to the outcome of the helm-chart and makes it hard to
implement custom renditions (like using .AppVersion as a image tag).

Thus this PR is removing the kustomize files, leaving only the generated
CRDs in the config directory (which don't need any templating) and
symlinks it to the helm chart.
@notandy notandy requested a review from mchristianl March 16, 2026 19:08
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

This pull request migrates the project from a Kubebuilder-style kustomize-based configuration to a Helm-chart-based deployment approach. Custom Resource Definitions (CRDs) are relocated from config/crd/bases to charts/kvm-node-agent/crds, and the entire config/ directory structure for managing Kubernetes manifests, RBAC, and service configurations is removed. GitHub Actions are updated to newer versions, and pre-commit hooks are pruned.

Changes

Cohort / File(s) Summary
CI/CD Tooling
.github/workflows/container-registry-ghcr.yaml, .pre-commit-config.yaml
Updated Docker GitHub Actions (docker/metadata-action@v5v6, docker/setup-qemu-action@v3v4). Removed local pre-commit hooks for helmify and go-build.
Build Configuration
Makefile, Makefile.maker.yaml
Updated CRD output path from config/crd/bases to charts/kvm-node-agent/crds. Replaced kustomize-based CRD installation with direct YAML application, removed helmify target.
CRD Relocation
charts/kvm-node-agent/crds/migration-crd.yaml, charts/kvm-node-agent/values.yaml
Moved Migration CRD to Helm charts directory; removed explicit "latest" tag from controller manager image in values.
Removed Kustomize Configuration
config/crd/*, config/default/*, config/manager/*, config/prometheus/*
Deleted entire kustomize overlay structure including CRD kustomization, default namespace configuration, manager manifests, metrics service, and Prometheus monitoring setup.
Removed RBAC Resources
config/rbac/*
Deleted all RBAC ClusterRoles, ClusterRoleBindings, Roles, RoleBindings, and ServiceAccount definitions (leader election, metrics, migration/hypervisor editor/viewer roles).
Removed Sample Manifests
config/samples/*
Deleted sample Kubernetes custom resources for Hypervisor and Migration CRs and associated kustomization.
Removed CRD Manifests
config/crd/bases/kvm.cloud.sap_hypervisors.yaml
Deleted Hypervisor CRD cluster-scoped resource definition.
Test Configuration Updates
internal/controller/suite_test.go, internal/evacuation/suite_test.go
Updated CRD directory path from config/crd/bases to charts/kvm-node-agent/crds in test environment setup.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 From config folders we hop away,
To Helm charts in a brighter day,
CRDs skip to their new home,
While kustomize ghosts gently roam,
A fresher path, more charts to play! 📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing helmify and kustomize in favor of helm-chart-only deployment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-kustomize_helmify
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@notandy notandy requested a review from PhilippMatthes March 16, 2026 19:08
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/kvm-node-agent/internal/controller 56.77% (-0.52%) 👎
github.com/cobaltcore-dev/kvm-node-agent/internal/evacuation 20.69% (ø)

Coverage by file

Changed unit test files

  • github.com/cobaltcore-dev/kvm-node-agent/internal/controller/suite_test.go
  • github.com/cobaltcore-dev/kvm-node-agent/internal/evacuation/suite_test.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/container-registry-ghcr.yaml (1)

48-48: Remove unnecessary QEMU setup for single-platform amd64 build.

This workflow builds only linux/amd64 and runs on an amd64 runner (large_runner_16core_64gb). QEMU is only needed for multi-platform or cross-architecture builds, not for native platform builds. Removing the setup-qemu-action@v4 step on line 48 will reduce unnecessary build time overhead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/container-registry-ghcr.yaml at line 48, Remove the
unnecessary QEMU setup step that uses "docker/setup-qemu-action@v4" from the
workflow since the job targets only linux/amd64 and runs on an amd64 runner
(large_runner_16core_64gb); delete the entire step block referencing
docker/setup-qemu-action@v4 and verify no subsequent steps depend on QEMU before
committing the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile.maker.yaml`:
- Line 10: The CRD generation path (crdOutputPath: charts/kvm-node-agent/crds)
and the install step path (install-crds using config/crd/*.yaml) are
inconsistent; update the install target so it reads CRDs from the generated
location or change crdOutputPath to match the installer. Locate the
crdOutputPath setting and the install-crds rule/target that references
config/crd/*.yaml and make them identical (e.g., point install-crds to
charts/kvm-node-agent/crds/*.yaml or set crdOutputPath to config/crd) so
generated CRDs are the ones applied.

---

Nitpick comments:
In @.github/workflows/container-registry-ghcr.yaml:
- Line 48: Remove the unnecessary QEMU setup step that uses
"docker/setup-qemu-action@v4" from the workflow since the job targets only
linux/amd64 and runs on an amd64 runner (large_runner_16core_64gb); delete the
entire step block referencing docker/setup-qemu-action@v4 and verify no
subsequent steps depend on QEMU before committing the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f5179a0-ebdc-4546-8eea-f6c8600f0e28

📥 Commits

Reviewing files that changed from the base of the PR and between 9223a83 and 913cfdb.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (35)
  • .github/workflows/container-registry-ghcr.yaml
  • .pre-commit-config.yaml
  • Makefile
  • Makefile.maker.yaml
  • charts/kvm-node-agent/crds/kvm.cloud.sap_migrations.yaml
  • charts/kvm-node-agent/crds/migration-crd.yaml
  • charts/kvm-node-agent/values.yaml
  • config/crd/bases/kvm.cloud.sap_hypervisors.yaml
  • config/crd/kustomization.yaml
  • config/crd/kustomizeconfig.yaml
  • config/default/kustomization.yaml
  • config/default/manager_metrics_patch.yaml
  • config/default/metrics_service.yaml
  • config/manager/kustomization.yaml
  • config/manager/manager.yaml
  • config/manager/manager_node_selector_patch.yaml
  • config/prometheus/kustomization.yaml
  • config/prometheus/monitor.yaml
  • config/rbac/hypervisor_editor_role.yaml
  • config/rbac/hypervisor_viewer_role.yaml
  • config/rbac/kustomization.yaml
  • config/rbac/leader_election_role.yaml
  • config/rbac/leader_election_role_binding.yaml
  • config/rbac/metrics_auth_role.yaml
  • config/rbac/metrics_auth_role_binding.yaml
  • config/rbac/metrics_reader_role.yaml
  • config/rbac/migration_editor_role.yaml
  • config/rbac/migration_viewer_role.yaml
  • config/rbac/role_binding.yaml
  • config/rbac/service_account.yaml
  • config/samples/kustomization.yaml
  • config/samples/kvm_v1alpha1_hypervisor.yaml
  • config/samples/kvm_v1alpha1_migration.yaml
  • internal/controller/suite_test.go
  • internal/evacuation/suite_test.go
💤 Files with no reviewable changes (29)
  • config/samples/kustomization.yaml
  • config/rbac/metrics_reader_role.yaml
  • config/rbac/hypervisor_viewer_role.yaml
  • config/manager/kustomization.yaml
  • config/rbac/kustomization.yaml
  • config/default/manager_metrics_patch.yaml
  • config/samples/kvm_v1alpha1_hypervisor.yaml
  • config/rbac/migration_viewer_role.yaml
  • charts/kvm-node-agent/values.yaml
  • config/rbac/leader_election_role.yaml
  • config/rbac/leader_election_role_binding.yaml
  • config/rbac/service_account.yaml
  • config/rbac/metrics_auth_role.yaml
  • config/crd/bases/kvm.cloud.sap_hypervisors.yaml
  • charts/kvm-node-agent/crds/migration-crd.yaml
  • config/rbac/migration_editor_role.yaml
  • config/rbac/hypervisor_editor_role.yaml
  • config/prometheus/kustomization.yaml
  • config/prometheus/monitor.yaml
  • config/crd/kustomizeconfig.yaml
  • config/samples/kvm_v1alpha1_migration.yaml
  • .pre-commit-config.yaml
  • config/default/kustomization.yaml
  • config/crd/kustomization.yaml
  • config/manager/manager_node_selector_patch.yaml
  • config/default/metrics_service.yaml
  • config/rbac/metrics_auth_role_binding.yaml
  • config/manager/manager.yaml
  • config/rbac/role_binding.yaml

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.

1 participant