Skip to content

feat: add addons, apps and tenant API - #11

Merged
iasthc merged 11 commits into
mainfrom
crd
Feb 25, 2026
Merged

feat: add addons, apps and tenant API#11
iasthc merged 11 commits into
mainfrom
crd

Conversation

@iasthc

@iasthc iasthc commented Feb 25, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 25, 2026 03:20
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @iasthc, 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 foundational API structures for managing platform addons and multi-tenant workspaces within the OtterScale ecosystem. It establishes custom resource definitions for Modules and Workspaces, allowing for declarative configuration of extensible platform components and isolated tenant environments. Concurrently, the build system has been modernized to support the development and generation of these new API types, ensuring robust and maintainable code.

Highlights

  • New Addons API Introduced: A new addons.otterscale.io/v1alpha1 API group has been added, defining Module and ModuleTemplate custom resources. These resources enable the management and instantiation of platform addons, leveraging FluxCD HelmRelease or Kustomization specifications.
  • New Tenant API Introduced: A new tenant.otterscale.io/v1alpha1 API group has been added, introducing the Workspace custom resource. This API facilitates multi-tenancy by providing a mechanism to define logical isolation units with configurable members, resource quotas, limit ranges, and network isolation policies.
  • Build System Overhaul: The Makefile has been significantly refactored to include comprehensive development targets for code generation (proto, manifests, deepcopy), code quality (fmt, vet, lint), and dependency management for tools like buf, controller-gen, and golangci-lint.
  • New Go Dependencies: Several new Go modules have been added to support the new API definitions, including Kubernetes API types (k8s.io/api, k8s.io/apimachinery, k8s.io/apiextensions-apiserver, sigs.k8s.io/controller-runtime) and FluxCD API types (github.com/fluxcd/helm-controller/api, github.com/fluxcd/kustomize-controller/api).
Changelog
  • .gitignore
    • Added 'bin/*' to ignore compiled binaries.
  • Makefile
    • Refactored build targets for improved development workflow.
    • Introduced new targets for proto generation, manifest generation, deepcopy generation, formatting, vetting, tidying, and linting.
    • Added dependency management for buf, controller-gen, and golangci-lint.
    • Changed the default goal from 'help' to 'all' to run all generation and quality checks.
  • addons/v1alpha1/groupversion_info.go
    • Added file to define the addons.otterscale.io/v1alpha1 API group and scheme builder.
  • addons/v1alpha1/module_types.go
    • Added file to define the Module custom resource, including its spec for referencing ModuleTemplates and overriding values, and its status for tracking FluxCD resources.
  • addons/v1alpha1/moduletemplate_types.go
    • Added file to define the ModuleTemplate custom resource, allowing for reusable blueprints of platform modules based on FluxCD HelmRelease or Kustomization specifications.
  • addons/v1alpha1/zz_generated.deepcopy.go
    • Added autogenerated deepcopy methods for the addons.otterscale.io/v1alpha1 API types.
  • config/crd/bases/addons.otterscale.io_modules.yaml
    • Added the CustomResourceDefinition (CRD) manifest for the Module resource.
  • config/crd/bases/tenant.otterscale.io_workspaces.yaml
    • Added the CustomResourceDefinition (CRD) manifest for the Workspace resource.
  • go.mod
    • Updated to include new dependencies for Kubernetes API types and FluxCD API types.
  • go.sum
    • Updated to reflect changes in go.mod with new module checksums.
  • hack/boilerplate.go.txt
    • Added standard license boilerplate text.
  • tenant/v1alpha1/groupversion_info.go
    • Added file to define the tenant.otterscale.io/v1alpha1 API group and scheme builder.
  • tenant/v1alpha1/workspace_types.go
    • Added file to define the Workspace custom resource, including its spec for managing members, resource quotas, limit ranges, and network isolation, and its status for tracking related Kubernetes resources.
  • tenant/v1alpha1/zz_generated.deepcopy.go
    • Added autogenerated deepcopy methods for the tenant.otterscale.io/v1alpha1 API types.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/lint.yml
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[bot]

This comment was marked as outdated.

This comment was marked as outdated.

- Added new dependencies for FluxCD Helm and Kustomize controllers in go.mod.
- Updated .gitignore to exclude binary files.
- Introduced new CRDs for Module and ModuleTemplate resources in the addons API.
- Added API schema definitions and generated deepcopy functions for new types in the addons API.
- Introduced a new workflow file for linting Go code using golangci-lint.
- Configured the workflow to run on push and pull request events.
- Set up necessary permissions and steps for code checkout and Go environment setup.
- Added new Makefile targets for linting, fixing lint issues, and verifying linter configuration.
- Updated the 'all' target to include linting as part of the build process.
- Configured golangci-lint version in the GitHub Actions workflow to v2.10.1.
- Updated the function name from 'go-instal-tool' to 'go-install-tool' for consistency and correctness in the Makefile.
- Updated the SchemeBuilder initialization to use runtime.NewSchemeBuilder for better organization.
- Added addKnownTypes function to register Module, ModuleList, ModuleTemplate, and their respective types in the addons API.
- Removed redundant init functions from module_types.go and workspace_types.go.
- Ensured proper addition of GroupVersion to the scheme for both addons and tenant APIs.
…s and tenant resources

- Removed unused dependencies related to FluxCD Helm and Kustomize controllers from go.mod.
- Replaced apiextensionsv1.JSON with runtime.RawExtension in ModuleSpec, HelmReleaseTemplateSpec, KustomizationTemplateSpec, WorkspaceSpec, and related types to avoid unnecessary dependencies.
- Updated CRD definitions to reflect changes in the API types, ensuring compatibility with the new structure.
- Enhanced the deepcopy functions to accommodate the new type definitions.
- Added new API types for SimpleApp, including SimpleAppSpec and SimpleAppStatus, to facilitate application deployment with optional Service and PersistentVolumeClaim configurations.
- Implemented the GroupVersion and SchemeBuilder for the new API group apps.otterscale.io.
- Created CustomResourceDefinition (CRD) for SimpleApp to define its schema and status conditions.
- Generated deepcopy functions for the new types to ensure proper handling of object copies.
- Renamed fields in SimpleAppSpec and SimpleAppStatus for improved clarity, changing 'Spec' suffixes to more descriptive terms.
- Updated CRD definitions to reflect these changes, ensuring consistency in the API schema.
- Enhanced comments to provide better context for each field in the SimpleApp types.
@iasthc iasthc changed the title feat: add addons and tenant API feat: add addons, apps and tenant API Feb 25, 2026
…for clarity

- Enhanced comments in ModuleTemplateStatus and WorkspaceSpec to provide clearer descriptions of fields and their purposes.
- Updated terminology in comments to ensure consistency and better understanding of the API structure.
- Updated dependencies in go.mod to use newer versions for golang.org/x/net, golang.org/x/text, and sigs.k8s.io/structured-merge-diff/v6.
- Removed outdated dependency on github.com/kr/pretty.
- Updated go.sum to reflect changes in module versions.
…or clarity

- Updated descriptions in ModuleTemplate and Workspace CRDs to enhance clarity and understanding of the fields.
- Changed terminology to better reflect the intended behavior and status of the resources.
@iasthc
iasthc merged commit 591f32f into main Feb 25, 2026
4 checks passed
@iasthc
iasthc deleted the crd branch February 25, 2026 07:06
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