refactor: Refactor Kubernetes client and CryptPad installer

- Replace kubectl exec calls with Kubernetes client methods
- Improve error handling and logging in Kubernetes client
- Enhance node information retrieval and parsing
- Add comprehensive unit tests for Kubernetes client and Node structs
- Refine YAML validation to allow custom resource definitions
- Update CryptPad installer to use the refactored Kubernetes client
This commit is contained in:
Mahmoud-Emad
2025-10-30 17:58:03 +03:00
parent 82d37374d8
commit 80108d4b36
10 changed files with 817 additions and 74 deletions

1
examples/installers/k8s/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
cryptpad

View File

@@ -6,7 +6,7 @@ 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: 'mycryptpadtes2222tt')!
mut installer := cryptpad.new(hostname: 'omda')!
// 2. Install CryptPad.
// This will generate the necessary Kubernetes YAML files and apply them to your cluster.
@@ -16,4 +16,4 @@ 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()!