Closed nxtcoder36 closed 2 weeks ago
This pull request updates the k3s app creation process to expose different ports based on the environment (development or production). The main change is in the CreateClustersAccounts
function, where the container creation logic is now split into two separate code paths depending on whether the application is running in development mode or not.
sequenceDiagram
participant Dev as Development Environment
participant Prod as Production Environment
participant Client as Client
participant Container as Container
Client->>Dev: Check if in development mode
alt Development Mode
Dev->>Container: Create container with ports 6443/tcp and 33820/udp
else Production Mode
Prod->>Container: Create container with port 33820/udp
end
Container->>Client: Return container creation response
Client->>Container: Start container
Change | Details | Files |
---|---|---|
Implement environment-specific container creation |
|
pkg/k3s/impl.go |
Refactor container creation logic |
|
pkg/k3s/impl.go |
Summary by Sourcery
Enhance the container creation process by conditionally exposing ports based on the development environment flag, ensuring appropriate port bindings for both development and production environments.
Enhancements: