Closed nxtcoder36 closed 2 weeks ago
This pull request implements the 'k3s up' and 'k3s down' commands, removes the Wireguard image, and makes several improvements to the existing codebase. The changes focus on enhancing the K3s server management, updating the authentication process, and refactoring some utility functions.
sequenceDiagram
participant User
participant UpCmd
participant FileClient
participant K3sClient
User->>UpCmd: Execute 'k3s up'
UpCmd->>FileClient: GetExtraData()
FileClient-->>UpCmd: Return ExtraData
UpCmd->>UpCmd: Check SelectedAccount
UpCmd->>K3sClient: NewClient()
K3sClient-->>UpCmd: Return K3sClient
UpCmd->>K3sClient: CreateClustersAccounts(selectedAccount)
K3sClient-->>UpCmd: Return result
UpCmd->>User: Display result
sequenceDiagram
participant User
participant DownCmd
participant DockerClient
User->>DownCmd: Execute 'k3s down'
DownCmd->>DockerClient: NewClientWithOpts()
DockerClient-->>DownCmd: Return DockerClient
DownCmd->>DockerClient: ContainerList()
DockerClient-->>DownCmd: Return container list
loop For each container
DownCmd->>DockerClient: ContainerStop()
DownCmd->>DockerClient: ContainerRemove()
end
DownCmd->>User: Display result
Change | Details | Files |
---|---|---|
Implementation of 'k3s up' and 'k3s down' commands |
|
cmd/k3s/up.go cmd/k3s/down.go clis/kl/loadsubs.go |
Removal of Wireguard image and related files |
|
wireguard/main.go wireguard/Taskfile.yml wireguard/healthcheck.sh |
Refactoring and improvements in K3s server management |
|
pkg/k3s/impl.go constants/main.go cmd/auth/logout.go |
Enhancement of account selection and management |
|
domain/fileclient/context.go cmd/use/account.go cmd/k3s/up.go |
Code cleanup and minor improvements |
|
pkg/k3s/impl.go cmd/auth/logout.go |
Summary by Sourcery
Implement new CLI commands to start and stop the k3s server, enhance container management with improved stop options, and clean up the codebase by removing obsolete wireguard files.
New Features:
Enhancements:
Chores: