chalkctl validate¶
Checks the config of the nodes named, or of every node of the inventory, as each node would check it on its image: the set the inventory gives the node, every document against the schemas of the node's image in the inventory, and the set's translation. The image's change rules that read no facts and compare with no running value run too, and so does the validator router of a router image, which chalkctl links. Every node whose files hold a Kubernetes Cluster document must hold the same Cluster spec, and the same Flannel spec or none. See chalkctl and chalkd both check the config.
The command prints a line for each node whose config is valid, with the digest of an image in a registry, names each node whose config is not, and warns of a node whose SystemDisk leaves STATE, which holds its keys and secrets, unencrypted, and of each image reference that names a tag but no digest, which nodes pull by whatever the tag points to when they pull. It reaches no node and needs no secrets file or client file.
validate reads the file:// sources of Secret documents and decrypts no sops:// or age:// source, so it asks for no key. It checks each key of such a source with a placeholder value, which no rule or validator sees, as they see a Secret's values as hashes alone. It warns of each such key and prints no config version, which hashes the values: whether the source decrypts and holds the value shows when a command that delivers the config reads it.
A config validate passes can still be refused on delivery: validate runs no rule that reads the node's facts or its running config, none of the image's other validators, and none of its renderers or their checks. chalkctl config apply --dry-run has the node run all of them, and changes nothing.
Flags¶
| Flag | Type | Default | Description |
|---|---|---|---|
--inventory |
string | $CHALKOSINVENTORY, else chalkos.yaml in the current directory | Inventory naming the nodes and their config files. |
Examples¶
# Check every node of chalkos.yaml.
chalkctl validate
# Check two nodes of another inventory.
chalkctl validate cp1 w1 --inventory lab/chalkos.yaml
See also¶
- chalkctl: Install and operate chalkos clusters