Skip to content

forkspacer/modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forkspacer Modules Repository

This repository contains pre-built modules for the Forkspacer platform. Modules can be deployed to workspaces via the UI or CLI.

Repository Structure

.
├── index.json                    # Module catalog for UI discovery
├── generate-index.sh             # Script to update index.json
├── <module-name>/
│   └── <version>/
│       ├── module.yaml           # Module definition
│       └── README.md             # Module documentation (optional)
└── custom/                       # Custom module implementations

Available Modules

See index.json for the full catalog of available modules.

Redis

  • Category: Cache
  • Description: High-performance in-memory data store, cache, and message broker
  • Versions: 1.0.0
  • Documentation: redis/1.0.0/README.md

Adding a New Module

1. Create Module Structure

Create a directory for your module with a version:

mkdir -p <module-name>/<version>/

2. Create module.yaml

The module definition follows this format:

kind: Helm
metadata:
  name: <module-name>
  supportedOperatorVersion: ">= 0.0.0, < 1.0.0"

config:
  - type: option|string|integer|boolean
    name: "Display Name"
    alias: "configKey"
    spec:
      editable: true
      required: false
      default: "value"
      # Additional validation based on type

spec:
  namespace: default
  repo: https://charts.example.com/repo
  chartName: chart-name
  version: "{{.config.version}}"

  values:
    - raw:
        key: "{{.config.configKey}}"

  cleanup:
    removeNamespace: false
    removePVCs: true

3. Create README.md (Optional)

Add documentation for your module:

cat > <module-name>/<version>/README.md <<EOF
# Module Name

Description of what this module does.

## Features
- Feature 1
- Feature 2

## Configuration Options
...

## Usage
...
EOF

4. Update index.json

Manually edit index.json to add your module metadata:

{
  "name": "module-name",
  "displayName": "Module Name",
  "description": "Short description",
  "category": "database|cache|messaging|storage|monitoring",
  "icon": "https://example.com/icon.png",
  "tags": ["tag1", "tag2"],
  "maintainers": [...],
  "versions": [...]
}

Or use the generator script (note: requires manual metadata enhancement):

./generate-index.sh

5. Commit and Push

git add .
git commit -m "feat: add <module-name> module"
git push origin main

Module Configuration Types

option

Select from predefined values:

- type: option
  name: "Version"
  alias: "version"
  spec:
    default: "1.0.0"
    values:
      - "1.0.0"
      - "2.0.0"

string

Free-text input:

- type: string
  name: "Database Name"
  alias: "dbName"
  spec:
    default: "mydb"
    minLength: 1
    maxLength: 63

integer

Numeric input:

- type: integer
  name: "Replica Count"
  alias: "replicas"
  spec:
    default: 3
    min: 1
    max: 10

boolean

True/false toggle:

- type: boolean
  name: "Enable TLS"
  alias: "tls"
  spec:
    default: true

Using Modules

Via HTTP URL

Modules can be referenced directly via URL:

apiVersion: batch.forkspacer.com/v1
kind: Module
metadata:
  name: my-redis
spec:
  source:
    httpURL: "https://raw.githubusercontent.com/forkspacer/modules/main/redis/1.0.0/module.yaml"
  workspace:
    name: my-workspace
    namespace: default
  config:
    version: "21.2.9"
    replicaCount: 3

Via UI

  1. Add the module repository in the UI
  2. Browse available modules
  3. Select module and version
  4. Configure options
  5. Deploy to workspace

Categories

  • cache: Caching solutions and in-memory data stores
  • database: Relational and NoSQL databases
  • messaging: Message queues and event streaming
  • storage: Object storage and file systems
  • monitoring: Observability, metrics, and logging

Contributing

  1. Fork the repository
  2. Create a new module following the structure above
  3. Test your module
  4. Submit a pull request

License

See LICENSE file for details.

About

Forkspacer modules library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •