Closed nxtcoder36 closed 2 weeks ago
This pull request implements a deployment tracker for the Kloudlite system. It introduces a new K3s tracker component that monitors the status of various deployments and services, and updates a status file. The changes also include modifications to existing commands and utilities to work with this new tracking system.
sequenceDiagram
participant Main
participant KubeClient
participant File
Main->>KubeClient: connectConfig()
KubeClient-->>Main: rest.Config
Main->>KubeClient: kubeClient()
KubeClient-->>Main: kubernetes.Clientset
loop every second
Main->>KubeClient: checkDeploymentReady()
KubeClient-->>Main: bool
Main->>KubeClient: grabServiceIP()
KubeClient-->>Main: string
Main->>File: Write status to file
end
classDiagram
class k3sTracker {
bool Compute
bool Gateway
string DeviceRouterIP
string LastCheckedAt
}
class fileclient {
+GetK3sTracker() k3sTracker
}
class apiClient {
+InterceptApp(app, status, ports, envName, options)
}
fileclient --> k3sTracker
apiClient --> fileclient
class main {
+connectConfig() rest.Config
+kubeClient() kubernetes.Clientset
+checkDeploymentReady(ctx, k, namespace, name) bool
+grabServiceIP(ctx, k, namespace, name) string
}
main --> k3sTracker
Change | Details | Files |
---|---|---|
Implement K3s tracker for deployment status monitoring |
|
pkg/k3s/k3s-tracker/main.go pkg/k3s/k3s-tracker/go.mod pkg/k3s/k3s-tracker/Runfile.yml |
Update status command to use K3s tracker information |
|
cmd/status/status.go |
Refactor connect command and improve error handling |
|
cmd/connect/connect.go cmd/box/boxpkg/utils.go |
Update intercept functionality to use K3s tracker information |
|
domain/apiclient/app.go |
Enhance file client with K3s tracker support |
|
domain/fileclient/context.go domain/fileclient/main.go |
Update dependencies and configurations |
|
go.mod |
Summary by Sourcery
Introduce a deployment tracker to monitor k3s server readiness, enhance status and connection commands to utilize the tracker, and add a build process for the k3s-tracker tool.
New Features:
Enhancements:
Build: