Documentation
¶
Index ¶
- Constants
- func MatchGVK(resGvk, target resid.Gvk) bool
- func ValidateLocalKustomization(fs filesys.FileSystem, root, path string) error
- func ValidateLocalPath(fs filesys.FileSystem, root, path string) error
- type Provenance
- type Render
- func (r *Render) AbsorbAll(src resmap.ResMap) error
- func (r *Render) AbsorbWithProducer(source, producer string, src resmap.ResMap) error
- func (r *Render) ApplyNamespaceToNew(count int, namespace string) error
- func (r *Render) ApplySubstitutionsToNew(count int, producer string, substitutions map[string]string) error
- func (r *Render) AsJSON() ([]byte, error)
- func (r *Render) FilterByLabel(key, value string)
- func (r *Render) FilterCRDs()
- func (r *Render) MarkProvenanceToNew(count int, producer string)
- func (r *Render) ProvenanceForID(id resid.ResId) Provenance
- func (r *Render) ResourceViewForID(id resid.ResId) (ResourceView, bool)
- func (r *Render) SetProvenance(id resid.ResId, p Provenance)
- func (r *Render) Sort()
- func (r *Render) Warnings() []error
- type ResourceView
Constants ¶
const ProducerAnnotation = "fmp.tobiash.github.io/producer"
Variables ¶
This section is empty.
Functions ¶
func MatchGVK ¶
MatchGVK reports true if the resource's GVK matches the target by group and kind. Version is ignored because Flux resources exist in multiple API versions.
func ValidateLocalKustomization ¶
func ValidateLocalKustomization(fs filesys.FileSystem, root, path string) error
ValidateLocalKustomization checks every supported read reference before krusty can interpret it as a URL. Custom generators/transformers/validators and Helm generators are deliberately unsupported; external plugins remain disabled.
func ValidateLocalPath ¶
func ValidateLocalPath(fs filesys.FileSystem, root, path string) error
ValidateLocalPath requires an existing path inside root, resolving symlinks. It validates references, not concurrent filesystem mutations or OS isolation.
Types ¶
type Provenance ¶
Provenance identifies the Flux rendering source that produced a resource.
func HelmReleaseProvenance ¶
func HelmReleaseProvenance(namespace, name string) Provenance
HelmReleaseProvenance describes resources rendered from a Flux HelmRelease.
func PathProvenance ¶
func PathProvenance(path string) Provenance
PathProvenance describes resources rendered from an explicit path.
func TextProvenance ¶
func TextProvenance(text string) Provenance
TextProvenance preserves existing producer strings while centralizing provenance storage.
func (Provenance) String ¶
func (p Provenance) String() string
String returns the stable display form used by reports and policy checks.
type Render ¶
Render holds a set of rendered Kubernetes YAML resources.
func NewDefaultRender ¶
NewDefaultRender creates a passive collection of rendered resources.
func (*Render) AbsorbAll ¶
AbsorbAll merges resources into the render, replacing duplicates and recording warnings.
func (*Render) AbsorbWithProducer ¶
AbsorbWithProducer merges already-built resources with source context for duplicate diagnostics. It performs no filesystem reads or rendering.
func (*Render) ApplyNamespaceToNew ¶
ApplyNamespaceToNew sets the namespace on all namespace-scoped resources added after the given count. This is used to apply Flux Kustomization spec.targetNamespace to newly rendered resources.
func (*Render) ApplySubstitutionsToNew ¶
func (r *Render) ApplySubstitutionsToNew(count int, producer string, substitutions map[string]string) error
ApplySubstitutionsToNew applies Flux postBuild inline substitutions to resources added after count. Missing variables are intentionally preserved so the report still shows unresolved substituteFrom or strict-mode inputs.
func (*Render) FilterByLabel ¶
FilterByLabel removes all resources that do not have the given label key set to the given value. Resources without the label are removed.
func (*Render) FilterCRDs ¶
func (r *Render) FilterCRDs()
FilterCRDs removes all CustomResourceDefinition resources from the render.
func (*Render) MarkProvenanceToNew ¶
MarkProvenanceToNew records producer metadata for resources added after count.
func (*Render) ProvenanceForID ¶
func (r *Render) ProvenanceForID(id resid.ResId) Provenance
ProvenanceForID returns the structured provenance for a resource ID.
func (*Render) ResourceViewForID ¶
func (r *Render) ResourceViewForID(id resid.ResId) (ResourceView, bool)
ResourceViewForID returns a rendered resource and its fmp metadata.
func (*Render) SetProvenance ¶
func (r *Render) SetProvenance(id resid.ResId, p Provenance)
SetProvenance stores exact structured origin metadata without modifying YAML.