canasta gitops join
From Canasta Wiki
canasta gitops join
Join an existing gitops repository
Synopsis
Join an existing gitops repository for a Canasta instance.
Clones the repo, adds this host to the host inventory, extracts host-specific values into vars.yaml, and pushes the new host entry back to the repo. On Compose this also unlocks git-crypt so encrypted vars become readable; K8s repos are cleartext and need no unlock step.
The instance must already exist and have a working .env file. Use canasta gitops init to bootstrap a new gitops repository instead.
canasta gitops join [flags]
Examples
canasta gitops join -n staging --repo git@github.com:org/config.git --key /tmp/gc.key
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--git-user-email |
Git user.email for commits on the target host (set if not already configured) | Both | |||
--git-user-name |
Git user.name for commits on the target host (set if not already configured) | Both | |||
--host-name |
-n |
Name for this host | ✓ | Both | |
--id |
-i |
Canasta instance ID | * | Both | |
--key |
Path basename for the gitops keys, same as gitops init. On Compose, <key> is the git-crypt symmetric key. On K8s, only <key>.ssh (the SSH deploy key) is used — git-crypt is not part of the K8s gitops flow. |
✓ | Both | ||
--reinit |
Wipe local gitops state before joining. Use after a previous init or join died mid-run and left this instance unable to retry. Also re-attaches a host that is already registered in the repo (the registration is updated in place rather than rejected as a duplicate). | Both | |||
--repo |
Git repository URL | ✓ | Both | ||
--ssh-key |
Path to an SSH private key for git network operations. When set, git runs with GIT_SSH_COMMAND="ssh -i <ssh-key> ...". Omit to keep the default: ssh-agent forwarding on Compose, or the generated <key>.ssh 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 |