Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ NicNodePolicy (await each), all remaining CRs in one batch (controllers
reconcile concurrently), then verify every manifest reached a terminal state.
Example workload manifests (`*example*`) are **not** applied by `l8k deploy` —
they're fixtures consumed by `l8k validate --connectivity` or
`l8k deploy --verify` for the data-plane phase. It auto-prefers
`l8k deploy --test-connectivity` for the data-plane phase. It auto-prefers
`<dir>/network-operator/` (the layout `l8k generate` produces) and falls back
to `<dir>` itself. `--dry-run` does a server-side dry run. `--deploy-timeout`
caps the whole apply+reconcile phase end-to-end (e.g. `--deploy-timeout 90m`);
without it, deploy polls indefinitely — right for SR-IOV on large clusters
where reconciliation can take an hour. `--verify` chains the connectivity
matrix straight after a successful apply.
where reconciliation can take an hour. `--test-connectivity` chains the
connectivity matrix straight after a successful apply.

Verify the deployment end-to-end:

Expand All @@ -262,7 +262,7 @@ a per-pair cross-rail canary. The matrix is on by default
(`--connectivity=false` to skip), runs concurrent pings capped at 16, and
cleans up the test DaemonSet unless `--keep` is set.

A self-contained HTML report lands at `<deployment-files>/verify-report.html`
A self-contained HTML report lands at `<deployment-files>/k8s-launch-kit-validation-report.html`
by default (override with `--report-path`, disable with `--report-path=-`).
The report has: header (l8k version, kubeconfig context, API-server version),
profile, **Node groups** (per-`clusterConfig[]` entry with east-west / north-
Expand Down
18 changes: 9 additions & 9 deletions pkg/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ var (
// until every manifest reaches a terminal state or the user
// cancels.
deployTimeout time.Duration
// deployVerify chains a `l8k validate --connectivity` run right
// after a successful deploy. Off by default; opt-in for
// deployTestConnectivity chains the data-plane connectivity
// matrix (the same one `l8k validate --connectivity` runs)
// right after a successful deploy. Off by default; opt-in for
// pipelines that want end-to-end verification in one command.
deployVerify bool
deployTestConnectivity bool
)

// DefaultDeploymentDir is the default directory `l8k generate` writes
Expand Down Expand Up @@ -148,7 +149,7 @@ is used as the manifest directory.`,
uiOutput.Success("Deployment completed")
}

if deployVerify && !dryRunFlag {
if deployTestConnectivity && !dryRunFlag {
// Pipeline the connectivity matrix straight after a
// successful apply. We deliberately do NOT re-run the
// version check here — deploy just landed manifests
Expand All @@ -157,16 +158,15 @@ is used as the manifest directory.`,
matrix, err := connectivity.RunMatrix(ctx, k8sClient, restConfig, uiOutput, connectivity.Options{
ManifestDir: manifestDir,
Timeout: 0, // RunMatrix defaults to 5m
PingCount: 0, // RunMatrix defaults to 3
})
if err != nil {
exitWithError(apperrors.NewClusterError(
"deploy succeeded but --verify failed",
"deploy succeeded but --test-connectivity failed",
err,
"Inspect the test DaemonSet via --keep + kubectl get pods",
), outputFormat)
}
if matrix != nil && (matrix.Summary.Failed > 0 || matrix.Summary.ExecErrors > 0) {
if matrix != nil && matrix.Summary.Failed > 0 {
exitWithError(apperrors.NewDeploymentError(
fmt.Sprintf("connectivity matrix failed: %d/%d passed", matrix.Summary.Passed, matrix.Summary.TotalTests),
nil,
Expand Down Expand Up @@ -201,11 +201,11 @@ func init() {
deployCmd.Flags().StringVar(&deploymentFiles, "deployment-files", DefaultDeploymentDir, "Directory containing the manifests to apply")
deployCmd.Flags().BoolVar(&dryRunFlag, "dry-run", false, "Preview the deployment via server-side dry-run without persisting changes")
deployCmd.Flags().DurationVar(&deployTimeout, "deploy-timeout", 0, "Maximum end-to-end wall-clock budget for the deploy phase (e.g. 45m, 2h). 0 (the default) means no deadline; the deploy polls until every manifest reaches a terminal state. Useful for matching a maintenance window when SR-IOV reconciliation on a large cluster can take an hour or more.")
deployCmd.Flags().BoolVar(&deployVerify, "verify", false, "After a successful deploy, run the connectivity matrix (apply example DaemonSet → wait Ready → ping matrix → cleanup) to verify the data plane end-to-end.")
deployCmd.Flags().BoolVar(&deployTestConnectivity, "test-connectivity", false, "After a successful deploy, run the connectivity matrix (apply example DaemonSet → wait Ready → RDMA matrix → cleanup) to verify the data plane end-to-end.")

setFlagGroup(deployCmd, "kubeconfig", GroupCommon)
setFlagGroup(deployCmd, "deployment-files", GroupGeneration)
setFlagGroup(deployCmd, "deploy-timeout", GroupDeploy)
setFlagGroup(deployCmd, "dry-run", GroupDeploy)
setFlagGroup(deployCmd, "verify", GroupDeploy)
setFlagGroup(deployCmd, "test-connectivity", GroupDeploy)
}
Loading
Loading