Proposed task: the task must ensure that it will not delete itself!
The task should infer the namespace from the flow.
id: sync_from_git
namespace: prod
tasks:
- id: git
type: io.kestra.plugin.git.Reconcile # flows and namespace files
url: https://github.com/kestra-io/scripts
branch: main
username: anna-geller
password: "{{ secret('GITHUB_PAT') }}"
gitDirectory: your_git_dir # optional, otherwise all files
namespaceFilesDirectory: your_namespace_files_location # optional, otherwise root
dryRun: true # if true, print the output of what files will be added/modified or deleted
# based on Git version without overwriting namespace files yet
triggers:
- id: schedule
type: io.kestra.core.models.triggers.types.Schedule
cron: "*/1 * * * *"
# cron: "*/30 * * * * *" # every 30 seconds
Benefits:
This task can be considered to be a GitOps reconciliation background service that allows to continuously deploy (and overwrite) namespace files based on the current state of a specific Git branch to ensure their workflows are managed via Git without the pain of CI/CD + true spirit of GitOps
Everything as Code AND from the UI possible without compromises
True declarative reconciliation loop ensuring that kestra namespace is a 1:1 copy of your Git repository → changes made from the UI not added to Git are overwritten. This is more robust than Terraform, as Terraform would fail if you overwrite something from the UI without changing it in Code.
Feature description
Proposed task: the task must ensure that it will not delete itself!
The task should infer the namespace from the flow.
Benefits: