Documentation ¶
Overview ¶
Package postrender provides a way to modify the rendered manifests before they are sent to the Kubernetes cluster.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChain ¶
func NewChain(prs ...postrender.PostRenderer) postrender.PostRenderer
NewChain creates a new Chain post renderer that runs the given list of post renderers in order.
func NewRewriter ¶
func NewRewriter(options []RewriteOption) postrender.PostRenderer
NewRewriter applies a list of EnhanceOption functions to modify the renderedManifests. It returns a PostRenderer that applies the enhancements to the manifests. The EnhanceOption functions are applied in the order they appear in the options slice. Each EnhanceOption function takes an unstructured.Unstructured object as input and modifies it. The modified manifests are encoded and returned as a *bytes.Buffer. If any error occurs during the enhancement process, it is returned.
Types ¶
type PostRendererFunc ¶
type RewriteOption ¶
type RewriteOption func(unstructured.Unstructured)
RewriteOption is a function type that represents an option for enhancing an unstructured object.
func AppendAnnotations ¶
func AppendAnnotations(annotations map[string]string) RewriteOption
func AppendLabels ¶
func AppendLabels(labels map[string]string) RewriteOption