plumbing

module
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0

README

plumbing

The shared Go library of the Krateo platform — reusable building blocks and the cross-repo contracts (helm reconcile engine, crdgen, composition labels) consumed by core-provider, composition-dynamic-controller and the platform services.

test Reference

What is this

A flat collection of independent Go packages with one module identity. It carries the Helm client with the fork-free apply-if-changed Reconcile engine that composition-dynamic-controller runs on, the crdgen JSON-Schema → CRD transpiler core-provider uses, the labels package that pins the core-provider ↔ CDC label contract at compile time, plus kubeutil/*, jwtutil and small utilities. Library only: no binary, no image, no chart. Full picture: docs/index.md.

Install

go get github.com/krateo-platformops/plumbing@v1.13.2

Configure

There is almost nothing to configure — see docs/configuration.md. Most used:

Setting Default Effect
HELM_DRIVER secret Helm release-storage driver used by helm/v3.
CLUSTER_NAME unset Overrides kubeutil.DetectClusterName.
build tag envtest off Selects the real-apiserver functional tests (make test-envtest).

Examples

  • examples/minimal — values.schema.json → CRD via crdgen.Generate; go run ./examples/minimal.

Docs

Develop & release

go build ./... && make test-race (CI adds make test-envtest). Releases are plain vX.Y.Z git tags — see docs/release.md.

Directories

Path Synopsis
Package crdgen transpiles a chart's JSON Schema (values.schema.json) into a Kubernetes CustomResourceDefinition via a direct JSON-Schema -> structural-OpenAPI-v3 walk.
Package crdgen transpiles a chart's JSON Schema (values.schema.json) into a Kubernetes CustomResourceDefinition via a direct JSON-Schema -> structural-OpenAPI-v3 walk.
Package dialguard refuses outbound connections to special-purpose addresses, checked on the address ACTUALLY DIALLED.
Package dialguard refuses outbound connections to special-purpose addresses, checked on the address ACTUALLY DIALLED.
examples
minimal command
Command minimal is the runnable example for the plumbing library: it feeds a chart-style values.schema.json (JSON Schema) to crdgen.Generate and prints the resulting CustomResourceDefinition YAML — the exact transformation core-provider performs for every CompositionDefinition.
Command minimal is the runnable example for the plumbing library: it feeds a chart-style values.schema.json (JSON Schema) to crdgen.Generate and prints the resulting CustomResourceDefinition YAML — the exact transformation core-provider performs for every CompositionDefinition.
Package fieldpath parses a field path into typed segments.
Package fieldpath parses a field path into typed segments.
v3
http
dynamicwatch
Package dynamicwatch registers a controller-runtime watch on a Kind whose GroupVersionKind is not known until runtime (e.g.
Package dynamicwatch registers a controller-runtime watch on a Kind whose GroupVersionKind is not known until runtime (e.g.
hasher
Package hasher computes a cumulative, order-dependent hash over arbitrary JSON-marshalable values.
Package hasher computes a cumulative, order-dependent hash over arbitrary JSON-marshalable values.
objectclient
Package objectclient provides retrying, dynamic.Interface-based create-or-update ("Apply"), Get, and delete-if-present ("Uninstall") helpers for arbitrary Kubernetes objects.
Package objectclient provides retrying, dynamic.Interface-based create-or-update ("Apply"), Get, and delete-if-present ("Uninstall") helpers for arbitrary Kubernetes objects.
rbacgen
Package rbacgen builds least-privilege Role/RoleBinding objects that grant a single ServiceAccount access to an exact, named set of resources (e.g.
Package rbacgen builds least-privilege Role/RoleBinding objects that grant a single ServiceAccount access to an exact, named set of resources (e.g.
secretref
Package secretref reads a single key out of a Kubernetes Secret via a dynamic.Interface.
Package secretref reads a single key out of a Kubernetes Secret via a dynamic.Interface.
Package labels is the single shared home for the Krateo Composition label keys that couple core-provider and composition-dynamic-controller across repositories.
Package labels is the single shared home for the Krateo Composition label keys that couple core-provider and composition-dynamic-controller across repositories.
server
use
use/cors
cors package is net/http handler to handle CORS related requests as defined by http://www.w3.org/TR/cors/
cors package is net/http handler to handle CORS related requests as defined by http://www.w3.org/TR/cors/
Package shortid enables the generation of short, unique, non-sequential and by default URL friendly Ids.
Package shortid enables the generation of short, unique, non-sequential and by default URL friendly Ids.

Jump to

Keyboard shortcuts

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