Add apply --server-side and template --live #118
Draft
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.
Summary
This PR introduces two new optional features for improved CLI UX when working with Conduktor Console (requires console-plus#4510 to be released first). No breaking changes - all existing commands and flags continue to work exactly as before.
Demo: https://asciinema.org/a/dsoXluaQjn7CCqn7raknaRzIv
Why Move Logic to the Server?
New Features
Server-Side Apply (
--server-side)Instead of applying resources one-by-one from the client,
--server-sidesends all resources in a single HTTP request and polls for status updates.Benefits:
New flags:
--server-side: Enable server-side processing--strategy:fail-fast(default) orcontinue-on-error--no-progress: Disable live progress (useful for CI)--yes: Skip confirmation for large operations (50+ resources)Exit codes:
0: All resources applied successfully1: All resources failed (or error occurred)2: Partial success (some succeeded, some failed)Live Templates (
--live)Fetch templates directly from the Console server instead of using embedded defaults.
Benefits:
--cluster(e.g., VirtualCluster, Interceptor, GatewayServiceAccount)Backward Compatibility
apply -f file.yaml--server-sideopts into server processingtemplate Topic--liveopts into server templatesAPI Endpoints Used
POST /public/v1/resources/batch-apply- Submit resources for server-side applyGET /public/v1/resources/batch-apply/{token}- Poll for apply statusGET /public/v1/resources/template- List available template kindsGET /public/v1/resources/template/{kind}- Get template for specific kind