provisioning-core/nulib/cli/fastpath/prov-cluster-deploy.nu

26 lines
1.2 KiB
Text
Raw Permalink Normal View History

#!/usr/bin/env nu
# Standalone cluster-deploy runner — bypasses the dispatcher.
# Loads only the modules needed for L3/L4 cluster extension deployment.
#
# Usage (from provisioning/ dir):
# nu core/nulib/scripts/prov-cluster-deploy.nu platform sgoyol -w librecloud_renew --dry-run
# nu core/nulib/scripts/prov-cluster-deploy.nu apps sgoyol -w librecloud_renew
use orchestration/cluster_deploy.nu *
use platform/user/config.nu [get-workspace-path, get-active-workspace-details]
use domain/workspace/mod.nu *
def main [
layer: string # Deployment layer: platform | apps
cluster: string # Cluster name (e.g. sgoyol)
--workspace (-w): string # Workspace name (default: active workspace)
--dry-run (-n) # Print plan without executing install scripts
--kubeconfig (-k): string # Override KUBECONFIG path
--secrets-file (-s): string # SOPS-encrypted dotenv file with install secrets
] {
let ws = ($workspace | default "")
let kc = ($kubeconfig | default "")
let sf = ($secrets_file | default "")
main cluster deploy $layer $cluster --workspace $ws --dry-run=$dry_run --kubeconfig $kc --secrets-file $sf
}