
TenantSync
Synchronizes ALL namespaces, flows, files, and dashboards between Kestra and Git.
Enterprise Edition Talk to us
Synchronizes ALL namespaces, flows, files, and dashboards between Kestra and Git.
Unidirectional tenant sync between Kestra and Git.
Synchronizes ALL namespaces, flows, files, and dashboards between Kestra and Git.
type: "io.kestra.plugin.git.TenantSync"Examples
Sync all objects (flows, files, dashboards, namespaces) under the same tenant than this flow using Git as source of truth
id: tenant_sync_git
namespace: system
tasks:
- id: sync
type: io.kestra.plugin.git.TenantSync
sourceOfTruth: GIT
whenMissingInSource: DELETE
protectedNamespaces:
- system
url: https://github.com/fdelbrayelle/plugin-git-qa
username: fdelbrayelle
password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
branch: main
gitDirectory: kestra
kestraUrl: "http://localhost:8080"
auth:
username: "{{ secret('KESTRA_USERNAME') }}"
password: "{{ secret('KESTRA_PASSWORD') }}"
Sync all objects (flows, files, dashboards, namespaces) under the same tenant as this flow using Kestra as the source of truth
id: tenant_sync_kestra
namespace: system
tasks:
- id: sync
type: io.kestra.plugin.git.TenantSync
sourceOfTruth: KESTRA
whenMissingInSource: KEEP
url: https://github.com/fdelbrayelle/plugin-git-qa
username: fdelbrayelle
password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
branch: dev
kestraUrl: "http://localhost:8080"
auth:
username: "{{ secret('KESTRA_USERNAME') }}"
password: "{{ secret('KESTRA_PASSWORD') }}"
Properties
auth*RequiredNon-dynamic
Authentication information.
io.kestra.plugin.git.AbstractKestraTask-Auth
Password for HTTP Basic authentication.
Username for HTTP Basic authentication.
branch*Requiredstring
The branch to read from / write to (required).
Branch prefixed with origin/ or refs/heads/ are not supported.
cloneSubmodulesbooleanstring
Whether to clone submodules
connectTimeoutintegerstring
10000Connect timeout in milliseconds for HTTP connections.
dryRunbooleanstring
falseIf true, only compute the plan and output a diff without applying changes.
gitConfigobject
Git configuration to apply to the repository
Map of Git config keys and values, applied after clone few examples: - 'core.fileMode': false -> ignore file permission changes - 'core.autocrlf': false -> prevent line ending conversion
gitDirectorystring
Subdirectory inside the repo used to store Kestra code and files; if empty, repo root is used.
This is the base folder in your Git repository where Kestra will look for code and files.
If you don't set it, the repo root will be used. Inside that folder, Kestra always expects
a structure like <namespace>/flows, <namespace>/files, etc.
| gitDirectory | namespace | Expected Git path |
| ------------ | --------------- | -----------------------------------------|
| (not set) | company | company/flows/my-flow.yaml |
| monorepo | system | monorepo/system/flows/my-flow.yaml |
| projectA | company.team | projectA/company.team/flows/my-flow.yaml |
kestraUrlstring
Kestra API URL. If null, uses 'kestra.url' from configuration. If that is also null, defaults to 'http://localhost: 8080'.
noProxybooleanstring
Specify whether to disable proxy.
onInvalidSyntaxstring
FAILSKIPWARNFAILBehavior when encountering invalid syntax while syncing.
passphrasestring
The passphrase for the privateKey
passwordstring
The password or Personal Access Token (PAT) – when you authenticate the task with a PAT, any flows or files pushed to Git from Kestra will be pushed from the user associated with that PAT. This way, you don't need to configure the commit author (the authorName and authorEmail properties).
privateKeystring
PEM-format private key content that is paired with a public key registered on Git
To generate an ECDSA PEM format key from OpenSSH, use the following command: ssh-keygen -t ecdsa -b 256 -m PEM. You can then set this property with your private key content and put your public key on Git.
protectedNamespacesarray
["system"]Namespaces protected from deletion regardless of policies.
readTimeoutintegerstring
60000Read timeout in milliseconds for HTTP connections.
sourceOfTruthstring
KESTRAGITKESTRASelect the source of truth.
trustedCaPemPathstring
Optional path to a PEM-encoded CA certificate to trust (in addition to the JVM default truststore)
Equivalent to git config http.sslCAInfo <path>. Use this for self-signed/internal CAs.
urlstring
The URI to clone from
usernamestring
The username or organization
whenMissingInSourcestring
DELETEDELETEKEEPFAILBehavior when an object is missing from the selected source of truth.
Outputs
commitIdstring
ID of the commit pushed (if any).
commitURLstring
URL to the commit (if any).
diffstring
uriA file containing all changes applied (or not in case of dry run) to/from Git.