Merge branch 'development_gitea_installer' into development_nile_installers

* development_gitea_installer:
  feat: Add PostgreSQL support for Gitea installer
  feat: Add Gitea Kubernetes installer
This commit is contained in:
2025-11-25 18:39:42 +01:00
10 changed files with 992 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
cryptpad
element_chat
element_chat
gitea

View File

@@ -0,0 +1,44 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import incubaid.herolib.installers.k8s.gitea
// This example demonstrates how to use the Gitea installer.
// 1. Create a new installer instance with a specific hostname.
// Replace 'mygitea' with your desired hostname.
// Note: Use only alphanumeric characters (no underscores or dashes).
mut installer := gitea.get(
name: 'kristof'
create: true
)!
// 2. Configure the installer (all settings are optional with sensible defaults)
// installer.hostname = 'giteaapp' // Default: 'giteaapp'
// installer.namespace = 'forge' // Default: 'forge'
// // Gitea server configuration
// installer.http_port = 3000 // Default: 3000
// installer.disable_registration = false // Default: false (allow new user registration)
// // Database configuration - Option 1: SQLite (default)
// installer.db_type = 'sqlite3' // Default: 'sqlite3'
// installer.db_path = '/data/gitea/gitea.db' // Default: '/data/gitea/gitea.db'
// // Database configuration - Option 2: PostgreSQL
// // When using postgres, a PostgreSQL pod will be automatically deployed
installer.db_type = 'postgres' // Use PostgreSQL instead of SQLite
installer.db_host = 'postgres' // Default: 'postgres' (PostgreSQL service name)
installer.db_name = 'gitea' // Default: 'gitea' (database name)
installer.db_user = 'gitea' // Default: 'gitea' (database user)
installer.db_password = 'gitea' // Default: 'gitea' (database password)
installer.storage_size = '5Gi' // Default: '5Gi' (PVC storage size)
// 3. Install Gitea.
// This will generate the necessary Kubernetes YAML files and apply them to your cluster.
installer.install()!
// println('Gitea installation started.')
// println('You can access it at: https://${installer.hostname}.gent01.grid.tf')
// 4. To destroy the deployment, you can run the following:
// installer.destroy()!