Documentation
¶
Index ¶
- func NormalizePlatform(raw string) (string, error)
- type CheckHost
- type ClusterCheck
- type ClusterCheckFileCheck
- type ClusterCheckKubeSystem
- type ClusterCheckNodes
- type ClusterCheckReadyPrefixMinimum
- type ClusterCheckReports
- type ClusterCheckVersions
- type Command
- type ConfigureRepository
- type Confirm
- type ContainerdConfigSetting
- type ContainerdRegistryHost
- type CopyFile
- type CreateSymlink
- type DownloadFile
- type DownloadFileItem
- type DownloadImage
- type DownloadPackage
- type DownloadPackageBackend
- type DownloadPackageDistro
- type DownloadPackageRepo
- type DownloadPackageRepoModule
- type EditFile
- type EditFileRule
- type EditJSON
- type EditTOML
- type EditYAML
- type EnsureDirectory
- type ExtractArchive
- type FileBundleRef
- type FileFetch
- type FileFetchSource
- type FileSource
- type ImageAuth
- type ImageAuthBasic
- type ImageBackend
- type ImagePlatform
- type Input
- type InstallAptPackage
- type InstallAptPackageOptions
- type InstallDnfPackage
- type InstallDnfPackageOptions
- type InstallPackage
- type InstallPackageManager
- type InstallPackageSource
- type KernelModule
- type KubeadmInit
- type KubeadmJoin
- type KubeadmReset
- type KubeadmUpgrade
- type LoadImage
- type ManageService
- type Message
- type PackagePlatform
- type RefreshRepository
- type RepositoryEntry
- type StructuredEdit
- type Swap
- type Sysctl
- type VerifyImage
- type Wait
- type WriteContainerdConfig
- type WriteContainerdRegistryHosts
- type WriteFile
- type WriteSystemdUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizePlatform ¶ added in v0.2.5
Types ¶
type CheckHost ¶
type CheckHost struct {
// Named checks to run against the local host.
// @deck.example [os,arch,swap]
Checks []string `json:"checks"`
// Binary names to verify are present in `PATH`.
// @deck.example [kubeadm,kubelet,kubectl]
Binaries []string `json:"binaries"`
// Stop on the first failing check rather than running all checks.
// @deck.example true
FailFast *bool `json:"failFast"`
}
type ClusterCheck ¶
type ClusterCheck struct {
// Kubeconfig path used for kubectl-based checks.
// @deck.example /etc/kubernetes/admin.conf
Kubeconfig string `json:"kubeconfig"`
// Duration between poll attempts while waiting for cluster state to converge.
// @deck.example 5s
Interval string `json:"interval"`
// Optional delay before the first poll attempt.
// @deck.example 10s
InitialDelay string `json:"initialDelay"`
// Maximum total duration to keep polling before the step fails.
// @deck.example 10m
Timeout string `json:"timeout"`
// Optional checks for cluster node count and readiness.
// @deck.example {total:1,ready:1,controlPlaneReady:1}
Nodes ClusterCheckNodes `json:"nodes"`
// Optional checks for Kubernetes component versions.
// @deck.example {server:v1.31.0,kubelet:v1.31.0}
Versions ClusterCheckVersions `json:"versions"`
// Optional checks for kube-system pod readiness.
// @deck.example {readyNames:[etcd-control-plane]}
KubeSystem ClusterCheckKubeSystem `json:"kubeSystem"`
// Optional file-content assertions evaluated on every poll attempt.
// @deck.example [{path:/etc/containerd/config.toml,contains:[registry.k8s.io/pause:3.10]}]
FileChecks []ClusterCheckFileCheck `json:"fileAssertions"`
// Optional paths for writing node and cluster state reports.
// @deck.example {nodesPath:/tmp/deck/reports/bootstrap-nodes.txt}
Reports ClusterCheckReports `json:"reports"`
}
Poll and verify Kubernetes cluster health on the local node. @deck.when Use this for typed bootstrap and upgrade verification instead of ad-hoc kubectl shell loops. @deck.example kind: CheckKubernetesCluster spec:
interval: 5s nodes: total: 1 ready: 1 controlPlaneReady: 1 reports: nodesPath: /tmp/deck/reports/bootstrap-nodes.txt
type ClusterCheckFileCheck ¶
type ClusterCheckFileCheck struct {
// Path of the local file whose content should be checked.
// @deck.example /etc/containerd/config.toml
Path string `json:"path"`
// Strings that must all be present in the file content.
// @deck.example [registry.k8s.io/pause:3.10]
Contains []string `json:"contains"`
}
type ClusterCheckKubeSystem ¶
type ClusterCheckKubeSystem struct {
// Exact kube-system pod names that must be present and fully Ready.
// @deck.example [etcd-control-plane,kube-apiserver-control-plane]
ReadyNames []string `json:"readyNames"`
// Pod-name prefixes for which at least one matching Ready pod must exist.
// @deck.example [kube-proxy-]
ReadyPrefixes []string `json:"readyPrefixes"`
// Prefix-based readiness requirements with minimum Ready pod counts.
// @deck.example [{prefix:coredns-,minReady:2}]
ReadyPrefixMinimums []ClusterCheckReadyPrefixMinimum `json:"readyPrefixMinimums"`
// Optional text report path for `kubectl get pods -n kube-system`.
// @deck.example /tmp/deck/reports/kube-system-pods.txt
ReportPath string `json:"reportPath"`
// Optional JSON report path for `kubectl get pods -n kube-system -o json`.
// @deck.example /tmp/deck/reports/kube-system-pods.json
JSONReportPath string `json:"jsonReportPath"`
}
type ClusterCheckNodes ¶
type ClusterCheckNodes struct {
// Expected total node count returned by `kubectl get nodes`.
// @deck.example 1
Total *int `json:"total"`
// Expected count of Ready nodes.
// @deck.example 1
Ready *int `json:"ready"`
// Expected count of Ready control-plane nodes.
// @deck.example 1
ControlPlaneReady *int `json:"controlPlaneReady"`
}
type ClusterCheckReports ¶
type ClusterCheckReports struct {
// Optional report file path for `kubectl get nodes` output.
// @deck.example /tmp/deck/reports/bootstrap-nodes.txt
NodesPath string `json:"nodesPath"`
// Optional second node report path for shared cluster node reports.
// @deck.example /tmp/deck/reports/cluster-nodes.txt
ClusterNodesPath string `json:"clusterNodesPath"`
}
type ClusterCheckVersions ¶
type ClusterCheckVersions struct {
// Target Kubernetes version written into the optional version report file.
// @deck.example v1.31.0
TargetVersion string `json:"targetVersion"`
// Expected API server version from `kubectl version -o json`.
// @deck.example v1.31.0
Server string `json:"server"`
// Expected kubelet version for the selected node.
// @deck.example v1.31.0
Kubelet string `json:"kubelet"`
// Expected local kubeadm version from `kubeadm version -o short`.
// @deck.example v1.31.0
Kubeadm string `json:"kubeadm"`
// Node name used when reading kubelet version.
// @deck.example control-plane
NodeName string `json:"nodeName"`
// Optional report file that records target, server, kubelet, and kubeadm versions.
// @deck.example /tmp/deck/reports/upgrade-version.txt
ReportPath string `json:"reportPath"`
}
type Command ¶
type Command struct {
// Command vector to execute. The first element is the binary and the rest are arguments.
// @deck.example [systemctl,restart,containerd]
Command []string `json:"command"`
// Additional environment variables passed to the command process as key-value pairs.
// @deck.example {KUBECONFIG:/etc/kubernetes/admin.conf}
Env map[string]string `json:"env"`
// Prepend `sudo` before the command vector. Defaults to `false`.
// @deck.example false
Sudo bool `json:"sudo"`
// Maximum duration for the command before it is killed. Overrides the step-level `timeout`.
// @deck.example 30s
Timeout string `json:"timeout"`
}
Run a narrowly scoped host command when no typed step models the action. @deck.when Use this only as an escape hatch for vendor tools, custom probes, or one-off local commands that do not map cleanly to an existing typed step. @deck.note Do not use `Command` for service management, directory creation, file copy, sysctl changes, swap control, kernel modules, archive extraction, or symlink creation when the typed steps already cover those actions. @deck.note Prefer a direct command vector over `sh -c` unless shell syntax is truly required. @deck.note Keep command steps small, explicit, and bounded with `spec.timeout`. @deck.example kind: Command spec:
command: [/opt/vendor/bin/node-health, --quick] timeout: 30s
type ConfigureRepository ¶
type ConfigureRepository struct {
// Repository file format to write.
// @deck.example deb
Format string `json:"format"`
// Explicit output path for the generated repository file.
// @deck.example /etc/apt/sources.list.d/offline.list
Path string `json:"path"`
// File permissions applied to the generated repository file.
// @deck.example 0644
Mode string `json:"mode"`
// Replace an existing repository file at the target path.
// @deck.example true
ReplaceExisting bool `json:"replaceExisting"`
// Disable all existing repository definitions before writing the new one.
// @deck.example true
DisableExisting bool `json:"disableExisting"`
// Paths to back up before modifying.
// @deck.example [/etc/apt/sources.list]
BackupPaths []string `json:"backupPaths"`
// Paths to remove before writing the new definition.
// @deck.example [/etc/apt/sources.list.d/ubuntu.list]
CleanupPaths []string `json:"cleanupPaths"`
// Repository entries to write.
// @deck.example [{baseurl:http://repo.local/debian,trusted:true}]
Repositories []RepositoryEntry `json:"repositories"`
}
Write deb or rpm repository definitions. @deck.when Use this before refreshing caches or installing packages from a local mirror. @deck.note Keep repository definitions mirror-specific rather than mutating the host's default online sources. @deck.example kind: ConfigureRepository spec:
format: deb
path: /etc/apt/sources.list.d/offline.list
repositories:
- baseurl: http://repo.local/debian
trusted: true
type Confirm ¶ added in v0.2.9
type Confirm struct {
// Prompt shown to the local operator.
// @deck.example Continue with kubeadm init?
Message string `json:"message"`
// Default answer used for empty input and required in non-interactive mode.
// @deck.example false
Default *bool `json:"default"`
// Behavior when the operator answers no. Defaults to `fail`.
// @deck.example continue
OnNo string `json:"onNo"`
}
Ask the local operator for a yes/no decision. @deck.when Use this as an explicit operator gate before a destructive or environment-specific action, or register the decision for later branching. @deck.note `Confirm` records no implicit global value. Use `register` when later steps need the decision. @deck.note In non-interactive mode, `Confirm` requires `spec.default`. @deck.example kind: Confirm register:
doReset: confirmed
spec:
message: Reset existing cluster state? default: false onNo: continue
type ContainerdConfigSetting ¶
type ContainerdConfigSetting struct {
// Edit operation.
// @deck.example set
Op string `json:"op"`
// Optional logical containerd config key.
// @deck.example runtime.runtimes.runc.options.SystemdCgroup
Key string `json:"key"`
// Optional direct TOML path for advanced use cases.
// @deck.example plugins."io.containerd.grpc.v1.cri".registry.config_path
RawPath string `json:"rawPath"`
// Typed value for the edit.
// @deck.example true
Value any `json:"value,omitempty"`
}
type ContainerdRegistryHost ¶
type ContainerdRegistryHost struct {
// Registry namespace whose `hosts.toml` file will be written.
// @deck.example registry.k8s.io
Registry string `json:"registry"`
// Upstream registry server URL recorded in the generated `hosts.toml` file.
// @deck.example https://registry.k8s.io
Server string `json:"server"`
// Mirror host URL that containerd should contact.
// @deck.example http://registry.local:5000
Host string `json:"host"`
// Capabilities granted to the mirror host.
// @deck.example [pull,resolve]
Capabilities []string `json:"capabilities"`
// Skip TLS verification for the mirror host.
// @deck.example true
SkipVerify bool `json:"skipVerify"`
}
type CopyFile ¶
type CopyFile struct {
// Structured source descriptor for the file to copy.
// @deck.example {path:/etc/kubernetes/admin.conf}
Source FileSource `json:"source"`
// Optional transport policy when the source must be fetched first.
// @deck.example {offlineOnly:true}
Fetch FileFetch `json:"fetch"`
// Destination path on the node.
// @deck.example /home/vagrant/.kube/config
Path string `json:"path"`
// File permissions in octal notation applied after the copy completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Copy a file from a declared source to a destination path. @deck.when Use this to place a prepared or local file at its final location on the node. @deck.note Use `source.path` for simple local paths and `source.bundle` or `source.url` when the source is structured or external. @deck.example kind: CopyFile spec:
source: path: /etc/kubernetes/admin.conf path: /home/vagrant/.kube/config mode: "0644"
type CreateSymlink ¶
type CreateSymlink struct {
// Path where the symbolic link will be created.
// @deck.example /usr/bin/runc
Path string `json:"path"`
// Path that the symbolic link points to.
// @deck.example /usr/local/sbin/runc
Target string `json:"target"`
// Remove an existing file or link at `path` before creating the new link.
// @deck.example true
Force bool `json:"force"`
// Create parent directories for `path` if needed.
// @deck.example true
CreateParent bool `json:"createParent"`
// Fail if `target` does not exist when the link is created.
// @deck.example true
RequireTarget bool `json:"requireTarget"`
// Treat a missing target as a no-op instead of an error.
// @deck.example true
IgnoreMissingTarget bool `json:"ignoreMissingTarget"`
}
Create or replace a symbolic link. @deck.when Use this when tools or runtimes expect a stable path alias. @deck.example kind: CreateSymlink spec:
path: /usr/bin/runc target: /usr/local/sbin/runc force: true
type DownloadFile ¶
type DownloadFile struct {
// Optional list form for batching multiple download items in one step.
// @deck.example [{source:{url:https://mirror.example.com/runc},outputPath:files/bin/runc,mode:0755}]
Items []DownloadFileItem `json:"items,omitempty"`
// Structured source descriptor for the download.
// @deck.example {url:https://mirror.example.com/runc,sha256:abc123...}
Source FileSource `json:"source"`
// Optional transport policy for the download.
// @deck.example {offlineOnly:true}
Fetch FileFetch `json:"fetch"`
// Bundle-relative output path for the downloaded artifact.
// @deck.example files/bin/runc
OutputPath string `json:"outputPath"`
// File permissions in octal notation applied after the download completes.
// @deck.example 0755
Mode string `json:"mode"`
// Optional per-transfer timeout for the download.
// @deck.example 30s
Timeout string `json:"timeout"`
}
Download a file into prepared bundle storage. @deck.when Use this during prepare to stage files into the bundle. @deck.note `DownloadFile` writes into bundle storage through `outputPath` rather than a node path. @deck.note Omit `outputPath` unless later steps need a stable custom bundle location. @deck.example kind: DownloadFile spec:
source: url: https://mirror.example.com/runc sha256: abc123... outputPath: files/bin/runc mode: "0755"
type DownloadFileItem ¶
type DownloadFileItem struct {
// Source descriptor for this item.
// @deck.example {url:https://mirror.example.com/runc}
Source FileSource `json:"source"`
// Optional transport policy for this item.
// @deck.example {offlineOnly:true}
Fetch FileFetch `json:"fetch"`
// Bundle-relative output path for this item.
// @deck.example files/bin/runc
OutputPath string `json:"outputPath"`
// File permissions applied after this item is written.
// @deck.example 0755
Mode string `json:"mode"`
}
type DownloadImage ¶
type DownloadImage struct {
// Fully qualified image references to download.
// @deck.example [registry.k8s.io/pause:3.9]
Images []string `json:"images"`
// Optional target platforms in os/arch or os/arch/variant form.
// @deck.example [linux/amd64,linux/arm64]
Platforms []ImagePlatform `json:"platforms"`
// Optional registry authentication entries used during download.
// @deck.example [{registry:registry.example.com,basic:{username:robot,password:${REGISTRY_PASSWORD}}}]
Auth []ImageAuth `json:"auth"`
// Backend-specific download settings.
// @deck.example {engine:go-containerregistry}
Backend ImageBackend `json:"backend"`
// Optional bundle-relative directory for per-image tar archives.
// @deck.example images/control-plane
OutputDir string `json:"outputDir"`
// Optional total timeout for the download step.
// @deck.example 10m
Timeout string `json:"timeout"`
}
Download container images into prepared bundle storage. @deck.when Use this during prepare to collect required images for offline use. @deck.note Omit `outputDir` unless you need a dedicated image subdirectory; deck writes to `images/` by default. @deck.note `spec.auth` is optional and only applies to `DownloadImage`. @deck.note Use `spec.platforms` to pull target platforms explicitly instead of relying on the download engine default. @deck.example kind: DownloadImage spec:
images:
- registry.k8s.io/kube-apiserver:v1.30.1
- registry.example.com/platform/pause:3.9
auth:
- registry: registry.example.com
basic:
username: "{{ .vars.registryUser }}"
password: "{{ .vars.registryPassword }}"
type DownloadPackage ¶
type DownloadPackage struct {
// Package names to download.
// @deck.example [kubelet,kubeadm,kubectl]
Packages []string `json:"packages"`
// Target container platform for package resolution in os/arch or os/arch/variant form.
// @deck.example linux/amd64
Platform PackagePlatform `json:"platform"`
// Target distribution hint used to select resolver behavior.
// @deck.example {family:rhel,release:rocky9}
Distro DownloadPackageDistro `json:"distro"`
// Repository settings applied before download.
// @deck.example {type:rpm,modules:[{name:container-tools,stream:4.0}]}
Repo DownloadPackageRepo `json:"repo"`
// Required container-based download backend configuration.
// @deck.example {mode:container,runtime:docker,image:rockylinux:9}
Backend DownloadPackageBackend `json:"backend"`
// Optional bundle-relative output directory for downloaded package artifacts.
// @deck.example packages/kubernetes
OutputDir string `json:"outputDir"`
// Maximum total duration for package download operations.
// @deck.example 30m
Timeout string `json:"timeout"`
}
Download packages into prepared bundle storage. @deck.when Use this during prepare to collect package-manager content for offline installation. @deck.note Omit `outputDir` unless you need a custom package location. @deck.note Use the same package list across `download` and `install` to keep offline parity. @deck.example kind: DownloadPackage spec:
packages: [podman]
distro:
family: rhel
release: rocky9
repo:
type: rpm
modules:
- name: container-tools
stream: "4.0"
backend:
mode: container
runtime: docker
image: rockylinux:9
type DownloadPackageBackend ¶
type DownloadPackageBackend struct {
// Download backend mode.
// @deck.example container
Mode string `json:"mode"`
// Preferred container runtime for the download helper container.
// @deck.example docker
Runtime string `json:"runtime"`
// Container image used for package resolution in download mode.
// @deck.example rockylinux:9
Image string `json:"image"`
}
type DownloadPackageDistro ¶
type DownloadPackageRepo ¶
type DownloadPackageRepo struct {
// Repository output type for download repo mode.
// @deck.example rpm
Type string `json:"type"`
// Generate repository metadata after collecting packages.
// @deck.example true
Generate bool `json:"generate"`
// Subdirectory under the generated repo root where packages are written.
// @deck.example pkgs
PkgsDir string `json:"pkgsDir"`
// RPM module streams to enable before resolving downloads.
// @deck.example [{name:container-tools,stream:4.0}]
Modules []DownloadPackageRepoModule `json:"modules"`
}
type EditFile ¶
type EditFile struct {
// File path to edit in place.
// @deck.example /etc/containerd/config.toml
Path string `json:"path"`
// Create a `.bak` copy before overwriting the original file.
// @deck.example true
Backup *bool `json:"backup"`
// Ordered match/replace rules applied sequentially.
// @deck.example [{match:SystemdCgroup = false,replaceWith:SystemdCgroup = true}]
Edits []EditFileRule `json:"edits"`
// File permissions in octal notation applied after the edit completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Edit an existing file in place using ordered match rules. @deck.when Use this for small in-place configuration edits when full file ownership is unnecessary. @deck.note Use `EditTOML`, `EditYAML`, or `EditJSON` when structured edits are available and less brittle. @deck.example kind: EditFile spec:
path: /etc/containerd/config.toml
edits:
- match: SystemdCgroup = false
replaceWith: SystemdCgroup = true
type EditFileRule ¶
type EditFileRule struct {
// Literal string or pattern to search for in the file.
// @deck.example SystemdCgroup = false
Match string `json:"match"`
// Replacement string applied where `match` is found.
// @deck.example SystemdCgroup = true
ReplaceWith string `json:"replaceWith"`
// Edit operation type. Defaults to `replace`.
// @deck.example replace
Op string `json:"op"`
}
type EditJSON ¶
type EditJSON struct {
// JSON file path to edit in place.
// @deck.example /etc/cni/net.d/10-custom.conflist
Path string `json:"path"`
// Create a new empty JSON object when the file does not exist.
// @deck.example true
CreateIfMissing *bool `json:"createIfMissing"`
// Ordered list of structured edits applied sequentially.
// @deck.example [{op:set,rawPath:plugins.0.type,value:bridge}]
Edits []StructuredEdit `json:"edits"`
// Optional file permissions to apply after the edit completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Edit a JSON file in place using structured path operations. @deck.when Use this when JSON configuration should be modified by path instead of full rewrites. @deck.example kind: EditJSON spec:
path: /etc/cni/net.d/10-custom.conflist
edits:
- op: set
rawPath: plugins.0.type
value: bridge
type EditTOML ¶
type EditTOML struct {
// TOML file path to edit in place.
// @deck.example /etc/containerd/config.toml
Path string `json:"path"`
// Create a new empty TOML document when the file does not exist.
// @deck.example true
CreateIfMissing *bool `json:"createIfMissing"`
// Ordered list of structured edits applied sequentially.
// @deck.example [{op:set,rawPath:plugins."io.containerd.grpc.v1.cri".registry.config_path,value:/etc/containerd/certs.d}]
Edits []StructuredEdit `json:"edits"`
// Optional file permissions to apply after the edit completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Edit a TOML file in place using structured path operations. @deck.when Use this when TOML configuration should be updated without brittle string replacement. @deck.note Use this for generic TOML editing when a domain-specific step is unnecessary. @deck.example kind: EditTOML spec:
path: /etc/containerd/config.toml
edits:
- op: set
rawPath: plugins."io.containerd.grpc.v1.cri".registry.config_path
value: /etc/containerd/certs.d
type EditYAML ¶
type EditYAML struct {
// YAML file path to edit in place.
// @deck.example /etc/kubernetes/kubeadm-config.yaml
Path string `json:"path"`
// Create a new empty YAML document when the file does not exist.
// @deck.example true
CreateIfMissing *bool `json:"createIfMissing"`
// Ordered list of structured edits applied sequentially.
// @deck.example [{op:set,rawPath:spec.template.spec.containers.0.image,value:registry.local/app:v1}]
Edits []StructuredEdit `json:"edits"`
// Optional file permissions to apply after the edit completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Edit a YAML file in place using structured path operations. @deck.when Use this for common map/list YAML updates where direct text replacement is too fragile. @deck.note Comment placement, anchors, aliases, merge keys, and style preservation are not guaranteed. @deck.example kind: EditYAML spec:
path: /etc/kubernetes/kubeadm-config.yaml
edits:
- op: set
rawPath: ClusterConfiguration.imageRepository
value: registry.local/k8s
type EnsureDirectory ¶
type EnsureDirectory struct {
// Directory path to create if it does not already exist.
// @deck.example /var/lib/deck
Path string `json:"path"`
// Directory permissions in octal notation.
// @deck.example 0755
Mode string `json:"mode"`
}
Ensure a directory exists with an optional mode. @deck.when Use this before writing files or placing extracted content. @deck.example kind: EnsureDirectory spec:
path: /home/vagrant/.kube mode: "0755"
type ExtractArchive ¶
type ExtractArchive struct {
// Structured source descriptor for the archive to extract.
// @deck.example {path:/tmp/cni-plugins.tgz}
Source FileSource `json:"source"`
// Optional transport policy when the archive must be fetched first.
// @deck.example {offlineOnly:true}
Fetch FileFetch `json:"fetch"`
// Destination directory on the node.
// @deck.example /opt/cni/bin
Path string `json:"path"`
// Optional archive members to extract.
// @deck.example [bridge,loopback]
Include []string `json:"include"`
// File permissions in octal notation applied to extracted files when supported.
// @deck.example 0755
Mode string `json:"mode"`
}
Extract an archive from a declared source into a destination directory. @deck.when Use this when prepared tarballs or local archives should be expanded onto the node. @deck.note Extract all members when `include` is omitted. @deck.example kind: ExtractArchive spec:
source: path: /tmp/cni-plugins.tgz path: /opt/cni/bin include: [bridge, loopback]
type FileBundleRef ¶
type FileFetch ¶
type FileFetch struct {
// Restrict fetches to offline-safe sources only.
// @deck.example true
OfflineOnly bool `json:"offlineOnly"`
// Ordered list of source candidates tried for the fetch.
// @deck.example [{type:url,url:https://mirror.example.com/runc}]
Sources []FileFetchSource `json:"sources"`
}
type FileFetchSource ¶
type FileFetchSource struct {
// Source selector type for multi-source fetches.
// @deck.example url
Type string `json:"type"`
// Local path source used when `type` is `path`.
// @deck.example /opt/cache/runc
Path string `json:"path"`
// Remote URL source used when `type` is `url`.
// @deck.example https://mirror.example.com/runc
URL string `json:"url"`
}
type FileSource ¶
type FileSource struct {
// URL to fetch the file from during prepare.
// @deck.example https://mirror.example.com/runc
URL string `json:"url"`
// Local filesystem path used as the source.
// @deck.example /opt/cache/runc
Path string `json:"path"`
// Expected SHA-256 checksum for the fetched or copied file.
// @deck.example abc123...
SHA256 string `json:"sha256"`
// Reference to a file already present in the bundle.
// @deck.example {root:files,path:bin/linux/amd64/runc}
Bundle *FileBundleRef `json:"bundle"`
}
type ImageAuth ¶
type ImageAuth struct {
// Registry host matched against each image reference.
// @deck.example registry.example.com
Registry string `json:"registry"`
// Explicit basic-auth credentials used for the matched registry.
// @deck.example {username:robot,password:${REGISTRY_PASSWORD}}
Basic ImageAuthBasic `json:"basic"`
}
type ImageAuthBasic ¶
type ImageBackend ¶
type ImageBackend struct {
// Image download engine implementation.
// @deck.example go-containerregistry
Engine string `json:"engine"`
}
type ImagePlatform ¶ added in v0.2.5
type ImagePlatform string
type Input ¶ added in v0.2.9
type Input struct {
// Prompt shown to the local operator.
// @deck.example Node advertise address
Message string `json:"message"`
// Default value used for empty input and non-interactive mode.
// @deck.example 192.0.2.10
Default *string `json:"default"`
// Require a non-empty value. Defaults to `true`.
// @deck.example true
Required *bool `json:"required"`
// Treat the value as secret. Secret values require `register`, are available to later steps in memory, and are not persisted in state.
// @deck.example false
Secret bool `json:"secret"`
}
Ask the local operator for a string value. @deck.when Use this for local operator-provided values that are only known at apply time and should feed later steps through `register`. @deck.note Non-secret input can use `spec.default` in non-interactive mode. @deck.note `spec.secret: true` disables terminal echo when possible, keeps the value out of persisted state, and re-prompts when an incomplete run must resume without the value. @deck.example kind: Input register:
nodeIP: value
spec:
message: Node advertise address required: true
type InstallAptPackage ¶ added in v0.3.0
type InstallAptPackage struct {
// Local repository source used for the installation.
// @deck.example {type:local-repo,path:/opt/deck/repos/kubernetes}
Source *InstallPackageSource `json:"source"`
// Package names to install.
// @deck.example [kubelet,kubeadm,kubectl]
Packages []string `json:"packages"`
// Limit apt visibility to these source list files.
// @deck.example [/etc/apt/sources.list.d/offline.list]
RestrictToRepos []string `json:"restrictToRepos"`
// Apt source list files to exclude from package resolution.
// @deck.example [/etc/apt/sources.list.d/updates.list]
ExcludeRepos []string `json:"excludeRepos"`
// Apt-specific installation options.
// @deck.example {installRecommends:false,fixBroken:true}
Apt InstallAptPackageOptions `json:"apt"`
// Maximum total duration for package installation.
// @deck.example 20m
Timeout string `json:"timeout"`
}
Install packages on Debian-family nodes with apt. @deck.when Use this during apply when the workflow targets Debian or Ubuntu hosts and needs apt-specific install behavior. @deck.example kind: InstallAptPackage spec:
packages: [kubelet, kubeadm, kubectl] restrictToRepos: - /etc/apt/sources.list.d/offline.list apt: installRecommends: false
type InstallAptPackageOptions ¶ added in v0.3.0
type InstallAptPackageOptions struct {
// Attempt to correct broken dependencies during apt installation.
// @deck.example true
FixBroken bool `json:"fixBroken"`
// Install recommended packages. Omit to use the operating system default.
// @deck.example false
InstallRecommends *bool `json:"installRecommends"`
// Additional dpkg force options passed through apt-get.
// @deck.example [force-confdef,force-confold]
DPKGOptions []string `json:"dpkgOptions"`
// Default apt release used for package selection.
// @deck.example jammy
DefaultRelease string `json:"defaultRelease"`
// Allow installing a lower package version than the installed version.
// @deck.example true
AllowDowngrade bool `json:"allowDowngrade"`
// Fail if apt would remove packages as part of dependency resolution.
// @deck.example true
FailOnAutoremove bool `json:"failOnAutoremove"`
}
type InstallDnfPackage ¶ added in v0.3.0
type InstallDnfPackage struct {
// Local repository source used for the installation.
// @deck.example {type:local-repo,path:/opt/deck/repos/kubernetes}
Source *InstallPackageSource `json:"source"`
// Package names to install.
// @deck.example [kubelet,kubeadm,kubectl]
Packages []string `json:"packages"`
// Limit dnf visibility to these repository IDs.
// @deck.example [offline-kubernetes]
RestrictToRepos []string `json:"restrictToRepos"`
// Dnf repository IDs to exclude from package resolution.
// @deck.example [updates]
ExcludeRepos []string `json:"excludeRepos"`
// Dnf-specific installation options.
// @deck.example {skipBroken:true,allowErasing:true}
Dnf InstallDnfPackageOptions `json:"dnf"`
// Maximum total duration for package installation.
// @deck.example 20m
Timeout string `json:"timeout"`
}
Install packages on RHEL-family nodes with dnf. @deck.when Use this during apply when the workflow targets RHEL, Rocky, Fedora, or compatible hosts and needs dnf-specific install behavior. @deck.example kind: InstallDnfPackage spec:
packages: [kubelet, kubeadm, kubectl] restrictToRepos: [offline-kubernetes] dnf: skipBroken: true
type InstallDnfPackageOptions ¶ added in v0.3.0
type InstallDnfPackageOptions struct {
// Skip unavailable packages or packages with broken dependencies.
// @deck.example true
SkipBroken bool `json:"skipBroken"`
// Allow erasing installed packages to resolve dependencies.
// @deck.example true
AllowErasing bool `json:"allowErasing"`
// Install weak dependencies. Omit to use the distribution default.
// @deck.example false
InstallWeakDeps *bool `json:"installWeakDeps"`
// Disable GPG signature checking for this transaction.
// @deck.example true
DisableGPGCheck bool `json:"disableGpgCheck"`
// Prefer best available versions. Omit to use the distribution default.
// @deck.example false
Best *bool `json:"best"`
// Use only cached metadata and packages.
// @deck.example true
CacheOnly bool `json:"cacheOnly"`
// Package name patterns to exclude from the transaction.
// @deck.example [kernel*]
ExcludePackages []string `json:"excludePackages"`
}
type InstallPackage ¶
type InstallPackage struct {
// Package manager to use. `auto` resolves from the runtime OS family.
// @deck.example auto
Manager InstallPackageManager `json:"manager"`
// Local repository source used for the installation.
// @deck.example {type:local-repo,path:/opt/deck/repos/kubernetes}
Source *InstallPackageSource `json:"source"`
// Package names to install.
// @deck.example [kubelet,kubeadm,kubectl]
Packages []string `json:"packages"`
// Limit package manager visibility to these repository selectors.
// @deck.example [offline-kubernetes]
RestrictToRepos []string `json:"restrictToRepos"`
// Repository selectors to exclude from package resolution.
// @deck.example [updates]
ExcludeRepos []string `json:"excludeRepos"`
// Apt-specific installation options. Requires `manager: apt` when set.
// @deck.example {installRecommends:false,fixBroken:true}
Apt InstallAptPackageOptions `json:"apt"`
// Dnf-specific installation options. Requires `manager: dnf` when set.
// @deck.example {skipBroken:true,allowErasing:true}
Dnf InstallDnfPackageOptions `json:"dnf"`
// Maximum total duration for package installation.
// @deck.example 20m
Timeout string `json:"timeout"`
}
Install packages on the local node. @deck.when Use this during apply to install packages from configured local or mirrored repositories. @deck.example kind: InstallPackage spec:
packages: [kubelet, kubeadm, kubectl] source: type: local-repo path: /opt/deck/repos/kubernetes
type InstallPackageManager ¶ added in v0.3.0
type InstallPackageManager string
type InstallPackageSource ¶
type KernelModule ¶
type KernelModule struct {
// Single module name to manage. Use `name` or `names`, not both.
// @deck.example br_netfilter
Name string `json:"name"`
// Multiple module names managed in one step. Use `name` or `names`, not both.
// @deck.example [overlay,br_netfilter]
Names []string `json:"names"`
// Run `modprobe` to load the module immediately.
// @deck.example true
Load *bool `json:"load"`
// Persist the module under `/etc/modules-load.d/`.
// @deck.example true
Persist *bool `json:"persist"`
// Path to the persistence file written when `persist` is true.
// @deck.example /etc/modules-load.d/k8s.conf
PersistFile string `json:"persistFile"`
// Maximum total duration for module operations.
// @deck.example 2m
Timeout string `json:"timeout"`
}
Load and persist kernel modules. @deck.when Use this for modules that must be present before networking or container runtime setup. @deck.example kind: KernelModule spec:
name: br_netfilter load: true persist: true persistFile: /etc/modules-load.d/k8s.conf
type KubeadmInit ¶
type KubeadmInit struct {
// Path where the generated join command is written after init.
// @deck.example /tmp/deck/join.txt
OutputJoinFile string `json:"outputJoinFile"`
// Skip init if `/etc/kubernetes/admin.conf` already exists.
// @deck.example true
SkipIfAdminConfExists *bool `json:"skipIfAdminConfExists"`
// CRI socket path passed to kubeadm.
// @deck.example unix:///run/containerd/containerd.sock
CriSocket string `json:"criSocket"`
// Kubernetes version string passed to kubeadm.
// @deck.example v1.30.1
KubernetesVersion string `json:"kubernetesVersion"`
// Path to an explicit kubeadm config file.
// @deck.example /tmp/deck/kubeadm.conf
ConfigFile string `json:"configFile"`
// Inline kubeadm config template or `default`.
// @deck.example default
ConfigTemplate string `json:"configTemplate"`
// CIDR range for the pod network.
// @deck.example 10.244.0.0/16
PodNetworkCIDR string `json:"podNetworkCIDR"`
// API server advertise address or `auto`.
// @deck.example auto
AdvertiseAddress string `json:"advertiseAddress"`
// Preflight checks to suppress.
// @deck.example [swap]
IgnorePreflightErrors []string `json:"ignorePreflightErrors"`
// Additional flags passed directly to kubeadm.
// @deck.example [--skip-phases=addon/kube-proxy]
ExtraArgs []string `json:"extraArgs"`
// Maximum total duration for the init step.
// @deck.example 15m
Timeout string `json:"timeout"`
}
Run kubeadm init and write the join command to a file. @deck.when Use this to bootstrap a control-plane node after host prerequisites are ready. @deck.note When `skipIfAdminConfExists` skips the step, deck does not create a new join artifact unless the file already exists. @deck.note Load prepared control-plane images with `LoadImage` before bootstrap rather than relying on kubeadm image pulls. @deck.example kind: InitKubeadm spec:
outputJoinFile: /tmp/deck/join.txt podNetworkCIDR: 10.244.0.0/16
type KubeadmJoin ¶
type KubeadmJoin struct {
// Path to the join command file produced by a prior init run.
// @deck.example /tmp/deck/join.txt
JoinFile string `json:"joinFile"`
// Path to an explicit kubeadm join config file.
// @deck.example /tmp/deck/kubeadm-join.yaml
ConfigFile string `json:"configFile"`
// Join as an additional control-plane member instead of a worker.
// @deck.example false
AsControlPlane bool `json:"asControlPlane"`
// Additional flags passed directly to kubeadm join.
// @deck.example [--skip-phases=preflight]
ExtraArgs []string `json:"extraArgs"`
// Maximum total duration for the join step.
// @deck.example 15m
Timeout string `json:"timeout"`
}
Run kubeadm join for a worker or additional control-plane node. @deck.when Use this after a bootstrap node has produced a valid join file or config. @deck.note Provide exactly one of `joinFile` or `configFile`. @deck.example kind: JoinKubeadm spec:
configFile: /tmp/deck/kubeadm-join.yaml extraArgs: [--skip-phases=preflight]
type KubeadmReset ¶
type KubeadmReset struct {
// Pass `--force` to kubeadm reset.
// @deck.example true
Force bool `json:"force"`
// Continue with cleanup even if kubeadm reset itself fails.
// @deck.example true
IgnoreErrors bool `json:"ignoreErrors"`
// Stop kubelet before running reset.
// @deck.example true
StopKubelet *bool `json:"stopKubelet"`
// CRI socket path passed to kubeadm.
// @deck.example unix:///run/containerd/containerd.sock
CriSocket string `json:"criSocket"`
// Additional flags passed directly to kubeadm reset.
// @deck.example [--skip-phases=preflight]
ExtraArgs []string `json:"extraArgs"`
// Directories to delete during cleanup.
// @deck.example [/etc/cni/net.d,/var/lib/etcd]
RemovePaths []string `json:"removePaths"`
// Files to delete during cleanup.
// @deck.example [/etc/kubernetes/admin.conf]
RemoveFiles []string `json:"removeFiles"`
// Containers to stop and remove during cleanup.
// @deck.example [kube-apiserver,etcd]
CleanupContainers []string `json:"cleanupContainers"`
// Runtime service to restart after cleanup.
// @deck.example containerd
RestartRuntimeManageService string `json:"restartRuntimeService"`
// Wait until the runtime service reports active.
// @deck.example true
WaitForRuntimeService bool `json:"waitForRuntimeService"`
// Poll runtime readiness after cleanup.
// @deck.example true
WaitForRuntimeReady bool `json:"waitForRuntimeReady"`
// Glob that must resolve to zero matches before the step succeeds.
// @deck.example /etc/kubernetes/manifests/*.yaml
WaitForMissingManifestsGlob string `json:"waitForMissingManifestsGlob"`
// Stop kubelet again after runtime verification completes.
// @deck.example true
StopKubeletAfterReset bool `json:"stopKubeletAfterReset"`
// Containers that must no longer exist after cleanup.
// @deck.example [kube-apiserver,etcd]
VerifyContainersAbsent []string `json:"verifyContainersAbsent"`
// Optional reset report file written after cleanup.
// @deck.example /tmp/deck/reports/reset-state.txt
ReportFile string `json:"reportFile"`
// Value written into the reset report as `resetReason`.
// @deck.example node-reset-acceptance
ReportResetReason string `json:"reportResetReason"`
// Maximum total duration for the reset step.
// @deck.example 15m
Timeout string `json:"timeout"`
}
Run kubeadm reset and optional cleanup steps. @deck.when Use this to tear down an existing kubeadm-managed node safely. @deck.note This step focuses on cleanup and convergence after kubeadm reset. @deck.example kind: ResetKubeadm spec:
force: true removePaths: [/etc/cni/net.d, /var/lib/etcd]
type KubeadmUpgrade ¶
type KubeadmUpgrade struct {
// Kubernetes version string passed to kubeadm upgrade.
// @deck.example v1.31.0
KubernetesVersion string `json:"kubernetesVersion"`
// Preflight checks to suppress during upgrade.
// @deck.example [Swap]
IgnorePreflightErrors []string `json:"ignorePreflightErrors"`
// Additional flags passed directly to kubeadm upgrade.
// @deck.example [--allow-experimental-upgrades]
ExtraArgs []string `json:"extraArgs"`
// Restart kubelet after a successful upgrade.
// @deck.example true
RestartKubelet *bool `json:"restartKubelet"`
// Service name restarted after a successful upgrade.
// @deck.example kubelet
KubeletService string `json:"kubeletService"`
// Maximum total duration for the upgrade step.
// @deck.example 30m
Timeout string `json:"timeout"`
}
Run kubeadm upgrade apply and optional kubelet restart. @deck.when Use this to upgrade a local kubeadm-managed control-plane node with a typed workflow step. @deck.note Restart kubelet after a successful upgrade unless a separate service step owns that lifecycle. @deck.example kind: UpgradeKubeadm spec:
kubernetesVersion: v1.31.0 ignorePreflightErrors: [Swap]
type LoadImage ¶
type LoadImage struct {
// Image references to load from the prepared archives.
// @deck.example [registry.k8s.io/kube-apiserver:v1.30.1]
Images []string `json:"images"`
// Optional target platforms matching DownloadImage archive suffixes.
// @deck.example [linux/amd64]
Platforms []ImagePlatform `json:"platforms"`
// Directory containing prepared image archives.
// @deck.example images/control-plane
SourceDir string `json:"sourceDir"`
// Runtime loader to use for imports.
// @deck.example ctr
Runtime string `json:"runtime"`
// Optional runtime command override.
// @deck.example [ctr,-n,k8s.io,images,import,{archive}]
Command []string `json:"command"`
// Optional total timeout for the load step.
// @deck.example 10m
Timeout string `json:"timeout"`
}
Load prepared image archives into the local container runtime. @deck.when Use this during apply before verifying or using images from an offline bundle. @deck.note `command` may include `{archive}` placeholders that deck substitutes per image archive. @deck.example kind: LoadImage spec:
sourceDir: images/control-plane runtime: ctr images: - registry.k8s.io/kube-apiserver:v1.30.1
type ManageService ¶
type ManageService struct {
// Single service name to manage. Use `name` or `names`, not both.
// @deck.example containerd
Name string `json:"name"`
// Multiple service names managed in one step. Use `name` or `names`, not both.
// @deck.example [firewalld,ufw]
Names []string `json:"names"`
// Run `systemctl daemon-reload` before applying state changes.
// @deck.example true
DaemonReload bool `json:"daemonReload"`
// Only manage the service if it exists on the host.
// @deck.example true
IfExists bool `json:"ifExists"`
// Suppress errors when the service is not found.
// @deck.example true
IgnoreMissing bool `json:"ignoreMissing"`
// Whether the service should be enabled on boot.
// @deck.example true
Enabled *bool `json:"enabled"`
// Desired service state.
// @deck.example started
State string `json:"state"`
// Maximum total duration for service operations.
// @deck.example 5m
Timeout string `json:"timeout"`
}
Start, stop, enable, disable, restart, or reload local services. @deck.when Use this after config changes that need a service lifecycle action. @deck.example kind: ManageService spec:
name: containerd enabled: true state: started
type Message ¶ added in v0.2.9
type Message struct {
// Message text to print. Templates are rendered before the step runs and YAML block scalars support multi-line text.
// @deck.example Node setup is starting.
Message string `json:"message"`
// Message severity used as a human-readable prefix for warnings and errors. Defaults to `info`.
// @deck.example info
Level string `json:"level"`
// Output stream for the message. Defaults to `stdout`.
// @deck.example stdout
Stream string `json:"stream"`
}
Print an operator-facing message during workflow execution. @deck.when Use this to explain a manual checkpoint, show rendered context, or make an apply/prepare workflow self-describing without shell commands. @deck.note `Message` is intended for human-readable operator output, not machine-readable workflow data. @deck.note Do not use `Message` to display secrets. @deck.example kind: Message spec:
level: info
message: |
Node setup is starting.
role: {{ .vars.role }}
type PackagePlatform ¶ added in v0.2.5
type PackagePlatform string
type RefreshRepository ¶
type RefreshRepository struct {
// Package manager to use.
// @deck.example apt
Manager string `json:"manager"`
// Run a cache clean before updating metadata.
// @deck.example true
Clean bool `json:"clean"`
// Fetch fresh package metadata from the configured repositories.
// @deck.example true
Update bool `json:"update"`
// Limit the metadata update to these repository selectors.
// @deck.example [/etc/apt/sources.list.d/offline.list]
RestrictToRepos []string `json:"restrictToRepos"`
// Repository selectors to skip during metadata update.
// @deck.example [updates]
ExcludeRepos []string `json:"excludeRepos"`
// Maximum total duration for refresh operations.
// @deck.example 5m
Timeout string `json:"timeout"`
}
Refresh package metadata with repo filtering. @deck.when Use this after writing repo definitions and before package install steps that depend on fresh metadata. @deck.example kind: RefreshRepository spec:
manager: apt clean: true update: true restrictToRepos: - /etc/apt/sources.list.d/offline.list
type RepositoryEntry ¶
type RepositoryEntry struct {
// RPM repository ID.
// @deck.example offline-kubernetes
ID string `json:"id"`
// Human-readable repository name.
// @deck.example Offline Kubernetes
Name string `json:"name"`
// Base URL for the repository.
// @deck.example http://repo.local/debian
BaseURL string `json:"baseurl"`
// Explicit enabled state for the repository entry.
// @deck.example true
Enabled *bool `json:"enabled"`
// Explicit gpgcheck state for RPM repositories.
// @deck.example true
GPGCheck *bool `json:"gpgcheck"`
// URL or path to the repository GPG key.
// @deck.example file:///etc/pki/rpm-gpg/RPM-GPG-KEY-offline
GPGKey string `json:"gpgkey"`
// Mark a deb repository as trusted.
// @deck.example true
Trusted *bool `json:"trusted"`
// Deb repository suite.
// @deck.example stable
Suite string `json:"suite"`
// Deb repository component.
// @deck.example main
Component string `json:"component"`
// Deb repository type.
// @deck.example deb
Type string `json:"type"`
// Additional rpm-style repository keys.
// @deck.example {priority:10,module_hotfixes:true}
Extra map[string]any `json:"extra"`
}
type StructuredEdit ¶
type StructuredEdit struct {
// Structured edit operation.
// @deck.example set
Op string `json:"op"`
// Path expression within the target document.
// @deck.example plugins."io.containerd.grpc.v1.cri".registry.config_path
RawPath string `json:"rawPath"`
// Typed edit value.
// @deck.example /etc/containerd/certs.d
Value any `json:"value,omitempty"`
}
type Swap ¶
type Swap struct {
// Disable all active swap devices with `swapoff -a`.
// @deck.example true
Disable *bool `json:"disable"`
// Comment out swap entries in fstab so swap stays off after reboot.
// @deck.example true
Persist *bool `json:"persist"`
// Path to the fstab file.
// @deck.example /etc/fstab
FstabPath string `json:"fstabPath"`
// Maximum total duration for swap operations.
// @deck.example 2m
Timeout string `json:"timeout"`
}
Enable or disable swap and its persistence. @deck.when Use this for Kubernetes-oriented host prep where swap policy matters. @deck.example kind: Swap spec:
disable: true persist: true
type Sysctl ¶
type Sysctl struct {
// Map of sysctl key-value pairs to write.
// @deck.example {net.ipv4.ip_forward:1,net.bridge.bridge-nf-call-iptables:1}
Values map[string]any `json:"values"`
// Path to the sysctl file written with the given values.
// @deck.example /etc/sysctl.d/99-k8s.conf
WriteFile string `json:"writeFile"`
// Run `sysctl -p <writeFile>` after writing.
// @deck.example true
Apply bool `json:"apply"`
// Maximum total duration for sysctl operations.
// @deck.example 2m
Timeout string `json:"timeout"`
}
Write and optionally apply sysctl values. @deck.when Use this for kernel tunables that must survive reboot and may need immediate application. @deck.example kind: Sysctl spec:
writeFile: /etc/sysctl.d/99-kubernetes-cri.conf apply: true values: net.ipv4.ip_forward: 1
type VerifyImage ¶
type VerifyImage struct {
// Image references that must already exist in the runtime.
// @deck.example [registry.k8s.io/kube-apiserver:v1.30.1]
Images []string `json:"images"`
// Optional image-listing command override.
// @deck.example [ctr,-n,k8s.io,images,list,-q]
Command []string `json:"command"`
// Optional total timeout for the verification step.
// @deck.example 5m
Timeout string `json:"timeout"`
}
Verify that required container images already exist on the node. @deck.when Use this during apply when images should already be present and only need verification. @deck.note Use this instead of `LoadImage` when the runtime is expected to be pre-populated. @deck.example kind: VerifyImage spec:
command: [ctr, -n, k8s.io, images, list, -q] images: - registry.k8s.io/kube-apiserver:v1.30.1
type Wait ¶
type Wait struct {
// Duration between poll attempts.
// @deck.example 2s
Interval string `json:"interval"`
// Deprecated alias for `interval`. Prefer `interval`.
// @deck.example 2s
PollInterval string `json:"pollInterval"`
// Duration to wait before the first poll attempt.
// @deck.example 1s
InitialDelay string `json:"initialDelay"`
// Filesystem path to check.
// @deck.example /etc/kubernetes/admin.conf
Path string `json:"path"`
// List of paths that must all be absent before the step succeeds.
// @deck.example [/etc/kubernetes/manifests/a.yaml,/etc/kubernetes/manifests/b.yaml]
Paths []string `json:"paths"`
// Glob pattern that must resolve to zero matches before the step succeeds.
// @deck.example /etc/kubernetes/manifests/*.yaml
Glob string `json:"glob"`
// Filesystem entry type restriction for path checks.
// @deck.example file
Type string `json:"type"`
// Require the matched file to have non-zero size.
// @deck.example true
NonEmpty bool `json:"nonEmpty"`
// Service name to check.
// @deck.example containerd
Name string `json:"name"`
// Command vector to run on each poll attempt.
// @deck.example [test,-f,/etc/kubernetes/admin.conf]
Command []string `json:"command"`
// Host or IP address for TCP port checks.
// @deck.example 127.0.0.1
Address string `json:"address"`
// TCP port number to check.
// @deck.example 6443
Port string `json:"port"`
// Maximum total duration to wait before the step fails.
// @deck.example 5m
Timeout string `json:"timeout"`
}
Wait bridges convergence gaps between steps. @deck.note Keep waits specific so failures identify exactly which dependency did not become ready within the timeout. @deck.note Use `initialDelay` when a service emits a transient non-active state immediately after being started.
type WriteContainerdConfig ¶
type WriteContainerdConfig struct {
// Destination path for the generated `config.toml`.
// @deck.example /etc/containerd/config.toml
Path string `json:"path"`
// Generate a base config with `containerd config default` when the file does not exist.
// @deck.example true
CreateDefault *bool `json:"createDefault"`
// How the step chooses or enforces the containerd config version.
// @deck.example require-v3
VersionPolicy string `json:"versionPolicy"`
// Ordered containerd config edits.
// @deck.example [{op:set,rawPath:plugins."io.containerd.grpc.v1.cri".registry.config_path,value:/etc/containerd/certs.d}]
RawSettings []ContainerdConfigSetting `json:"rawSettings"`
// Maximum total duration for config rendering and writes.
// @deck.example 5m
Timeout string `json:"timeout"`
}
Write the containerd config file on the node. @deck.when Use this when the node runtime needs a managed containerd config.toml. @deck.note Use `WriteContainerdConfig` for the main `config.toml` only. @deck.note Use `WriteContainerdRegistryHosts` separately when mirrors or trust policy need per-registry `hosts.toml` files. @deck.example kind: WriteContainerdConfig spec:
path: /etc/containerd/config.toml
createDefault: true
versionPolicy: preserve
rawSettings:
- op: set
rawPath: plugins."io.containerd.grpc.v1.cri".registry.config_path
value: /etc/containerd/certs.d
type WriteContainerdRegistryHosts ¶
type WriteContainerdRegistryHosts struct {
// Directory where per-registry `hosts.toml` files are written.
// @deck.example /etc/containerd/certs.d
Path string `json:"path"`
// Per-registry host entries written as `hosts.toml` files under `path`.
// @deck.example [{registry:registry.k8s.io,host:http://mirror.local:5000}]
RegistryHosts []ContainerdRegistryHost `json:"registryHosts"`
}
Write containerd registry host configuration for mirrors and trust policy. @deck.when Use this when containerd should resolve pulls through explicit registry host configuration. @deck.note Use this step when the runtime should resolve pulls through an internal mirror or custom trust policy. @deck.example kind: WriteContainerdRegistryHosts spec:
path: /etc/containerd/certs.d
registryHosts:
- registry: registry.k8s.io
server: https://registry.k8s.io
host: http://registry.local:5000
capabilities: [pull, resolve]
skipVerify: true
type WriteFile ¶
type WriteFile struct {
// Destination path on the node.
// @deck.example /etc/motd
Path string `json:"path"`
// Inline content written verbatim to `path`.
// @deck.example hello
Content string `json:"content"`
// Inline multi-line content rendered with the current vars before writing.
// @deck.example Hello {{ .vars.name }}
Template string `json:"template"`
// File permissions in octal notation applied after the write completes.
// @deck.example 0644
Mode string `json:"mode"`
}
Write inline or templated file content to a destination path. @deck.when Use this to create or fully replace a managed file on the node. @deck.note Use `template` instead of `content` when the body needs variable interpolation. @deck.example kind: WriteFile spec:
path: /etc/motd content: hello
type WriteSystemdUnit ¶
type WriteSystemdUnit struct {
// Destination path for the unit file on the node.
// @deck.example /etc/systemd/system/kubelet.service
Path string `json:"path"`
// Inline unit file content written verbatim to `path`.
// @deck.example
// [Unit]
// Description=kubelet
Content string `json:"content"`
// Inline multi-line unit content rendered with the current vars before writing.
// @deck.example
// [Service]
// Environment=NODE_IP={{ .vars.nodeIP }}
Template string `json:"template"`
// File permissions applied to the unit file in octal notation.
// @deck.example 0644
Mode string `json:"mode"`
// Run `systemctl daemon-reload` after writing the unit file.
// @deck.example true
DaemonReload bool `json:"daemonReload"`
// Maximum total duration for the write and reload operations.
// @deck.example 2m
Timeout string `json:"timeout"`
}
Write a systemd unit file on the node. @deck.when Use this when workflows need to install or override a custom unit definition. @deck.note Use `ManageService` separately to enable, start, restart, or reload the unit after it is written. @deck.example kind: WriteSystemdUnit spec:
path: /etc/systemd/system/kubelet.service template: | [Unit] Description=Kubelet daemonReload: true
Source Files
¶
- cluster_check.go
- cluster_check_meta.go
- command.go
- command_meta.go
- containerd.go
- containerd_meta.go
- file.go
- file_meta.go
- image.go
- image_meta.go
- kubeadm.go
- kubeadm_meta.go
- operator_interaction.go
- operator_interaction_meta.go
- parallel_meta.go
- platform.go
- source_embed.go
- structured_edit.go
- structured_edit_meta.go
- system_package.go
- system_package_meta.go
- wait.go
- wait_meta.go