Vdi port ranges and hooks#137
Open
vk2amv wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds VDI container lifecycle hooks and optional host port range control.
This change lets operators configure a bounded localhost port range for Docker-published VDI RDP ports. When configured, Rustguac selects ports from the specified inclusive range instead of asking Docker for an arbitrary random port. Existing containers whose mapped RDP port falls outside the configured range are replaced so the setting is consistently enforced.
It also adds an optional VDI container hook script. When configured, Rustguac calls the hook after it has inspected the container and learned the mapped RDP port, but before it begins readiness checks. The hook is called again before container removal. This gives deployments a supported way to run external preparation and cleanup logic around the container’s mapped RDP endpoint.
New [vdi] options:
port_range_start = 39000
port_range_end = 39999
container_hook_script = "/opt/rustguac/vdi-container-hook.sh"
container_hook_timeout_secs = 10
Hook invocation format:
<script> up <script> down The hook also receives equivalent environment variables: RUSTGUAC_VDI_HOOK_ACTION RUSTGUAC_VDI_PORT RUSTGUAC_VDI_CONTAINER_ID RUSTGUAC_VDI_CONTAINER_NAME