Skip to content

feat: introduce Module and ModuleClass CRDs for enhanced module manag… - #35

Merged
iasthc merged 1 commit into
mainfrom
rename-module
Mar 4, 2026
Merged

feat: introduce Module and ModuleClass CRDs for enhanced module manag…#35
iasthc merged 1 commit into
mainfrom
rename-module

Conversation

@iasthc

@iasthc iasthc commented Mar 4, 2026

Copy link
Copy Markdown
Member

…ement

  • Added Module and ModuleClass Custom Resource Definitions (CRDs) to facilitate the management of platform modules.
  • Updated existing CRD references in kustomization.yaml to reflect the new module structure.
  • Introduced HelmChartTemplate and KustomizationTemplate types for defining deployment strategies.
  • Enhanced ModuleSpec and ModuleStatus to track the state of modules and their associated classes.
  • Implemented deepcopy functions for new types to ensure compatibility and maintainability.

…ement

- Added Module and ModuleClass Custom Resource Definitions (CRDs) to facilitate the management of platform modules.
- Updated existing CRD references in kustomization.yaml to reflect the new module structure.
- Introduced HelmChartTemplate and KustomizationTemplate types for defining deployment strategies.
- Enhanced ModuleSpec and ModuleStatus to track the state of modules and their associated classes.
- Implemented deepcopy functions for new types to ensure compatibility and maintainability.
Copilot AI review requested due to automatic review settings March 4, 2026 08:33
@iasthc
iasthc merged commit 27ce4cf into main Mar 4, 2026
4 checks passed
@iasthc
iasthc deleted the rename-module branch March 4, 2026 08:33
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant refactoring of the platform's module management system by renaming the ModuleTemplate CRD to ModuleClass and migrating it to a new, more specific API group, module.otterscale.io. This change clarifies the purpose of these resources, with ModuleClass now explicitly defining reusable module blueprints. The Module CRD has been updated to reflect this new naming convention, ensuring that the system accurately tracks and manages modules based on their respective classes. The update also includes necessary adjustments to generated code and configuration files to maintain system integrity and consistency.

Highlights

  • CRD Renaming and API Group Change: The ModuleTemplate Custom Resource Definition (CRD) has been renamed to ModuleClass, and its API group has been changed from addons.otterscale.io to module.otterscale.io. This change affects all related files, including CRD definitions, Go types, and documentation.
  • Module CRD Updates: The Module CRD has been updated to reference ModuleClass instead of ModuleTemplate. This includes changes to field names like templateRef to moduleClassName, and ApprovedTemplateGeneration to ApprovedClassGeneration, along with corresponding documentation updates.
  • Code Generation Updates: The zz_generated.deepcopy.go file has been updated to reflect the new ModuleClass types, ensuring proper deep copy functionality for the renamed CRDs.
  • Documentation and Kustomization Alignment: The README.md and kustomization.yaml files have been adjusted to align with the new CRD names and API group, ensuring consistency across the project.
Changelog
  • README.md
    • Updated references from Module and ModuleTemplate under addons.otterscale.io to Module and ModuleClass under module.otterscale.io.
  • addons/v1alpha1/groupversion_info.go
    • Renamed to module/v1alpha1/groupversion_info.go.
    • Updated package comments and groupName from addons.otterscale.io to module.otterscale.io.
    • Changed GroupVersion from addons.otterscale.io to module.otterscale.io.
    • Modified addKnownTypes to register ModuleClass and ModuleClassList instead of ModuleTemplate and ModuleTemplateList.
  • addons/v1alpha1/helm_types.go
    • Renamed to module/v1alpha1/helm_types.go.
  • addons/v1alpha1/kustomization_types.go
    • Renamed to module/v1alpha1/kustomization_types.go.
  • addons/v1alpha1/module_types.go
    • Renamed to module/v1alpha1/module_types.go.
    • Updated comments and descriptions to refer to ModuleClass instead of ModuleTemplate.
    • Renamed TemplateRef field to ModuleClassName in ModuleSpec.
    • Renamed ApprovedTemplateGeneration to ApprovedClassGeneration in ModuleSpec.
    • Renamed AppliedTemplateGeneration to AppliedClassGeneration in ModuleStatus.
    • Renamed AvailableTemplateGeneration to AvailableClassGeneration in ModuleStatus.
    • Updated kubebuilder:printcolumn for Template to Class.
  • addons/v1alpha1/moduletemplate_types.go
    • Renamed to module/v1alpha1/moduleclass_types.go.
    • Renamed ModuleTemplateSpec type to ModuleClassSpec.
    • Renamed ModuleTemplate type to ModuleClass.
    • Renamed ModuleTemplateList type to ModuleClassList.
    • Updated comments and descriptions to refer to ModuleClass instead of ModuleTemplate.
  • addons/v1alpha1/zz_generated.deepcopy.go
    • Renamed to module/v1alpha1/zz_generated.deepcopy.go.
    • Removed deepcopy functions for ModuleTemplate, ModuleTemplateList, and ModuleTemplateSpec.
    • Added deepcopy functions for ModuleClass, ModuleClassList, and ModuleClassSpec.
    • Updated ModuleSpec deepcopy logic to use ApprovedClassGeneration instead of ApprovedTemplateGeneration.
  • config/crd/bases/addons.otterscale.io_modules.yaml
    • Renamed to config/crd/bases/module.otterscale.io_modules.yaml.
    • Updated CRD name from modules.addons.otterscale.io to modules.module.otterscale.io.
    • Changed group from addons.otterscale.io to module.otterscale.io.
    • Modified jsonPath for print column from .spec.templateRef to .spec.moduleClassName and its name from Template to Class.
    • Updated descriptions to refer to ModuleClass instead of ModuleTemplate.
  • config/crd/bases/addons.otterscale.io_moduletemplates.yaml
    • Renamed to config/crd/bases/module.otterscale.io_moduleclasses.yaml.
    • Updated CRD name from moduletemplates.addons.otterscale.io to moduleclasses.module.otterscale.io.
    • Changed group from addons.otterscale.io to module.otterscale.io.
    • Renamed kind, listKind, plural, and singular from ModuleTemplate to ModuleClass equivalents.
    • Updated descriptions to refer to ModuleClass instead of ModuleTemplate.
  • config/crd/kustomization.yaml
    • Updated resource paths for modules.yaml and moduletemplates.yaml to reflect the new module.otterscale.io group and moduleclasses.yaml filename.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request performs a large-scale refactoring to rename the addons API group to module and the ModuleTemplate kind to ModuleClass. This change improves clarity and aligns the terminology with common industry patterns. The renaming has been applied consistently and thoroughly across all Custom Resource Definitions, Go type definitions, generated code, and documentation. The changes are well-executed and I did not find any issues.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new “Module / ModuleClass” API surface for managing platform modules, including new Helm- and Kustomize-based deployment templates, and updates the generated CRDs/manifests accordingly.

Changes:

  • Renames the API group and type naming from the prior addons/template terminology to module.otterscale.io with Module + ModuleClass.
  • Adds HelmChartTemplate and KustomizationTemplate types (plus related supporting structs) for module deployment strategies.
  • Regenerates CRD YAML and deepcopy implementations to reflect the new API types/fields.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
module/v1alpha1/zz_generated.deepcopy.go Adds deepcopy support for ModuleClass* and updates renamed fields.
module/v1alpha1/moduleclass_types.go Defines the ModuleClass CRD Go types and spec schema.
module/v1alpha1/module_types.go Updates Module spec/status to reference ModuleClass and renamed generation fields.
module/v1alpha1/kustomization_types.go Introduces Kustomize deployment templates and related supporting structs.
module/v1alpha1/helm_types.go Introduces Helm deployment templates and release status structs.
module/v1alpha1/groupversion_info.go Switches API group registration to module.otterscale.io and registers ModuleClass.
config/crd/kustomization.yaml Updates CRD base references to the new group/type files.
config/crd/bases/module.otterscale.io_modules.yaml Updates the Module CRD to the new group and field names.
config/crd/bases/module.otterscale.io_moduleclasses.yaml Adds/updates the ModuleClass CRD under the new group.
README.md Updates the API summary table to module.otterscale.io and ModuleClass.
Comments suppressed due to low confidence (2)

module/v1alpha1/groupversion_info.go:30

  • The API group for Module/ModuleClass is being renamed from addons.otterscale.io to module.otterscale.io, which is a breaking change for any existing clusters/manifests (existing CRs will no longer be served under the old apiVersion). If this rename is intentional, please document the migration/upgrade path (e.g., removal of old CRDs, how to migrate existing Module CRs) in the PR description or upgrade notes, or consider supporting conversion/dual-serving if backward compatibility is required.
    module/v1alpha1/module_types.go:123
  • This comment still refers to a “platform addon” even though the API has been renamed to modules/classes. To avoid confusion in generated CRD descriptions and docs, please update the wording to consistently use “platform module”.

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

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