canasta gitops push

From Canasta Wiki

canasta > gitops > push

canasta gitops push

Push configuration changes to the git repository

Synopsis

Commit staged changes and push to the remote repository. Stage changes first with canasta gitops add; commits already made by other commands (such as canasta gitops fix-submodules) are also pushed even when nothing is staged. When pull_requests is enabled in hosts.yaml, creates a branch and opens a pull request instead of pushing directly to main.

Every host sharing a gitops repository runs the same Canasta CLI version. Each host records its version in hosts/<host>/cli-version when it creates or joins the repository and on every push. A host whose CLI is older than the record of a host that can push stops before changing anything and names the newer hosts: upgrade its CLI first. A newer host goes on and names the hosts still on an older CLI. Hosts whose role cannot push are not compared, since they publish no record after joining. A retired host is taken out with canasta gitops remove-host, and one that should no longer be compared is made pull-only with canasta gitops set-role --role sink; both run whatever the other hosts' CLI versions.

canasta gitops push [flags]

Examples

canasta gitops push
canasta gitops push -m 'Add docs wiki'

Flags

Flag Shorthand Description Default Required Orchestrator
--id -i Canasta instance ID * Both
--key Compose only. Path on the controller (the machine running canasta) to the git-crypt symmetric key, used to unlock the checkout if it is locked. Without it, a repo with GPG recipients is unlocked through a forwarded GPG agent. Both
--message -m Commit message (defaults to 'Configuration update') Both
--ssh-key Path on the instance's host to an SSH private key for git network operations. When set, git runs with GIT_SSH_COMMAND="ssh -i <ssh-key> ...". On a remote host, give an absolute path or one starting with a quoted '~' (for example '~/x'). On Compose, the instance remembers the path, and later gitops commands use it when --ssh-key is omitted; passing it again replaces it. Without a remembered key, git uses ssh-agent forwarding on Compose, or the staged deploy key on Kubernetes. Both

* Defaults to the Canasta instance matching the current directory, if any.

Global flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both