render

package
v0.1.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

workflow_render implements the "ncrectl workflow render" subcommand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEmbeddedNodes

func LoadEmbeddedNodes(platform, gpuArch string) ([]corev1.Node, error)

LoadEmbeddedNodes loads a mock node from the embedded YAML templates for the given platform and GPU architecture combination.

func NewK8sClient

func NewK8sClient(cf *kubeconfig.ConfigFlags) (client.Client, error)

NewK8sClient builds a controller-runtime client from the resolved ConfigFlags (kubeconfig, context, and every other kubectl-standard connection/auth flag).

func NewK8sWatchClient

func NewK8sWatchClient(cf *kubeconfig.ConfigFlags) (client.WithWatch, error)

NewK8sWatchClient builds a watch-capable controller-runtime client from the resolved ConfigFlags.

func NewWorkflowCommand

func NewWorkflowCommand() *cobra.Command

NewWorkflowCommand returns the "workflow" parent cobra command with the "render" subcommand attached. This was previously newWorkflowCommand in root.go.

func PrintDryRunSummary

func PrintDryRunSummary(header string, results []DryRunResult)

PrintDryRunSummary writes a human-readable summary table to stderr. Output goes to stderr so that YAML on stdout remains pipeable.

func ResolveWorkflow

func ResolveWorkflow(workflow *burninv1alpha1.Workflow, nodes []corev1.Node) (*renderMetadata, error)

ResolveWorkflow applies overrides to a Workflow in-place and returns detection metadata. The workflow's spec is mutated directly.

func SetRenderAnnotations

func SetRenderAnnotations(workflow *burninv1alpha1.Workflow, meta *renderMetadata)

SetRenderAnnotations stores detection metadata as annotations on the Workflow.

func SyntheticProviderID

func SyntheticProviderID(platform string) string

SyntheticProviderID returns a providerID prefix that detectPlatform maps back to the given platform string. Used for offline rendering.

Types

type DryRunResult

type DryRunResult struct {
	Resource string `json:"resource"`
	Valid    bool   `json:"valid"`
	Error    string `json:"error,omitempty"`
	Warning  string `json:"warning,omitempty"`
}

DryRunResult records the outcome of validating a single resource via server-side dry-run.

func DryRunCreate

func DryRunCreate(ctx context.Context, c client.Client, namespace string,
	spec *burninv1alpha1.WorkflowSpec, nodes []corev1.Node) ([]DryRunResult, error)

DryRunCreate validates the resolved Job, workload, and dependencies via server-side dry-run without persisting anything.

Validation order: Dependencies → Job → Workload. Dependencies are validated first so that we can detect when a workload failure is caused by a missing dependency that would be created at runtime (e.g. a TrainingRuntime referenced by a TrainJob). Such failures are reported as warnings rather than errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL