Dagger
Search

gitops

No long description provided.

Installation

dagger install github.com/seamlezz/daggerverse/gitops@v0.4.0

Entrypoint

Return Type
Gitops !
Arguments
NameTypeDefault ValueDescription
sourceWorkspace -Source is the working tree directory.
rootDirString "/"No description provided
gitRepoNameString !-GitRepoName is the bare repo name in the in-cluster Git mirror. Example: "infra.git"
gitBranchString "main"No description provided
fluxNamespaceString "flux-system"No description provided
fluxSourceNameString "flux-system"No description provided
gitUserNameString "Winston"No description provided
gitUserEmailString "winston@seamlezz.com"No description provided
clusters[String ! ] -Cluster names for Flux Kustomization discovery in checks. Auto-discovered from clusters/ directory if not set.
kubeVersionString "1.33.0"No description provided
kubeconformSkips[String ! ] ["CustomResourceDefinition","VaultDynamicSecret"]Kubeconform resource kinds to skip.
kubeconformIgnores[String ! ] ["gotk-components","gotk-sync"]Kubeconform filename patterns to ignore.
githubTokenSecret -GithubToken is used for Helm registry login to ghcr.io. Set via .env: GITHUB_TOKEN=cmd://"gh auth token"
googleCredentialsSecret -GoogleCredentials is used for SOPS decryption (GCP KMS). Set via .env: GOOGLE_CREDENTIALS=cmd://"gcloud auth application-default print-access-token"
kubernetesServiceService -Kubernetes API service (e.g. k3d API). Set via .env: KUBERNETES_SERVICE=tcp://localhost:6550
gitServiceService -In-cluster Git mirror service. Set via .env: GIT_SERVICE=tcp://localhost:30080
kubeconfigSecret -Kubeconfig secret for the cluster. Set via .env: KUBECONFIG=file://~/.kube/config
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string
func (m *MyModule) Example(gitRepoName string) *dagger.Gitops  {
	return dag.
			Gitops(gitRepoName)
}
@function
def example(git_repo_name: str, ) -> dagger.Gitops:
	return (
		dag.gitops(git_repo_name)
	)
@func()
example(gitRepoName: string, ): Gitops {
	return dag
		.gitops(gitRepoName)
}

Types

Gitops 🔗

Gitops is a reusable Dagger module for GitOps workflows. It provides local Git mirror push/reload, Flux bootstrap, and static validation checks.

source() 🔗

Source is the working tree directory.

Return Type
Directory !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string source
func (m *MyModule) Example(gitRepoName string) *dagger.Directory  {
	return dag.
			Gitops(gitRepoName).
			Source()
}
@function
def example(git_repo_name: str, ) -> dagger.Directory:
	return (
		dag.gitops(git_repo_name)
		.source()
	)
@func()
example(gitRepoName: string, ): Directory {
	return dag
		.gitops(gitRepoName)
		.source()
}

gitRepoName() 🔗

GitRepoName is the bare repo name in the in-cluster Git mirror. Example: “infra.git”

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string git-repo-name
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			GitRepoName(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.git_repo_name()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.gitRepoName()
}

gitBranch() 🔗

GitBranch is the branch Flux reconciles from.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string git-branch
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			GitBranch(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.git_branch()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.gitBranch()
}

fluxNamespace() 🔗

FluxNamespace is the namespace where Flux controllers run.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string flux-namespace
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			FluxNamespace(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.flux_namespace()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.fluxNamespace()
}

fluxSourceName() 🔗

FluxSourceName is the name of the Flux GitRepository source.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string flux-source-name
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			FluxSourceName(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.flux_source_name()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.fluxSourceName()
}

gitUserName() 🔗

GitUserName is the Git committer name for local mirror pushes.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string git-user-name
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			GitUserName(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.git_user_name()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.gitUserName()
}

gitUserEmail() 🔗

GitUserEmail is the Git committer email for local mirror pushes.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string git-user-email
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			GitUserEmail(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.git_user_email()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.gitUserEmail()
}

clusters() 🔗

Clusters overrides auto-discovered Flux cluster names for checks.

Return Type
[String ! ] !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string clusters
func (m *MyModule) Example(ctx context.Context, gitRepoName string) []string  {
	return dag.
			Gitops(gitRepoName).
			Clusters(ctx)
}
@function
async def example(git_repo_name: str, ) -> List[str]:
	return await (
		dag.gitops(git_repo_name)
		.clusters()
	)
@func()
async example(gitRepoName: string, ): Promise<string[]> {
	return dag
		.gitops(gitRepoName)
		.clusters()
}

kubeVersion() 🔗

KubeVersion is the Kubernetes version used for helm template –kube-version.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string kube-version
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			KubeVersion(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.kube_version()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.kubeVersion()
}

kubeconformSkips() 🔗

KubeconformSkips are resource kinds to skip during kubeconform validation.

Return Type
[String ! ] !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string kubeconform-skips
func (m *MyModule) Example(ctx context.Context, gitRepoName string) []string  {
	return dag.
			Gitops(gitRepoName).
			KubeconformSkips(ctx)
}
@function
async def example(git_repo_name: str, ) -> List[str]:
	return await (
		dag.gitops(git_repo_name)
		.kubeconform_skips()
	)
@func()
async example(gitRepoName: string, ): Promise<string[]> {
	return dag
		.gitops(gitRepoName)
		.kubeconformSkips()
}

kubeconformIgnores() 🔗

KubeconformIgnores are filename patterns to ignore during kubeconform validation.

Return Type
[String ! ] !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string kubeconform-ignores
func (m *MyModule) Example(ctx context.Context, gitRepoName string) []string  {
	return dag.
			Gitops(gitRepoName).
			KubeconformIgnores(ctx)
}
@function
async def example(git_repo_name: str, ) -> List[str]:
	return await (
		dag.gitops(git_repo_name)
		.kubeconform_ignores()
	)
@func()
async example(gitRepoName: string, ): Promise<string[]> {
	return dag
		.gitops(gitRepoName)
		.kubeconformIgnores()
}

checkFluxIntegrity() 🔗

CheckFluxIntegrity validates Flux Kustomization paths and dependsOn references.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-flux-integrity
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckFluxIntegrity(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_flux_integrity()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkFluxIntegrity()
}

checkHelmReleases() 🔗

CheckHelmReleases dry-runs HelmRelease templates.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-helm-releases
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckHelmReleases(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_helm_releases()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkHelmReleases()
}

checkKubeconform() 🔗

CheckKubeconform validates rendered manifests against core and CRD schemas.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-kubeconform
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckKubeconform(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_kubeconform()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkKubeconform()
}

checkKustomizeBuild() 🔗

CheckKustomizeBuild renders every Flux Kustomization path for all clusters.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-kustomize-build
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckKustomizeBuild(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_kustomize_build()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkKustomizeBuild()
}

checkSopsDecrypt() 🔗

CheckSopsDecrypt verifies all encrypted secrets can be decrypted.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-sops-decrypt
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckSopsDecrypt(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_sops_decrypt()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkSopsDecrypt()
}

checkTerraform() 🔗

CheckTerraform validates and format-checks Terraform environments.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-terraform
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckTerraform(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_terraform()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkTerraform()
}

checkYamlLint() 🔗

CheckYamlLint lints YAML files.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -No description provided
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string check-yaml-lint
func (m *MyModule) Example(ctx context.Context, gitRepoName string)   {
	return dag.
			Gitops(gitRepoName).
			CheckYamlLint(ctx)
}
@function
async def example(git_repo_name: str, ) -> None:
	return await (
		dag.gitops(git_repo_name)
		.check_yaml_lint()
	)
@func()
async example(gitRepoName: string, ): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.checkYamlLint()
}

initialize() 🔗

Initialize bootstraps Flux on a cluster and pushes the local repo into the in-cluster Git mirror. Runs: push → flux install → apply bootstrap → wait ready.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
bootstrapPathString !-

BootstrapPath is the Flux bootstrap kustomization path within the repo. Example: “clusters/local/flux-system”

Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string initialize --bootstrap-path string
func (m *MyModule) Example(ctx context.Context, gitRepoName string, bootstrapPath string)   {
	return dag.
			Gitops(gitRepoName).
			Initialize(ctx, bootstrapPath)
}
@function
async def example(git_repo_name: str, bootstrap_path: str) -> None:
	return await (
		dag.gitops(git_repo_name)
		.initialize(bootstrap_path)
	)
@func()
async example(gitRepoName: string, bootstrapPath: string): Promise<void> {
	return dag
		.gitops(gitRepoName)
		.initialize(bootstrapPath)
}

reload() 🔗

Reload pushes the current working tree into the in-cluster Git mirror and reconciles Flux. Runs: push → reconcile → wait ready.

Return Type
String !
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
 --git-repo-name string reload
func (m *MyModule) Example(ctx context.Context, gitRepoName string) string  {
	return dag.
			Gitops(gitRepoName).
			Reload(ctx)
}
@function
async def example(git_repo_name: str, ) -> str:
	return await (
		dag.gitops(git_repo_name)
		.reload()
	)
@func()
async example(gitRepoName: string, ): Promise<string> {
	return dag
		.gitops(gitRepoName)
		.reload()
}