feat: Implement Kubernetes client and example
- Add Kubernetes client module for interacting with kubectl - Implement methods to get cluster info, pods, deployments, and services - Create a Kubernetes example script demonstrating client usage - Add JSON response structs for parsing kubectl output - Define runtime resource structs (Pod, Deployment, Service) for structured data - Include comprehensive unit tests for data structures and client logic
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
module kubernetes
|
||||
|
||||
import incubaid.herolib.data.paramsparser
|
||||
import incubaid.herolib.data.encoderhero
|
||||
import os
|
||||
|
||||
pub const version = '0.0.0'
|
||||
const singleton = false
|
||||
@@ -12,9 +10,9 @@ const default = true
|
||||
pub struct KubeClient {
|
||||
pub mut:
|
||||
name string = 'default'
|
||||
kubeconfig_path string
|
||||
config KubeConfig
|
||||
connected bool
|
||||
kubeconfig_path string // Path to kubeconfig file
|
||||
config KubeConfig // Kubernetes configuration
|
||||
connected bool // Connection status
|
||||
api_version string = 'v1'
|
||||
cache_enabled bool = true
|
||||
cache_ttl_seconds int = 300
|
||||
|
||||
Reference in New Issue
Block a user