You are viewing development documentation built from the latest commit on main (last tag v0.2.0-rc.2, source commit 25e1a892).
APIs and features are subject to change.
Stack
The stack package defines the hierarchical domain model at the heart of Kure. It provides the Cluster, Node, Bundle, and Application abstractions used to describe a complete Kubernetes deployment topology.
Overview
Kure models Kubernetes infrastructure as a four-level hierarchy:
Cluster
└── Node (tree structure)
└── Bundle (deployment unit)
└── Application (workload)Each level maps to a concept in GitOps deployment:
| Level | Purpose | GitOps Mapping |
|---|---|---|
| Cluster | Target cluster | Root directory |
| Node | Organizational grouping (e.g., infrastructure, apps) | Subdirectory tree |
| Bundle | Deployment unit with dependencies | Flux Kustomization / ArgoCD Application |
| Application | Individual workload or resource set | Kubernetes manifests |
Key Types
Each Go block on this page, except the three marked as excerpts, is the body of an Example
function in example_test.go, which go test runs: it imports this package as stack,
github.com/go-kure/kure/pkg/stack/fluxcd for its side effect of registering the "flux"
workflow provider, k8s.io/apimachinery/pkg/runtime/schema, and fmt for the line that prints
what the example built. The myConfig type the examples use is the one the
Optional Validation
section declares; its Generate method also needs
strconv.
Cluster
The root of the hierarchy, representing a complete cluster configuration. Exported fields remain available for compatibility, while getter and setter methods support consumers that prefer method-based access.
GitOpsConfig.Bootstrap takes a BootstrapConfig: the Flux mode (flux-operator by default, or
gotk), the Flux version (in gotk mode, empty or the vendored fluxcd.GotkVersion builds
offline; any other value downloads manifests — the named release for vX.Y.Z, the latest
release otherwise; in flux-operator mode it is required, as is Registry, and an empty value
is an error) and components, and the sync
source — SourceKind, SourceURL,
SourceRef and SyncName, the name of the bootstrap source and Kustomization in both modes
(empty keeps each mode’s names: the operator uses the FluxInstance namespace, gotk the root
node’s name for the source and the generator’s BootstrapName for the Kustomization). For an
OCIRepository source, SourceSecretRef, SourceProvider and SourceInsecure give the
registry credentials, OIDC provider and plain-HTTP access in both modes, SourceVerify (a
SourceVerification) makes it verify the artifact’s signature, and SourceSemVer selects its
tag by a semver range instead of SourceRef. ImagePullSecret names the Secret the Flux
controller images are pulled with, in both modes: the gotk install option, or the
FluxInstance distribution’s imagePullSecret. It is not
a credential for the sync source. In flux-operator mode neither Registry nor
ImagePullSecret reaches the flux-operator Deployment in the vendored install bundle, whose
image is pulled as upstream ships it. A set Prune reaches the bootstrap Kustomization in both
modes, in flux-operator mode as a patch on the operator’s sync Kustomization; unset keeps each
mode’s default, prune: false in gotk mode and the operator’s prune: true in flux-operator
mode (go-kure/kure#1088). Labels are set on the bootstrap source and Kustomization in both
modes with a SourceURL, in flux-operator mode as patches on the operator’s sync objects; the
keys a Flux controller stamps on those objects are refused in both modes: flux-operator’s
app.kubernetes.io/managed-by, app.kubernetes.io/instance, app.kubernetes.io/version,
app.kubernetes.io/part-of, fluxcd.controlplane.io/name and fluxcd.controlplane.io/namespace,
and kustomize-controller’s kustomize.toolkit.fluxcd.io/name and
kustomize.toolkit.fluxcd.io/namespace (go-kure/kure#1180). See
Flux Bootstrap Generation
for how each field is emitted.
Node
A tree structure for organizing bundles into logical groups. Nodes can have children (sub-nodes) and a package reference for multi-source deployments.
A node whose directory renders no bundle (a group of nodes, say) is applied by a Flux Kustomization
of its own under the layout rule FluxPlacement: FluxIntegratedPerLayout. KustomizationName names
it, instead of the name derived from the node’s path, and DependsOn (nodes) and NamedDependsOn
(Kustomization names) order it. On any other node, under another placement and under the ArgoCD
workflow the three fields are refused rather than ignored. See
Flux Non-Bundle Child Layout CRs
.
Bundle
A deployment unit corresponding to a single GitOps resource (e.g., a Flux Kustomization). Bundles support dependency ordering via DependsOn (pointer-based) or NamedDependsOn (name-based, for cross-scope references).
The generated resource is named after the bundle. KustomizationName gives it another name
without renaming the bundle or moving its directory; UnitName() returns the name in effect.
Under the ArgoCD workflow the same value names the Application. A NamedDependsOn entry names
such a resource, so it reaches a bundle that sets KustomizationName by that value.
Bundle.Generate returns its applications’ objects with the bundle’s Labels and Annotations
added; an object’s own value for a key wins. Every annotation the object carries stays as
written, also on an unstructured object whose value is no string (a YAML boolean or number): only
the missing keys are added. Where the bundle sets labels, each object is given a new labels map;
where it sets annotations, each object that lacks one of them is given a new annotations map, and
one that carries them all keeps its own. A map its config also uses elsewhere (a Deployment’s
selector or pod template labels) is not written, and a new map is shared with neither the bundle
nor another object. A nil entry, or one holding no object (a nil client.Object, or a nil
pointer of an object type such as (*corev1.ConfigMap)(nil)), is returned as it is and gets
nothing.
Generate calls the object’s label and annotation methods. If one of them panics, Generate
returns no objects and an error that begins with the bundle’s name and then names only the Go
type of the object and the Go type of the panic value, never the panic text. Objects it handled
before that one stay changed; it does not put them back. An unstructured object whose metadata is
a nil map holds no annotations and takes none, so adding the bundle’s annotations leaves it as it
was.
A nil DependsOn entry is refused by Bundle.Validate, with the bundle’s path (an umbrella
descendant’s from the bundle that was validated: platform/infra/db) and the entry’s index; the
Flux generator refuses it the same way for a bundle it is handed unvalidated (GenerateForBundle).
A DependsOn entry need not be the cluster’s own bundle: another Bundle value with the same
Name is a copy of it, and a cluster resolves it by Name to that bundle, so the dependency is on
that bundle’s Kustomization. Leave KustomizationName empty on a copy, or set the name of the
bundle’s Kustomization (its UnitName(): the bundle’s KustomizationName, or its Name when it
sets none). ValidateCluster refuses, before it validates the bundles one by one:
- a copy that sets a
KustomizationNameother than that name, naming both; - a copy of a bundle whose Kustomization name is also in the dependant’s
NamedDependsOn: one dependency in both lists.
Bundle.Validate sees one bundle and no cluster, so it compares a DependsOn entry with
NamedDependsOn on the name that entry carries itself. One valid input is refused for that reason:
a name-only copy of a bundle that sets KustomizationName, beside a NamedDependsOn entry equal
to the bundle’s Name (which then means another Kustomization), is reported as one dependency in
both lists. Set the bundle’s KustomizationName on the copy to say which one is meant.
A bundle’s directory is named after the bundle as well. DirName gives it another name
(00-infra for the bundle shop-infra, say), and the path the generated resource applies follows
it; the resource’s name does not. The rule is one: wherever a bundle’s name becomes a directory,
DirName names it, or else Name. That is the case for an umbrella child, for a node’s bundle
under the layout rule BundleGrouping: GroupByName, and for the root node’s bundle under
GroupFlat, which has a directory inside the root node’s. Under GroupFlat below the root a
node’s bundle is rendered in its node’s directory and DirName has no effect on it. When a flat
NodeGrouping merges several bundles into the root node, the directory they share takes the first
merged bundle’s DirName, or its Name; a DirName on a later one has no effect.
A DirName must be one path segment (ValidateDirectoryName): not . or .., and without /,
\ or a NUL byte. Bundle.Validate checks it on the bundle and on every umbrella child, whether
or not the layout rules give the bundle a directory. It is no object name, so it need not be a
DNS-1123 subdomain: 00_Infra is valid.
NewBundle keeps a copy of the labels map it is given (a nil map stays nil), so editing that map
after the call leaves the bundle as it was built. It validates the bundle it builds; fields set
afterwards are checked by Bundle.Validate:
Interval, Timeout and RetryInterval take Go duration strings ("10m",
"1h30m"). Empty means the generator’s default interval, or, for
Timeout/RetryInterval, that the field is omitted so Flux’s own defaults
apply; any other value that does not parse ("5 minutes", "5min", "5")
is rejected by Bundle.Validate and by the Flux generator, never replaced by
the default. The error names the bundle, the field and the value, then the
parse error, once. The Flux generator also refuses a duration the Flux API does not
take, a negative one or a positive one under a millisecond ("-1s", "1us"), where it
writes the bundle’s Kustomization; Bundle.Validate accepts those, since the rule is
Flux’s (see the Flux engine’s “Durations”).
ServiceAccountName names the service account kustomize-controller impersonates when it
applies the bundle: the Flux workflow writes it to spec.serviceAccountName of the bundle’s
Kustomization and, under FluxPlacement: FluxIntegratedPerLayout, of the Kustomization of each
of the bundle’s applications that has a directory of its own and of each layout below it. Empty
writes nothing, as before, and the controller applies with its own identity, or with the default
service account it is started with (--default-service-account), if any. Flux looks the
account up in the Kustomization’s own namespace, the generator’s DefaultNamespace; creating the
account and its RBAC is the caller’s. An umbrella’s value is not passed to its Children: each
bundle carries its own. The value must be a DNS-1123 subdomain (see “Service account name”
below). The ArgoCD workflow does not read it.
Bundles also support an umbrella pattern via Bundle.Children. When a
bundle has non-empty Children, its generated Flux Kustomization automatically
gets an entry in spec.healthChecks for each child while Bundle.Wait is unset
or false,
giving external consumers a single readiness anchor for a group of bundles. A
Flux generator with OmitUmbrellaChildHealthChecks set writes none. With
Wait unset or false the umbrella then no longer waits for its children; it
is Ready once applied and its own HealthChecks, if any, pass (see the Flux
engine’s “With OmitUmbrellaChildHealthChecks”).
spec.wait is left to Bundle.Wait: the generator no longer forces it, because
upstream ignores healthChecks when wait is enabled, and with Wait true it
writes no entry for the children. Whether wait then covers the children
depends on the Flux placement (see the Flux engine’s “Umbrella Bundles”).
Under the integrated Flux placements the child bundles’ Flux Kustomization CRs
are rendered into the parent bundle’s directory; under FluxSeparate they go to
flux-system/ with every other one. Children must be standalone bundles — they cannot
simultaneously be attached as the Bundle of any stack.Node.
Bundle.HealthChecks can also be set explicitly to monitor specific resources
during reconciliation:
When Children is non-empty and Wait is not true, health checks for each child
Kustomization are auto-generated and merged with any user-supplied entries.
The user-supplied entries are handled as before; dropping the child entries
under Wait does not touch them.
Validation: ValidateCluster() runs automatically in all layout entry
points (WalkCluster, WalkClusterByPackage) and rejects invalid umbrella
configurations (e.g., shared ownership, children that are also node bundles).
It also rejects a Node tree containing a cycle, naming the node where the
cycle closes.
Names: a bundle name and a node name are checked when the model is
validated, and a limit that only one delivery engine has is checked by that
engine’s workflow when it generates, so a name that could never be applied is
refused before anything is written. A name the caller sets is never shortened
or rewritten: the caller chooses a valid name. The one name shortened is one
kure composes itself, the Flux workflow’s default <unit name>-<layout name>
for a layout’s own Kustomization (Flux Non-Bundle Child Layout CRs
,
“Per-layout name rule”).
| Name | Rule | Checked by |
|---|---|---|
| Bundle, including every umbrella child | a DNS-1123 subdomain and a directory name | Bundle.Validate |
A bundle’s KustomizationName, when set | a DNS-1123 subdomain | Bundle.Validate |
The name a bundle’s Kustomization gets in the Flux workflow (UnitName()) | a Flux Kustomization name | the Flux generator, where it builds the Kustomization |
| Node | a directory name, under every layout grouping; an unnamed root is allowed, it adds no path segment | ValidateCluster |
The name a node’s own Kustomization gets in the Flux workflow (its KustomizationName, or the derived <path>-node) | a Flux Kustomization name | the Flux layout integrator, where it creates the Kustomization |
An entry of a node’s NamedDependsOn | not empty and not repeated; its value is a caller-supplied reference and is not checked, as for a bundle’s | ValidateCluster |
| Application | a directory name, only where the layout rules give the application a directory | layout.WalkCluster |
- Bundle name: a DNS-1123 subdomain, at most 253 characters: lower-case
letters, digits,
-and., starting and ending with a letter or digit.my.appis valid;My-Appis not. This is what holds for every delivery engine, because the engine applies the bundle with an object named after it (a Flux Kustomization, an ArgoCD Application). AKustomizationNamenames that object instead of the bundle’s name, so it is a DNS-1123 subdomain too; it is no directory name. The bundle’sNameis checked the same with or without it. - Kustomization name (
ValidateKustomizationName): a DNS-1123 subdomain of at mostKustomizationNameMaxLength(63) characters. The limit is Flux’s, soBundle.ValidateandValidateClusterdo not apply it: the Flux workflow refuses a longer name where it builds the bundle’s Kustomization, before anything is written, and the same name validates and renders an Application in the ArgoCD workflow. The name checked is the one the Kustomization gets,UnitName(): theKustomizationName, or theNamewithout one, so aNameover the limit beside aKustomizationNamewithin it generates. The limit is 63 and not the 253 of an object name because Flux writes the Kustomization’s name into a label value on every object it applies. Read in kustomize-controller v1.10.1, the version this module pins: the reconciler hands the name to the apply manager as the owner of the objects (internal/controller/kustomization_controller.go:489), and the manager sets it as the value of thekustomize.toolkit.fluxcd.io/namelabel (github.com/fluxcd/pkg/ssav0.83.0,manager.go:66-78). - Directory name (
ValidateDirectoryName): one path segment. It is not empty, not.or.., and holds neither/nor\nor a NUL byte. The backslash is refused on every platform, so a name such as..\outsidecannot leave its directory where the backslash is a separator. A NUL byte is refused because a directory with one in its name cannot be created; characters that only some file systems refuse are not checked. - Service account name (
ValidateServiceAccountName): a DNS-1123 subdomain, the rule Kubernetes sets for a ServiceAccount’s name.Bundle.Validatechecks aServiceAccountNameon the bundle and on every umbrella child, and the error names the bundle by its path. The Flux generator checks it again where it writes the bundle’s Kustomization, for a bundle generated withoutValidate. Flux’s Kustomization does not check the field, so a name no ServiceAccount can have would be admitted there and fail only at reconcile.
A node name is checked whatever the layout rules are, also where flat node
grouping absorbs the node into its parent’s directory. The name is a segment
of the node’s path in the model before it is a directory: Node.GetPath and
the path map join node names with /, so two unnamed children of one node
have the same path, and so do a node named a/b and a node b below a
sibling a. A cluster with an unnamed node below the
root, or with a separator in a node name, is therefore refused under every
grouping.
An error from either rule names where the name sits: a bundle by its path from
the bundle that was validated (platform/platform-infra), a node by its path
from the root, and ValidateCluster adds the node a refused bundle is attached
to (bundle "web" at node "apps/web" failed validation). An umbrella child
without a name is refused earlier, by the check on Children, which names its
parent and the child’s index. Both functions are exported so that code deriving
a name from these fields can check the result with the same rule. The Flux
generator’s refusal of a Kustomization name over 63 characters names the
bundle by Bundle.GetPath, which for an umbrella child of a walked cluster
holds its umbrella’s path (platform/platform-infra), and the field that
holds the name (name or kustomizationName). Its refusal of the name of a
node’s own Kustomization names the node by its path from the root and the
field kustomizationName, also where the name was derived and the field is
the one to set. Two Flux
entry points take a bundle or a node that no cluster validation has seen and
apply a rule themselves: the generator checks the whole Kustomization name
rule on a bundle it is handed directly (GenerateForBundle), and the bootstrap
generator checks the root node’s name as a directory name wherever it builds a
path from it.
Application
An individual Kubernetes workload. Applications use the ApplicationConfig interface to generate their resources.
Delivery intent
Application.Delivery states how the delivery engine should treat the application’s objects,
in engine-neutral terms. Both fields default to off, and an application that sets neither renders
exactly as before.
| Field | Meaning |
|---|---|
PruneProtection | Keep the application’s objects in the cluster when they are removed from the source. |
ForceReplace | Allow an object to be deleted and recreated when a change touches an immutable field. |
The intent covers every object the application emits, the objects a layout augmenter adds to the
application’s own directory, and the ConfigMaps built from that directory’s configMapGenerator
entries. Each workflow engine maps it to its own mechanism: the Flux workflow writes per-object
annotations (see Flux Layout Integration
); the ArgoCD workflow has no mapping
yet and refuses an application that sets one. The Flux GenerateFromCluster refuses one too: it
returns Kustomizations and Sources and none of the application’s objects, so use
CreateLayoutWithResources. Bundle.Prune and Bundle.Force stay the
bundle-wide switches on the generated Flux Kustomization and are independent of this field.
ApplicationConfig Interface
Implement this interface to define how an application generates its Kubernetes resources:
Optional Validation
ApplicationConfig implementations can optionally implement the Validator interface to validate configuration before resource generation:
When present, Application.Generate() calls Validate() automatically before Generate(). If validation fails, generation stops and the error is returned with application context:
errors is github.com/go-kure/kure/pkg/errors, kubernetes is
github.com/go-kure/kure/pkg/kubernetes, and client is
sigs.k8s.io/controller-runtime/pkg/client.
Validation errors are wrapped with application name and namespace:
validation failed for application "web" in namespace "prod": port must be positiveConfigs that do not implement Validator continue to work without changes.
Generation contract
What Generate returns belongs to the caller from the moment it returns: the slice, every
object it points to, and every map, slice and pointer those objects hold. kure writes to the objects.
Bundle.Generate adds the bundle’s labels and annotations that an object lacks, and the Flux
integrator adds an application’s delivery annotations (see Flux Layout Integration
).
A caller that holds the layout may edit them as well. So:
- Return nothing you keep or have returned before. Build each result fresh, or return a
DeepCopy()of a cached one. Do not share a map between objects, or between fields of one object: kure gives an object a new map where it adds labels or annotations, but a caller’s edit of a Deployment’s labels map in the layout also reaches a selector that shares it. - Every call is independent, failed ones included. A walk (
layout.WalkCluster,layout.WalkClusterByPackage) callsGenerateonce for each application it renders. Every workflow entry point that renders applications walks once, and nothing memoizes across calls: validating with one entry point and laying out with another generates twice. A walk in which one call fails returns no layout. - To reuse a result you already validated, memoize in the config. Validate and render once, then return a deep copy on each call. The copy is linear in the objects’ size, so it pays for itself only where rendering costs more than copying, as with templates, charts and decoded YAML.
- No concurrency. kure never calls
Generateconcurrently. Memoizing does not make a config safe for concurrent use, and a config safe for concurrent use need not memoize. - Wrappers forward the optional interfaces. kure finds
Validator,ContextApplicationConfig,layout.LayoutAugmenterandlayout.LayoutIntentAugmenterby type assertion on the config itself. A wrapper that embeds theApplicationConfiginterface hides all four, silently: no validation, no context, no augmentation, and under flat application grouping no layout of its own. Embed the concrete type, or forward each method.
Application.Generate runs Validate and Generate on every call and never augments a layout;
only a walk does. The tests in pkg/stack/layout/generation_contract_test.go (walks) and
pkg/stack/generation_contract_test.go (workflow entry points) show the call counts per walk
and per entry point, what the augmenter sees and where it is skipped, that a failed walk returns
no layout and a later walk uses nothing from it, that one walk’s edits stay out of the next for fresh and deep-copying configs
but not for a shared cache, and what each wrapper shape keeps. No test shows the concurrency
rule: it is a property of kure’s code.
To hold a config of your own to this contract, call stacktest.AssertGeneration from its tests
(Stack Test Helpers
): it fails for anything two calls share or one
result reaches twice, and stacktest.InterfacesOf shows what a wrapper hides.
Stopping generation with a context
A caller can stop generation with a context.Context. Every generation entry point has a
variant that takes one as its first argument, and the entry point without it is that variant
called with context.Background(), so a caller that passes none gets the output it always got.
| Entry point | Variant that takes a context |
|---|---|
Application.Generate | Application.GenerateContext |
Bundle.Generate | Bundle.GenerateContext |
layout.WalkCluster, layout.WalkClusterByPackage | layout.WalkClusterContext, layout.WalkClusterByPackageContext |
stack.Workflow: GenerateFromCluster, CreateLayoutWithResources, GenerateBootstrap | stack.ContextWorkflow: the same three names with Context appended |
Flux: ResourceGenerator.GenerateFromCluster and GenerateFromLayout, LayoutIntegrator.CreateLayoutWithResources and IntegrateWithLayout, BootstrapGenerator.GenerateBootstrap and GenerateFluxInstance | the same names with Context appended |
helm.RenderChart | the option helm.WithContext |
stack.ContextWorkflow is an optional interface, found by type assertion on the Workflow as
Validator is found on a config; both engines kure ships implement it, so
wf.(stack.ContextWorkflow) succeeds for what stack.NewWorkflow returns.
The contract. Generation checks the context before it starts and between its steps: before
each node, bundle and application a walk renders, before each Flux Kustomization the
reconcile-order check builds, and before the step that builds the bootstrap resources. Once the
context is done, the call returns no objects and an error that matches the context’s own error
under errors.Is (context.Canceled or context.DeadlineExceeded), except in the cases listed
under “What is not” below. A call that was stopped
leaves a layout it was integrating as the caller gave it, as every refusal does. That undo has one
limit it always had: where an object’s own annotation setter panics while the integrator takes its
delivery annotations back, the undo is refused and the error holds both failures. The context also
reaches Flux’s variable substitution and, for a chart render, the content source and every request
of an OCI registry pull.
What cannot be interrupted. A step that has started runs to its end:
- one application’s
Generate, unless its config implementsContextApplicationConfigand stops itself; - a
layout.LayoutAugmenterorlayout.LayoutIntentAugmentercall, which take no context; - one kustomize build and one variable substitution of the Flux reconcile-order check;
- the download of a chart from an HTTP repository, because Helm’s HTTP getter takes no context (an OCI pull is stopped in flight);
- the rendering of a chart’s templates, and the build of the bootstrap resources once started.
So a generation stopped at one of these ends when the step ends, not when the context does.
What is guaranteed. The context is checked at entry, between steps, and after the long steps
that cannot be interrupted. When the context went done during one of those and the step succeeded,
the call returns the context’s error and none of what the step built. The checks are:
Application.GenerateContext after its config returns, a chart render after the templates are
rendered, a bootstrap call after the resources are built, a walk after its last augmenter, a Flux
or ArgoCD generation after its last unit, and an integration after the build of the tree that
judges the Kustomizations it kept and its umbrellas. A chart render also checks the context after a
content source’s lookup and before it fetches an HTTP repository’s index, and
helm.RenderChartFromArchive checks it before it loads the archive, so a stop there is the
context’s error whatever the repository or the archive holds.
What is not. A step that cannot be interrupted may still end in success when the context went done during it, in-memory assembly included: the recording of Kustomizations at the end of an integration, the labels and annotations a bundle adds to its objects, and the assembly of a chart’s rendered templates are examples. The result of such a call is complete and correct; it only came after the context was done. A step that failed on its own returns its own error as it always did, with whatever it returned beside it, and that error need not match the context’s. A step that failed because the context stopped it returns the context’s error: so does an OCI blob read the stop interrupts at its end, where the registry client reports trailing data in place of the read’s error. It reports the same for a blob that really has trailing data, so a trailing-data error that arrives once the context is done is returned as the context’s error.
Giving a config the context. A config that does work a caller may want to stop implements
ContextApplicationConfig next to ApplicationConfig:
Application.GenerateContext calls it instead of Generate and passes the caller’s context. A
config that implements only ApplicationConfig is called through Generate, and the context is
checked before that call and not during it. A config forwards the context to what it calls, such
as helm.RenderChart(..., helm.WithContext(ctx)).
Fluent Builder API
For ergonomic cluster construction, use the fluent builder. Builder methods
use copy-on-write semantics — each With* call returns a new builder
instance, leaving the original unchanged. Build returns the cluster, or every error the chain
collected, joined:
Workflow System
The package provides a pluggable workflow abstraction for GitOps tool integration:
GenerateFromCluster walks the cluster with the layout rules you pass: every Flux
Kustomization spec.path and ArgoCD Application source.path is a directory that walk writes,
so pass the rules you write the tree with (layout.DefaultLayoutRules() for the defaults). The
rules must be a layout.LayoutRules value; anything else, nil included, is refused. Neither
engine returns a list for rules with FluxIntegratedPerLayout (the Flux Kustomizations that
apply that tree’s child directories exist only in a layout): use CreateLayoutWithResources
with the Flux engine for that placement.
CreateLayoutWithResources takes the same rules and also returns the layout it walked, with
the resources placed in it.
GenerateBootstrap(config, rootNode, rules) takes the same rules too, and points Flux at the top
directory of the tree a walk with them writes (see
Flux Bootstrap Generation
).
Supported workflow providers: "flux" / "fluxcd" and "argo" / "argocd". Each is registered by
importing its package, and NewWorkflow returns that package’s *fluxcd.WorkflowEngine or
*argocd.WorkflowEngine; without the import it fails with an error naming the package to import.
Source References
Bundles and nodes can reference different source types for multi-source deployments: a bundle
through its SourceRef field, a node through its PackageRef, a schema.GroupVersionKind:
Related Packages
- stack/fluxcd - FluxCD workflow engine implementation
- stack/layout - Manifest directory organization