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>
This commit is contained in:
Mahmoud-Emad
2025-11-02 13:34:44 +02:00
parent 86549480b5
commit 44c8793074
14 changed files with 229 additions and 1081 deletions

View File

@@ -6,14 +6,18 @@ import incubaid.herolib.installers.k8s.cryptpad
// 1. Create a new installer instance with a specific hostname.
// Replace 'mycryptpad' with your desired hostname.
mut installer := cryptpad.new(hostname: 'omda')!
mut installer := cryptpad.get(
name: 'kristof'
create: true
)!
// 2. Install CryptPad.
// This will generate the necessary Kubernetes YAML files and apply them to your cluster.
installer.install()!
// installer.install()!
// cryptpad.delete()!
println('CryptPad installation started.')
println('You can access it at https://${installer.hostname}.gent01.grid.tf')
// println('CryptPad installation started.')
// println('You can access it at https://${installer.hostname}.gent01.grid.tf')
// 3. To destroy the deployment, you can run the following:
// installer.destroy()!
installer.destroy()!