<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OAM Model :: Go Kure — Launcher</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/index.html</link><description>Package oam is launcher’s core: the OAM data model, YAML parser, semantic validator, and the transform pipeline that turns an Application + ClusterProfile into Kubernetes manifests. Every document this package parses uses apiVersion: launcher.gokure.dev/v1alpha1 (SupportedAPIVersion); the one exception is the raw-document lowering seam, where a RawDocumentLoweringRule may claim a kind under a consumer-owned group via RawDocumentAPIVersioner (see Lowering).</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.gokure.dev/launcher/dev/api-reference/oam/index.xml" rel="self" type="application/rss+xml"/><item><title>Pipeline</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/pipeline/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/pipeline/index.html</guid><description>The implementation and history of the section below are on the contributor page.&#10;Pipeline parse → resolve parameters → transform (component + trait handlers) → manifests Parse an Application/Package/ClusterProfile from YAML. Resolve parameters (ResolveParameters) — apply kurel.yaml declarations, values files, and --set overrides via ${var} substitution. Transform (Transformer) — dispatch each component to its ComponentHandler and each trait to its TraitHandler, merging the ClusterProfile’s capability choices. The transform orders components only where the document declares an order. No component type comes before another by itself. Three declarations order components:</description></item><item><title>Component label and ownership</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/labels-and-ownership/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/labels-and-ownership/index.html</guid><description>The implementation, history and tests of the sections below are on the contributor page.&#10;Component label and ownership Every application of a transformed document belongs to one authored component, or to the document as a whole. The transform records that as its last step, and two things follow from it: each application reports its owner, and each object it generates carries the owner’s component label.</description></item><item><title>Names and overrides</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/names-and-overrides/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/names-and-overrides/index.html</guid><description>The implementation, history and tests of the sections below are on the contributor page.&#10;Names and overrides Launcher shortens a name only when it generated that name itself, and always by one rule, ShortenName(name, limit). A name of at most limit characters is returned unchanged, so no document whose names fit changes output. A longer one becomes its first limit-11 characters with trailing -/. trimmed, a -, and the first 10 hex characters (ShortenNameDigestLength) of the sha256 of the whole name. The result is deterministic. Two different names over the limit share one only when their trimmed prefixes and their 40-bit digests both coincide; a name that fits is returned as written, so it can also equal the shortened form of a longer one. ShortenNameWithSuffix(name, suffix, limit) is the same rule for a name that ends in a fixed suffix (-hpa, -values-&lt;digest&gt;): the name is cut, the suffix kept whole. A suffix that leaves fewer than 10 characters of the limit (only one with an authored part of unbounded length, such as a routing trait’s scope) cannot be kept whole beside a full digest: the whole name+suffix is then shortened by the rule.</description></item><item><title>Parsing and type identity</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/parsing-and-types/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/parsing-and-types/index.html</guid><description>The implementation, history and tests of each section below are on the contributor page.&#10;Parsing Function Purpose Parse / ParseMulti / MustParse Parse one / many Application documents. ParsePackage Parse a Package (the kurel.yaml parameter declarations; the application is read separately). ParseClusterProfile Parse a ClusterProfile. spec.kubernetesVersion, when set, must be 1.N, v1.N or v1.N.P; see ValidateAuthoredPropertiesForTarget. spec.featureGates (gate name to bool) overrides a gate’s state; a name the gate table lacks is refused, and the map needs spec.kubernetesVersion; see ValidateAuthoredPropertiesForTargetWithGates. LoadCapabilityDefinitions Load CapabilityDefinitions for capability validation. ParseWithExtraTraitTypes Parse allowing additional (custom) trait types. ParseWithExtraTypes Parse allowing custom trait types and a LowerableTypes set — the document kinds, component types, trait types and policy types claimed by a transformer’s registered lowering rules, the policy types it has a handler for, and the component types it was given with RegisterAuthoredComponent. Standalone parsing validates each trait’s type against this package’s own allowlist of built-in trait types (the security-context, topology-spread, force-replace, disruption and monitoring traits are included, matching SecurityContextHandler, TopologySpreadHandler, ForceReplaceHandler, DisruptionHandler and MonitoringHandler); ParseWithExtraTraitTypes widens that allowlist with caller-supplied custom types. ParseWithExtraTypes widens it further with Transformer.LowerableTypes(), so a document authored in types that only a lowering rule understands parses ahead of the transform that will lower them away. The widening is additive and per position: an empty LowerableTypes is exactly the strict behaviour, a name claimed for one position never admits it at another, and decoding stays strict (KnownFields(true)), so a kind carrying its own authored fields still belongs to the raw lowering entry point.</description></item><item><title>Transform, extension and lowering</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/transform-and-lowering/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/transform-and-lowering/index.html</guid><description>The implementation, history and tests of the sections below are on the contributor page.&#10;Transform &amp; extension NewTransformer(...) builds a transformer from maps of component/trait handlers, and RegisterPolicy(type, handler) adds an application policy handler; the built-ins come from pkg/oam/builtin/registry (see Registering the builtins). Extend the system by implementing:&#10;Interface Role ComponentHandler CanHandle(type) + ToApplicationConfig(...) — see components. TraitHandler CanHandle(type) + Apply(...) — see traits. Apply mutates the application it is given and may append sub-applications to the bundle. It must not replace, remove or rename a component’s application there, its own or any other component’s of the bundle, including one whose traits already ran: the transform fails, naming the trait and the component, because NetworkPolicy synthesis finds a component’s application by its name and then its pointer, and a replaced, removed or renamed one would silently get no policy. Nor may it rename a sibling group member’s application: the member would generate its objects under a name the group does not carry, so the transform fails, naming the trait, the group and the member’s type. PolicyHandler CanHandle(type) + Apply(policy, components, result) — validates one spec.policies entry and records its effect (tier overrides, dependency edges), or its own data under PolicyResult.Extensions, on the shared PolicyResult; see policies. A policy type with no registered handler fails the transform. The transform returns an error from Apply as policy "&lt;name&gt;": &lt;error&gt;, so a handler says what is wrong and does not name the policy itself. CapabilityAware Mark a handler as requiring a ClusterProfile capability. ComponentCapabilityDefaults CapabilityDefaults() (key string, properties []string) — on a ComponentHandler whose properties take defaults from a ClusterProfile capability. Before ToApplicationConfig, the engine fills each listed property the component leaves unauthored (absent or null) from that binding’s rendering; an authored value, "" included, wins. It reads only the listed keys, never the rest of the rendering, and records the key in ConsumedCapabilities when the profile binds it. A component a lowering rule synthesized is skipped, as a sealed trait is. Each filled value is validated against the component’s own PropertySchema, which must declare every listed key: the trait side’s schema may differ. A handler that declares no schema relies on EvaluateProfile, which validates the binding only through the trait handler or trait lowering rule of the key’s type. Its fill is refused unless that handler or rule validates the rendering: it implements ValidateAndApplyDefaults, or the type is not built in and has a CapabilityDefinition, whose schema EvaluateProfile applies. Implemented by persistentvolumeclaim (pvc, storageClassName). ComponentCapabilityFiller FillCapabilityDefaults(props map[string]any, lctx LoweringContext) (map[string]any, error) — on a ComponentHandler whose capability defaults land below the top level of its properties, where ComponentCapabilityDefaults cannot reach. The engine calls it right after ComponentCapabilityDefaults, on a component no lowering rule synthesized, and passes the result to ToApplicationConfig; an error fails the component. On a kind component props no longer holds objectName, which the engine took out. It must not mutate props, and reads a binding only through lctx.Capability, which records the key in ConsumedCapabilities; lctx carries nothing else. The handler validates the values it fills; the engine’s schema check covers only ComponentCapabilityDefaults keys. Implemented by statefulset (pvc’s storageClassName into the spec.storageClassName of each volumeClaimTemplates entry that leaves it unauthored). PropertySchemaProvider Declare a PropertySchema for the handler’s user-facing properties (see Property schemas). ContractDescriber Declare ContractMetadata — contract family, version, required capability keys, prerequisites, platform needs, readiness, deprecation info (see Contract metadata). Every built-in handler and lowering rule implements it. ComponentPlatformNeeds PlatformNeedsFor(component *Component) []PlatformNeed — on a ComponentHandler whose platform needs depend on the component’s properties. PolicyResult.PlatformNeeds uses its answer for each component in place of the static ContractMetadata.PlatformNeeds. Implemented by cnpg-cluster, which reports barmancloud.cnpg.io when its properties enable the Barman Cloud plugin. LoweringTargetDeclarer LoweringTargets() LoweringTargets — on a lowering rule of any kind: the component, trait and policy types it lowers into. Transformer.Seal refuses a registry in which one of them is not registered (see Contract metadata). Every built-in lowering rule implements it. ComponentNamed Expose the owning OAM component (ComponentName() string) on a trait/component sub-app config, so consumers can attribute each emitted resource to its component without re-deriving it from sub-app names. The value is the raw component name; a consumer writing it into a label or selector passes it through ComponentLabelValue first. ApplicationNameSetter SetApplicationName(name string) — on a component config that builds a name out of the OAM application it belongs to, so the name differs when two differently named applications each have a component of the same name (the application’s namespace is not part of it). The transform calls it once, right after ToApplicationConfig and before policy and traits, with the name of the document it transforms (the name the application’s bundle carries). A config built directly, outside a transform, is never told one. Implemented by helmtemplate, whose hook-group child layouts are named &lt;application&gt;-&lt;component&gt;-NN-&lt;phase-slug&gt;. HookGroupNamePrefixSetter AuthoredHookGroupNamePrefix() (prefix string, authored bool) and SetHookGroupNamePrefix(prefix string) — on a component config whose AugmentLayout partitions it into hook-group layouts. The transform resolves the hook-group name role for it once, right after ApplicationNameSetter: the prefix the config reports as authored (the hookGroupNamePrefix property, HookGroupNamePrefixProperty), else the Naming hook’s answer, else the default &lt;application&gt;-&lt;component&gt;, and it calls SetHookGroupNamePrefix only with an authored or hook-given prefix, so a config left alone keeps its default names. A config built directly, outside a transform, sets its own. Implemented by helmtemplate (HelmTemplateConfig.HookGroupNamePrefix). LayoutKustomizationNameSetter AuthoredLayoutKustomizationName() (name string, authored bool) and SetLayoutKustomizationName(name string) — on a component config kure’s walker gives a layout of its own, which kure’s Flux integration under per-layout placement gives a Kustomization. The transform resolves the layout name role for it once, where it builds the bundle holding the component, before any trait: the name the config reports as authored (the layoutKustomizationName property, LayoutKustomizationNameProperty), else the Naming hook’s answer, else the default &lt;bundle&gt;-&lt;component&gt;. It calls SetLayoutKustomizationName with an authored or hook-given name only, never with the default, which is kure’s own. A config built directly, outside a transform, sets its own. Implemented by helmtemplate (HelmTemplateConfig.LayoutKustomizationName, which AugmentLayout sets on the layout unless it carries one). SubApplicationDecorator DecoratesSubApplications() bool — on a TraitHandler whose Apply decorates an application’s objects. When it returns true, the engine also calls Apply on every sub-application the component’s traits appended to the bundle, as the last step of the transform, so trait order does not matter; a trait forwarded to several sibling-group members decorates the group’s sub-applications once. Apply must not add, remove, replace, rename or reorder the bundle’s applications there (the transform fails), nor rename a sibling group member’s application, which the bundle does not hold: the transform fails, naming the trait, the sub-application it was decorating, the group and the member’s type. Implemented by prune-protection and force-replace, whose Apply sets the application’s delivery intent and wraps nothing. ServiceAccountNamer ServiceAccountName() (name string, runsPods bool) — the ServiceAccount a workload component’s pods run as: the authored serviceAccountName, or "" when none is authored (no pod kind generates an account; a webservice/worker hands its role-deployment member the name of the account it generates). runsPods reports whether the config runs pods at all; a trait decorator or sibling group that wraps no pod-running config reports false. Traits that bind identity to the workload (the rbac trait’s binding subject) read this instead of assuming the component name, and rbac refuses a pod-running component with no name. Implemented by every built-in pod kind config. Breaking library change: the method gained the runsPods result. LayoutAugmentationCoverage GenerateCoversAugmentLayout() bool — for a config that also implements kure’s layout.LayoutAugmenter, declare whether Generate alone already produces every resource AugmentLayout places into the layout. kurel build (which never walks a layout.ManifestLayout) uses this to fail closed: an augmenter that doesn’t implement this interface, or that implements it and returns false, is rejected outright rather than silently dropping layout-level resources from the output. ConfigWrapper WrappedApplicationConfig() stack.ApplicationConfig — a config that wraps another one and says so. The ownership wrapper is one; UnwrapConfig(cfg) returns the config under every such wrapper. After Transform every application’s config answers ComponentNamed through the ownership wrapper: the authored component, or "" for an application the document as a whole owns (Component label and ownership). A library caller hands properties to ComponentHandler.ToApplicationConfig, Transformer.Transform and Transformer.TransformWithPolicy. It must not change memory it handed over, a pointee inside the properties included, until it has used the result: the objects generated from the returned cluster, or from the config ToApplicationConfig returned. The passthrough component copies the maps, slices and arrays of its properties, and does not copy through a struct or the target of a pointer, so its Generate emits what a pointee, or a map or slice inside a struct, holds at that call. RegisterComponent, RegisterAuthoredComponent and RegisterComponentLowering panic when the plain name resolves to one declared type that is registered under another key, as their other collisions do (go-kure/launcher#1716; see Declaring and resolving).</description></item><item><title>Property schemas and contract metadata</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/schemas-and-contract/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/schemas-and-contract/index.html</guid><description>The implementation, history and tests of the sections below are on the contributor page.&#10;Property schemas Handlers may implement PropertySchemaProvider (PropertySchema() map[string]PropertySchema) to declare a constrained schema for their user-facing properties. PropertySchema is launcher’s single schema vocabulary — the same type also backs kurel.yaml parameters (ParameterDecl) and CapabilityDefinition rendering properties. It has Type (string/integer/boolean/number/array/object), Types, Description, Required, Default, Enum, nested Properties, Items, AdditionalProperties (default false; escape-hatch fields set it true), AdditionalPropertiesSchema, Exclusive, AtLeastOne and RequiredWhen. The rich fields (Types, Enum, Properties, Items, AdditionalProperties, AdditionalPropertiesSchema, Exclusive, AtLeastOne, RequiredWhen) are meaningful only for handler properties: the two flat call sites (kurel parameters, capability rendering) reject them at decode time, so unifying the type does not widen their accepted behavior.</description></item><item><title>Policy defaults and capability system</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/policy-and-capability/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/policy-and-capability/index.html</guid><description>The implementation, history and tests of the sections below are on the contributor page.&#10;Policy defaults &amp; enforcement Policy is a typed accessor interface (no type assertions in handlers) that carries per-environment enforced limits (MaxReplicas, MaxCPU, MaxMemory, MaxStorageSize, AllowedRegistries), defaults (DefaultReplicas, the CPU/memory request/limit defaults, and the workload-shape defaults DefaultStorageSize, DefaultScalerMinReplicas, DefaultScalerMaxReplicas), security flags, and two distinct capability-constraint families: AllowedCapabilities/ForbiddenCapabilities/RequiredCapabilities gate OAM trait-type strings (e.g. “ingress”, “autoscaling”). They judge the trait types an author wrote and the traits a component-position lowering rule wrote onto a part it emitted, so an emitted trait is refused when forbidden or outside the allowed list, and it counts toward RequiredCapabilities because the policy judges the output. Launcher’s own component rules are exempt: the traits they write (topology-spread, pvc, configmap, secret) are launcher’s opinions, so a policy sees the same outcome for them as before. A rule registered with RegisterBuiltinComponentLowering is exempt, and one registered with RegisterComponentLowering (an embedder’s or a model’s) is judged. A trait-position rule’s output is not judged: the authored type is, so a rule that renames expose to ingress leaves the policy reading expose. AllowedContainerCapabilities/ ForbiddenContainerCapabilities gate Linux capabilities on a container’s securityContext.capabilities.add (e.g. “NET_ADMIN”). Both families share the same nil/empty constraint-list convention under NoopPolicy — no Allowed/Forbidden/Required entries means unconstrained — but only the boolean security flags (AllowPrivileged, AllowHostPathVolumes, etc.) are default-deny; a container capability appearing in both an explicit Allowed list and the Forbidden list is rejected, since forbidden always wins, and a nil/empty Allowed/Forbidden list means no restriction/no forbids respectively. Handlers that implement Enforceable receive it via ApplyPolicy; NoopPolicy supplies zero values when no policy is set (so ApplyPolicy is always called with a non-nil value at runtime). A trait’s sub-application runs its ApplyPolicy after the trait’s Apply and is held to the same rule as the TraitHandler: it must not replace, remove or rename a component’s application in the bundle, nor rename a sibling group member’s. The transform fails, naming the trait, its component and the sub-application.</description></item><item><title>Fill report</title><link>https://www.gokure.dev/launcher/dev/api-reference/oam/fill-report/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.gokure.dev/launcher/dev/api-reference/oam/fill-report/index.html</guid><description>A consumer that builds an input form or an API from the published property schemas needs two facts a schema alone does not give: who supplies a value the author leaves out, and which policy refusal an authored value can cause. This page says where each fact is read and what it does not cover. It links to the full text and repeats none of it.&#10;Who supplies a value Transformer.TransformWithProvenance(app, ctx) returns, beside what TransformWithPolicy returns, a *Provenance: for each component and trait of the document, the source of every leaf value. The kinds are listed under “Property provenance” on Transform, extension and lowering. Four of them name a value the author did not write at that path:</description></item></channel></rss>