git-provider

command module
v0.0.0-...-990461a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

README

Git Provider

This is a Krateo Provider that enables Git operations natively from your Kubernetes cluster.

Overview

The git-provider leverages Krateo provider-runtime, a production-grade version of the controller-runtime, to provide automatic reconciliation and Git interactions.

It exposes two distinct Custom Resources (CRs) to handle different use cases:

  • Repo: Designed for Git-to-Git workflows. It clones an existing Git repository, optionally applies templates (Mustache or Go templates) to the files using values from a ConfigMap, and pushes the result to a destination repository.
  • LocalResource: Designed for K8s-to-Git workflows. It takes a local source (such as an embedded Kubernetes manifest, a reference to an existing cluster resource, or a raw string), optionally applies placeholder replacements, and commits the result directly to a destination Git repository.

Installation

$ helm repo add krateo https://charts.krateo.io
$ helm repo update krateo
$ helm install git-provider krateo/git-provider

Documentation

For detailed configuration, templating rules, and synchronization behavior, please refer to the specific documentation for each Custom Resource:

Environment Variables

The provider controller can be configured using the following environment variables:

Environment Variable Type Default Value Description
GIT_PROVIDER_DEBUG bool false Run with debug logging
GIT_PROVIDER_SYNC_PERIOD duration 1h Controller manager sync period (e.g., 300ms, 1.5h, or 2h45m)
GIT_PROVIDER_POLL_INTERVAL duration 3m Poll interval controls how often an individual resource should be checked for drift
GIT_PROVIDER_MAX_RECONCILE_RATE int 5 The number of concurrent reconciles for each controller. Maximum number of resources that can be reconciled at the same time
GIT_PROVIDER_LEADER_ELECTION bool false Use leader election for the controller manager
GIT_PROVIDER_MAX_ERROR_RETRY_INTERVAL duration 1m The maximum interval between retries when an error occurs. Should be less than half of the poll interval
GIT_PROVIDER_MIN_ERROR_RETRY_INTERVAL duration 1s The minimum interval between retries when an error occurs. Should be less than max-error-retry-interval
GIT_PROVIDER_TIMEOUT duration 4m The timeout time for each action.
GIT_PROVIDER_GIT_COMMIT_AUTHOR_NAME string krateo-git-provider The name to use for git commits.
GIT_PROVIDER_GIT_COMMIT_AUTHOR_EMAIL string contact@krateo.io The email to use for git commits.

CRD Reference

To view the generated CR configuration schema, visit this link.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
localresource/v1alpha1
Package v1alpha1 contains API Schema definitions for the git v1alpha1 API group +kubebuilder:object:generate=true +groupName=git.krateo.io +versionName=v1alpha1
Package v1alpha1 contains API Schema definitions for the git v1alpha1 API group +kubebuilder:object:generate=true +groupName=git.krateo.io +versionName=v1alpha1
repo/v1alpha1
Package v1alpha1 contains API Schema definitions for the git v1alpha1 API group +kubebuilder:object:generate=true +groupName=git.krateo.io +versionName=v1alpha1
Package v1alpha1 contains API Schema definitions for the git v1alpha1 API group +kubebuilder:object:generate=true +groupName=git.krateo.io +versionName=v1alpha1
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL