kure

module
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0

README

Kure

CI codecov Go Report Card Go Reference License Release

Kure is a Go library for programmatically building Kubernetes resources used by GitOps tools like Flux, cert-manager, MetalLB, and External Secrets. The library emphasizes strongly-typed object construction over templating engines, providing a clean, type-safe approach to Kubernetes manifest generation.

Features

  • Type-safe Kubernetes resource builders (Deployments, Services, RBAC, etc.)
  • GitOps workflow support (Flux CD and ArgoCD)
  • Hierarchical domain model (Cluster → Node → Bundle → Application)
  • Declarative JSONPath-based patching
  • Certificate management (cert-manager, ACME)
  • Secret management (External Secrets, multiple cloud providers)
  • Network configuration (MetalLB)
  • Manifest layout engine with auto-generated kustomization.yaml
  • Built-in configuration validation

Installation

go get github.com/go-kure/kure

CLI Tools

Kure ships two CLI tools: kure for manifest generation and patching, and kurel for package-based resource management. Run kure --help or kurel --help for usage details.

Documentation

  • Website — guides, architecture, and tutorials
  • API Reference — full Go package documentation
  • examples/ — cluster configurations, kurel packages, and patching samples

Development

Quick commands:

make build   # Build all executables
make test    # Run tests
make lint    # Run linter

License

This project is licensed under the Apache License 2.0.

Directories

Path Synopsis
cmd
demo command
gendocs command
cmd/gendocs generates CLI reference documentation from cobra command trees.
cmd/gendocs generates CLI reference documentation from cobra command trees.
kure command
kurel command
internal
certmanager
Package certmanager provides helpers for building cert-manager resources such as Certificates, Issuers and ClusterIssuers.
Package certmanager provides helpers for building cert-manager resources such as Certificates, Issuers and ClusterIssuers.
externalsecrets
Package externalsecrets contains helpers for constructing resources used by the External Secrets Operator.
Package externalsecrets contains helpers for constructing resources used by the External Secrets Operator.
fluxcd
Package fluxcd provides helper functions for creating Flux CD resources.
Package fluxcd provides helper functions for creating Flux CD resources.
gvk
Package gvk provides shared infrastructure for Group, Version, Kind (GVK) based type systems within Kure.
Package gvk provides shared infrastructure for Group, Version, Kind (GVK) based type systems within Kure.
kubernetes
Package k8s offers helper functions for core Kubernetes resources such as Deployments, Services and ConfigMaps.
Package k8s offers helper functions for core Kubernetes resources such as Deployments, Services and ConfigMaps.
metallb
Package metallb provides constructors for MetalLB custom resources including BGP peers, IPAddressPools and advertisements.
Package metallb provides constructors for MetalLB custom resources including BGP peers, IPAddressPools and advertisements.
pkg
cli
Package cli provides shared utilities and abstractions for building command-line interfaces in the Kure and kurel tools.
Package cli provides shared utilities and abstractions for building command-line interfaces in the Kure and kurel tools.
cmd/kure/initialize
Package initialize implements the "kure init" command, which scaffolds a new project directory with cluster configuration and example application templates ready for use with "kure generate cluster".
Package initialize implements the "kure init" command, which scaffolds a new project directory with cluster configuration and example application templates ready for use with "kure generate cluster".
errors
Package errors provides structured error types and handling utilities for the Kure library and kurel tool.
Package errors provides structured error types and handling utilities for the Kure library and kurel tool.
io
Package io provides utilities for reading, writing and parsing YAML representations of Kubernetes resources.
Package io provides utilities for reading, writing and parsing YAML representations of Kubernetes resources.
kubernetes
Package kubernetes provides helper functions for working with core Kubernetes resource types.
Package kubernetes provides helper functions for working with core Kubernetes resource types.
kubernetes/fluxcd
Package fluxcd exposes helper functions for constructing resources used by the Flux family of controllers.
Package fluxcd exposes helper functions for constructing resources used by the Flux family of controllers.
launcher
Package launcher provides a declarative Kubernetes manifest generation system that supports variable substitution, patch application, and schema validation.
Package launcher provides a declarative Kubernetes manifest generation system that supports variable substitution, patch application, and schema validation.
logger
Package logger provides a structured logging interface for the Kure library.
Package logger provides a structured logging interface for the Kure library.
patch
Package patch provides declarative patching of Kubernetes resources using a simple, structured syntax without templates or overlays.
Package patch provides declarative patching of Kubernetes resources using a simple, structured syntax without templates or overlays.
stack
Package stack provides the core domain model for defining and generating Kubernetes cluster configurations with GitOps tooling (Flux CD or ArgoCD).
Package stack provides the core domain model for defining and generating Kubernetes cluster configurations with GitOps tooling (Flux CD or ArgoCD).
stack/generators
Package generators provides a pluggable system for generating Kubernetes resources from different configuration formats.
Package generators provides a pluggable system for generating Kubernetes resources from different configuration formats.
stack/generators/appworkload
Package appworkload provides generators for creating standard Kubernetes workloads (Deployments, StatefulSets, DaemonSets) along with their associated resources (Services, Ingresses, PersistentVolumeClaims).
Package appworkload provides generators for creating standard Kubernetes workloads (Deployments, StatefulSets, DaemonSets) along with their associated resources (Services, Ingresses, PersistentVolumeClaims).
stack/generators/fluxhelm
Package fluxhelm provides generators for creating Flux HelmRelease resources along with their associated source resources (HelmRepository, GitRepository, OCIRepository, or Bucket).
Package fluxhelm provides generators for creating Flux HelmRelease resources along with their associated source resources (HelmRepository, GitRepository, OCIRepository, or Bucket).
stack/generators/kurelpackage
Package kurelpackage provides a generator for creating kurel packages from Kubernetes manifests with support for values substitution, patches, and conditional extensions.
Package kurelpackage provides a generator for creating kurel packages from Kubernetes manifests with support for values substitution, patches, and conditional extensions.
stack/layout
Package layout provides utilities for generating cluster directory layouts and for writing Kubernetes and Flux manifests to disk.
Package layout provides utilities for generating cluster directory layouts and for writing Kubernetes and Flux manifests to disk.

Jump to

Keyboard shortcuts

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