Skip to content

Conversation

@Glitchy-Sheep
Copy link
Contributor

@Glitchy-Sheep Glitchy-Sheep commented Dec 17, 2025

Summary

Implemented:

✨ New Commands

  • d8 system module approve <module-release-name> <version>
    • Marks a pending release as approved for manual update policy.
  • d8 system module apply-now <module-release-name> <version>
    • Marks a pending release as apply-now for auto update policy with update-window.

💡 Smart Version Suggestions

When a specified version is not found, suggests the closest available versions.
(above and below) from pending, unapproved/unapplied releases.

🐚 Shell Autocompletion

Full support for module names and versions autocomplete with flexible prefix matching:

  • v1, 1, v1.2, 1.2 all resolve correctly and handled properly by the commands handler
  • Only suggests pending releases that haven't been approved/applied yet

🛡️ Safety Checks

  • Prevents re-approving already approved releases (or non pending)
  • Prevents re-applying already apply-now-ed releases (or non pending)
  • Clear error messages for all edge cases

➕ Also

  • A little refactoring of the surrounding commands / functions (DRY, Logic Flow)

Usage

d8 system module approve

image image

d8 system module apply-now

image image

…nt setup.

Removed redundant kubeconfig and context handling from individual commands, centralizing the logic in operatemodule.

Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Introduced the following features:
- apply-now with autocomplete of module name and version
- approve with autocomplete of module name and version
- smart suggesting of suitable module releases in case of user mistyping
- smart fool-proof approve/apply (can't be used more than once and on non-pending releases)

Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
@Glitchy-Sheep Glitchy-Sheep self-assigned this Dec 17, 2025
@Glitchy-Sheep Glitchy-Sheep added the enhancement New feature or request label Dec 17, 2025
Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
@ldmonster ldmonster changed the title Add approve / apply-now commands for module releases [deckhouse-cli] Add approve / apply-now commands for module releases Dec 18, 2025
@ldmonster ldmonster changed the title [deckhouse-cli] Add approve / apply-now commands for module releases [deckhouse-cli] system: Add approve / apply-now commands for module releases Dec 18, 2025
@ldmonster ldmonster merged commit ad14e6d into main Dec 18, 2025
4 checks passed
@ldmonster ldmonster deleted the feature/add-module-release-approve-mechanism branch December 18, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants