Skip to content

Let every bundled preset publish extra ports and autofill its host port#708

Merged
geodro merged 1 commit into
mainfrom
fix/preset-extra-ports
Jul 1, 2026
Merged

Let every bundled preset publish extra ports and autofill its host port#708
geodro merged 1 commit into
mainfrom
fix/preset-extra-ports

Conversation

@geodro

@geodro geodro commented Jul 1, 2026

Copy link
Copy Markdown
Member

The ports manager treated a service as built-in only when its preset carried default: true, but that flag means part of the default stack we start automatically, not provided by lerd. Optional presets we also ship, gotenberg being the obvious one, fell outside the gate, so their ports modal showed an empty published-port field and refused to add extra ports even though we own them.

The gate now keys off preset ownership rather than default-stack membership. PresetPorts resolves the declared ports for any bundled preset, ServiceExtraPorts exposes the recorded extra mappings, and the extra-ports application moved into EnsureCustomServiceQuadlet, the single choke point every service quadlet passes through, so the default-preset and materialised-preset paths behave identically instead of the preset path appending them itself. SetExtraPorts and the Web UI expose handler both gate on PresetExists now, and the services API surfaces a preset_owned flag plus the port fields for optional presets, which materialise as custom services and so are built through the custom-services path rather than the default-preset one. The modal reads preset_owned for the extra-ports affordance and leaves is_default to the delete and reinstall confirmations that legitimately mean default stack.

Refs #707

The ports manager treated a service as built-in only when its preset carried default: true, but that flag means part of the default stack we start automatically, not provided by lerd. Optional presets we also ship, gotenberg being the obvious one, fell outside the gate, so their ports modal showed an empty published-port field and refused to add extra ports even though we own them.

The gate now keys off preset ownership rather than default-stack membership. PresetPorts resolves the declared ports for any bundled preset, ServiceExtraPorts exposes the recorded extra mappings, and the extra-ports application moved into EnsureCustomServiceQuadlet, the single choke point every service quadlet passes through, so the default-preset and materialised-preset paths behave identically instead of the preset path appending them itself. SetExtraPorts and the Web UI expose handler both gate on PresetExists now, and the services API surfaces a preset_owned flag plus the port fields for optional presets, which materialise as custom services and so are built through the custom-services path rather than the default-preset one. The modal reads preset_owned for the extra-ports affordance and leaves is_default to the delete and reinstall confirmations that legitimately mean default stack.

Refs #707
@geodro geodro merged commit 42410a3 into main Jul 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant