ui(deploy): remove Exposed Ports field from Resources tab
The field was cosmetic — `containerConfig.exposedPorts` only fed Docker's `Config.ExposedPorts` metadata via `withExposedPorts(...)`. It never published a host port and Traefik routing uses `appPort` from the label builder, not this list. Users reading the label "Exposed Ports" reasonably expected it to expose their port externally; removing it until real multi-port Traefik routing lands (tracked in #149). Backend DTOs (`ContainerRequest.exposedPorts`, `ConfigMerger.intList ("exposedPorts")`) are left in place so existing containerConfig JSONB rows continue to deserialize. New writes from the UI will no longer include the field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,6 @@ export interface ResourcesFormState {
|
||||
memoryReserve: string;
|
||||
cpuRequest: string;
|
||||
cpuLimit: string;
|
||||
ports: number[];
|
||||
appPort: string;
|
||||
replicas: string;
|
||||
deployStrategy: string;
|
||||
@@ -66,7 +65,7 @@ export const defaultForm: DeploymentPageFormState = {
|
||||
},
|
||||
resources: {
|
||||
memoryLimit: '512', memoryReserve: '', cpuRequest: '500', cpuLimit: '',
|
||||
ports: [], appPort: '8080', replicas: '1', deployStrategy: 'blue-green',
|
||||
appPort: '8080', replicas: '1', deployStrategy: 'blue-green',
|
||||
stripPrefix: true, sslOffloading: true, runtimeType: 'auto', customArgs: '',
|
||||
extraNetworks: [],
|
||||
},
|
||||
@@ -108,7 +107,6 @@ export function useDeploymentPageState(
|
||||
memoryReserve: merged.memoryReserveMb != null ? String(merged.memoryReserveMb) : defaultForm.resources.memoryReserve,
|
||||
cpuRequest: String(merged.cpuRequest ?? defaultForm.resources.cpuRequest),
|
||||
cpuLimit: merged.cpuLimit != null ? String(merged.cpuLimit) : defaultForm.resources.cpuLimit,
|
||||
ports: Array.isArray(merged.exposedPorts) ? (merged.exposedPorts as number[]) : defaultForm.resources.ports,
|
||||
appPort: String(merged.appPort ?? defaultForm.resources.appPort),
|
||||
replicas: String(merged.replicas ?? defaultForm.resources.replicas),
|
||||
deployStrategy: String(merged.deploymentStrategy ?? defaultForm.resources.deployStrategy),
|
||||
|
||||
Reference in New Issue
Block a user