gitops
No long description provided.
Installation
dagger install github.com/seamlezz/daggerverse/gitops@v0.4.0Entrypoint
Return Type
Gitops !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Workspace | - | Source is the working tree directory. |
| rootDir | String | "/" | No description provided |
| gitRepoName | String ! | - | GitRepoName is the bare repo name in the in-cluster Git mirror. Example: "infra.git" |
| gitBranch | String | "main" | No description provided |
| fluxNamespace | String | "flux-system" | No description provided |
| fluxSourceName | String | "flux-system" | No description provided |
| gitUserName | String | "Winston" | No description provided |
| gitUserEmail | String | "winston@seamlezz.com" | No description provided |
| clusters | [String ! ] | - | Cluster names for Flux Kustomization discovery in checks. Auto-discovered from clusters/ directory if not set. |
| kubeVersion | String | "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. |
| githubToken | Secret | - | GithubToken is used for Helm registry login to ghcr.io. Set via .env: GITHUB_TOKEN=cmd://"gh auth token" |
| googleCredentials | Secret | - | GoogleCredentials is used for SOPS decryption (GCP KMS). Set via .env: GOOGLE_CREDENTIALS=cmd://"gcloud auth application-default print-access-token" |
| kubernetesService | Service | - | Kubernetes API service (e.g. k3d API). Set via .env: KUBERNETES_SERVICE=tcp://localhost:6550 |
| gitService | Service | - | In-cluster Git mirror service. Set via .env: GIT_SERVICE=tcp://localhost:30080 |
| kubeconfig | Secret | - | 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 stringfunc (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 sourcefunc (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-namefunc (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-branchfunc (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-namespacefunc (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-namefunc (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-namefunc (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-emailfunc (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 clustersfunc (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-versionfunc (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-skipsfunc (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-ignoresfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-flux-integrityfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-helm-releasesfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-kubeconformfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-kustomize-buildfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-sops-decryptfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-terraformfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | No description provided |
Example
dagger -m github.com/seamlezz/daggerverse/gitops@faae777c513465df8f74c86b60b87765a2008ff0 call \
--git-repo-name string check-yaml-lintfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| bootstrapPath | String ! | - | 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 stringfunc (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 reloadfunc (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()
}