plumbing

module
v1.80.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 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 conditions is the single shared home for condition strings that more than one Krateo controller writes, so that a consumer gating on one of them reads the same bytes whichever controller produced it.
Package conditions is the single shared home for condition strings that more than one Krateo controller writes, so that a consumer gating on one of them reads the same bytes whichever controller produced it.
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.
e2e
kubepin
Package kubepin pins KUBECONFIG for a test suite that starts a cluster.
Package kubepin pins KUBECONFIG for a test suite that starts a cluster.
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
content
Package content compares Kubernetes objects by content, in the one form the AUDIT-4 ruling defines (snowplow, 2026-11-11): what an object grants or holds, not how it happens to be written.
Package content compares Kubernetes objects by content, in the one form the AUDIT-4 ruling defines (snowplow, 2026-11-11): what an object grants or holds, not how it happens to be written.
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.
Package tracecontext is the krateo.io/traceparent rule both Krateo runtimes apply, so that a composition's reconcile trace (unstructured-runtime) and its provider's managed-resource trace (provider-runtime) relate to an upstream trace in the same way.
Package tracecontext is the krateo.io/traceparent rule both Krateo runtimes apply, so that a composition's reconcile trace (unstructured-runtime) and its provider's managed-resource trace (provider-runtime) relate to an upstream trace in the same way.
Package usernames holds the static rules for the usernames authn issues, so every component that names a user (authn's name guard, an access-request form, an approval controller) decides from one definition rather than a copy.
Package usernames holds the static rules for the usernames authn issues, so every component that names a user (authn's name guard, an access-request form, an approval controller) decides from one definition rather than a copy.

Jump to

Keyboard shortcuts

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