Files
herolib/lib/installers/k8s/cryptpad/README.md
Mahmoud-Emad 44c8793074 refactor: Update cryptpad installer code
- Use installer.kube_client for Kubernetes operations
- Remove redundant startupmanager calls
- Simplify `delete_resource` command
- Add default values for installer name and hostname
- Refactor `get` function to use new arguments correctly
- Remove commented out example code and unused imports
- Change the factory file<REQUIRED> to load the default instance name
- Update the README file of the installer

Co-authored-by: peternahaaat <peternashaaat@gmail.com>
2025-11-02 13:37:38 +02:00

1.3 KiB

CryptPad Kubernetes Installer

A Kubernetes installer for CryptPad with TFGrid Gateway integration.

Quick Start

import incubaid.herolib.installers.k8s.cryptpad

// Create and install CryptPad
mut installer := cryptpad.get(
    name:   'mycryptpad'
    create: true
)!

installer.install()!

to change the hostname and the namespace, you can override the default values:

mut installer := cryptpad.get(
    name:   'mycryptpad'
    create: true
)!

installer.hostname = 'customhostname'
installer.namespace = 'customnamespace'
installer.install()!

Usage

Create an Instance

mut installer := cryptpad.get(
    name:   'mycryptpad'  // Unique name for this instance
    create: true          // Create if doesn't exist
)!

The instance name will be used as:

  • Kubernetes namespace name
  • Hostname prefix (e.g., mycryptpad.gent01.grid.tf)

Install

installer.install()!

This will:

  1. Generate Kubernetes YAML files for CryptPad and TFGrid Gateway
  2. Apply them to your k3s cluster
  3. Wait for deployment to be ready

Destroy

installer.destroy()!

Removes all CryptPad resources from the cluster.

Requirements

  • kubectl installed and configured
  • k3s cluster running
  • Redis server running (for configuration storage)