...

Package builtins

import "sigs.k8s.io/kustomize/api/internal/builtins"
Overview
Index

Overview ▾

Package builtins holds code generated from the builtin plugins. The "builtin" plugins are written as normal plugins and can be used as such, but they are also used to generate the code in this package so they can be statically linked to client code.

Index ▾

func NewAnnotationsTransformerPlugin() resmap.TransformerPlugin
func NewConfigMapGeneratorPlugin() resmap.GeneratorPlugin
func NewHashTransformerPlugin() resmap.TransformerPlugin
func NewHelmChartInflationGeneratorPlugin() resmap.GeneratorPlugin
func NewIAMPolicyGeneratorPlugin() resmap.GeneratorPlugin
func NewImageTagTransformerPlugin() resmap.TransformerPlugin
func NewLabelTransformerPlugin() resmap.TransformerPlugin
func NewNamespaceTransformerPlugin() resmap.TransformerPlugin
func NewPatchJson6902TransformerPlugin() resmap.TransformerPlugin
func NewPatchStrategicMergeTransformerPlugin() resmap.TransformerPlugin
func NewPatchTransformerPlugin() resmap.TransformerPlugin
func NewPrefixTransformerPlugin() resmap.TransformerPlugin
func NewReplacementTransformerPlugin() resmap.TransformerPlugin
func NewReplicaCountTransformerPlugin() resmap.TransformerPlugin
func NewSecretGeneratorPlugin() resmap.GeneratorPlugin
func NewSortOrderTransformerPlugin() resmap.TransformerPlugin
func NewSuffixTransformerPlugin() resmap.TransformerPlugin
func NewValueAddTransformerPlugin() resmap.TransformerPlugin
type AnnotationsTransformerPlugin
    func (p *AnnotationsTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *AnnotationsTransformerPlugin) Transform(m resmap.ResMap) error
type ConfigMapGeneratorPlugin
    func (p *ConfigMapGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)
    func (p *ConfigMapGeneratorPlugin) Generate() (resmap.ResMap, error)
type HashTransformerPlugin
    func (p *HashTransformerPlugin) Config(h *resmap.PluginHelpers, _ []byte) (err error)
    func (p *HashTransformerPlugin) Transform(m resmap.ResMap) error
type HelmChartInflationGeneratorPlugin
    func (p *HelmChartInflationGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)
    func (p *HelmChartInflationGeneratorPlugin) Generate() (rm resmap.ResMap, err error)
type IAMPolicyGeneratorPlugin
    func (p *IAMPolicyGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)
    func (p *IAMPolicyGeneratorPlugin) Generate() (resmap.ResMap, error)
type ImageTagTransformerPlugin
    func (p *ImageTagTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *ImageTagTransformerPlugin) Transform(m resmap.ResMap) error
type LabelTransformerPlugin
    func (p *LabelTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *LabelTransformerPlugin) Transform(m resmap.ResMap) error
type NamespaceTransformerPlugin
    func (p *NamespaceTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *NamespaceTransformerPlugin) Transform(m resmap.ResMap) error
type PatchJson6902TransformerPlugin
    func (p *PatchJson6902TransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) (err error)
    func (p *PatchJson6902TransformerPlugin) Transform(m resmap.ResMap) error
type PatchStrategicMergeTransformerPlugin
    func (p *PatchStrategicMergeTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) (err error)
    func (p *PatchStrategicMergeTransformerPlugin) Transform(m resmap.ResMap) error
type PatchTransformerPlugin
    func (p *PatchTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) error
    func (p *PatchTransformerPlugin) Transform(m resmap.ResMap) error
type PrefixTransformerPlugin
    func (p *PrefixTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *PrefixTransformerPlugin) Transform(m resmap.ResMap) error
type ReplacementTransformerPlugin
    func (p *ReplacementTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) (err error)
    func (p *ReplacementTransformerPlugin) Transform(m resmap.ResMap) (err error)
type ReplicaCountTransformerPlugin
    func (p *ReplicaCountTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *ReplicaCountTransformerPlugin) Transform(m resmap.ResMap) error
type SecretGeneratorPlugin
    func (p *SecretGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)
    func (p *SecretGeneratorPlugin) Generate() (resmap.ResMap, error)
type SortOrderTransformerPlugin
    func (p *SortOrderTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) error
    func (p *SortOrderTransformerPlugin) Transform(m resmap.ResMap) (err error)
type SuffixTransformerPlugin
    func (p *SuffixTransformerPlugin) Config(_ *resmap.PluginHelpers, c []byte) (err error)
    func (p *SuffixTransformerPlugin) Transform(m resmap.ResMap) error
type Target
type ValueAddTransformerPlugin
    func (p *ValueAddTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) error
    func (p *ValueAddTransformerPlugin) Transform(m resmap.ResMap) (err error)

Package files

AnnotationsTransformer.go ConfigMapGenerator.go HashTransformer.go HelmChartInflationGenerator.go IAMPolicyGenerator.go ImageTagTransformer.go LabelTransformer.go NamespaceTransformer.go PatchJson6902Transformer.go PatchStrategicMergeTransformer.go PatchTransformer.go PrefixTransformer.go ReplacementTransformer.go ReplicaCountTransformer.go SecretGenerator.go SortOrderTransformer.go SuffixTransformer.go ValueAddTransformer.go doc.go

func NewAnnotationsTransformerPlugin

func NewAnnotationsTransformerPlugin() resmap.TransformerPlugin

func NewConfigMapGeneratorPlugin

func NewConfigMapGeneratorPlugin() resmap.GeneratorPlugin

func NewHashTransformerPlugin

func NewHashTransformerPlugin() resmap.TransformerPlugin

func NewHelmChartInflationGeneratorPlugin

func NewHelmChartInflationGeneratorPlugin() resmap.GeneratorPlugin

func NewIAMPolicyGeneratorPlugin

func NewIAMPolicyGeneratorPlugin() resmap.GeneratorPlugin

func NewImageTagTransformerPlugin

func NewImageTagTransformerPlugin() resmap.TransformerPlugin

func NewLabelTransformerPlugin

func NewLabelTransformerPlugin() resmap.TransformerPlugin

func NewNamespaceTransformerPlugin

func NewNamespaceTransformerPlugin() resmap.TransformerPlugin

func NewPatchJson6902TransformerPlugin

func NewPatchJson6902TransformerPlugin() resmap.TransformerPlugin

func NewPatchStrategicMergeTransformerPlugin

func NewPatchStrategicMergeTransformerPlugin() resmap.TransformerPlugin

func NewPatchTransformerPlugin

func NewPatchTransformerPlugin() resmap.TransformerPlugin

func NewPrefixTransformerPlugin

func NewPrefixTransformerPlugin() resmap.TransformerPlugin

func NewReplacementTransformerPlugin

func NewReplacementTransformerPlugin() resmap.TransformerPlugin

func NewReplicaCountTransformerPlugin

func NewReplicaCountTransformerPlugin() resmap.TransformerPlugin

func NewSecretGeneratorPlugin

func NewSecretGeneratorPlugin() resmap.GeneratorPlugin

func NewSortOrderTransformerPlugin

func NewSortOrderTransformerPlugin() resmap.TransformerPlugin

func NewSuffixTransformerPlugin

func NewSuffixTransformerPlugin() resmap.TransformerPlugin

func NewValueAddTransformerPlugin

func NewValueAddTransformerPlugin() resmap.TransformerPlugin

type AnnotationsTransformerPlugin

Add the given annotations to the given field specifications.

type AnnotationsTransformerPlugin struct {
    Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
    FieldSpecs  []types.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*AnnotationsTransformerPlugin) Config

func (p *AnnotationsTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*AnnotationsTransformerPlugin) Transform

func (p *AnnotationsTransformerPlugin) Transform(m resmap.ResMap) error

type ConfigMapGeneratorPlugin

type ConfigMapGeneratorPlugin struct {
    types.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
    types.ConfigMapArgs
    // contains filtered or unexported fields
}

func (*ConfigMapGeneratorPlugin) Config

func (p *ConfigMapGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)

func (*ConfigMapGeneratorPlugin) Generate

func (p *ConfigMapGeneratorPlugin) Generate() (resmap.ResMap, error)

type HashTransformerPlugin

type HashTransformerPlugin struct {
    // contains filtered or unexported fields
}

func (*HashTransformerPlugin) Config

func (p *HashTransformerPlugin) Config(
    h *resmap.PluginHelpers, _ []byte) (err error)

func (*HashTransformerPlugin) Transform

func (p *HashTransformerPlugin) Transform(m resmap.ResMap) error

Transform appends hash to generated resources.

type HelmChartInflationGeneratorPlugin

Generate resources from a remote or local helm chart.

type HelmChartInflationGeneratorPlugin struct {
    types.HelmGlobals
    types.HelmChart
    // contains filtered or unexported fields
}

func (*HelmChartInflationGeneratorPlugin) Config

func (p *HelmChartInflationGeneratorPlugin) Config(
    h *resmap.PluginHelpers, config []byte) (err error)

Config uses the input plugin configurations `config` to setup the generator options

func (*HelmChartInflationGeneratorPlugin) Generate

func (p *HelmChartInflationGeneratorPlugin) Generate() (rm resmap.ResMap, err error)

Generate implements generator

type IAMPolicyGeneratorPlugin

type IAMPolicyGeneratorPlugin struct {
    types.IAMPolicyGeneratorArgs
}

func (*IAMPolicyGeneratorPlugin) Config

func (p *IAMPolicyGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)

func (*IAMPolicyGeneratorPlugin) Generate

func (p *IAMPolicyGeneratorPlugin) Generate() (resmap.ResMap, error)

type ImageTagTransformerPlugin

Find matching image declarations and replace the name, tag and/or digest.

type ImageTagTransformerPlugin struct {
    ImageTag   types.Image       `json:"imageTag,omitempty" yaml:"imageTag,omitempty"`
    FieldSpecs []types.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*ImageTagTransformerPlugin) Config

func (p *ImageTagTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*ImageTagTransformerPlugin) Transform

func (p *ImageTagTransformerPlugin) Transform(m resmap.ResMap) error

type LabelTransformerPlugin

Add the given labels to the given field specifications.

type LabelTransformerPlugin struct {
    Labels     map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
    FieldSpecs []types.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*LabelTransformerPlugin) Config

func (p *LabelTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*LabelTransformerPlugin) Transform

func (p *LabelTransformerPlugin) Transform(m resmap.ResMap) error

type NamespaceTransformerPlugin

Change or set the namespace of non-cluster level resources.

type NamespaceTransformerPlugin struct {
    types.ObjectMeta       `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
    FieldSpecs             []types.FieldSpec                `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
    UnsetOnly              bool                             `json:"unsetOnly" yaml:"unsetOnly"`
    SetRoleBindingSubjects namespace.RoleBindingSubjectMode `json:"setRoleBindingSubjects" yaml:"setRoleBindingSubjects"`
}

func (*NamespaceTransformerPlugin) Config

func (p *NamespaceTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*NamespaceTransformerPlugin) Transform

func (p *NamespaceTransformerPlugin) Transform(m resmap.ResMap) error

type PatchJson6902TransformerPlugin

type PatchJson6902TransformerPlugin struct {
    Target *types.Selector `json:"target,omitempty" yaml:"target,omitempty"`
    Path   string          `json:"path,omitempty" yaml:"path,omitempty"`
    JsonOp string          `json:"jsonOp,omitempty" yaml:"jsonOp,omitempty"`
    // contains filtered or unexported fields
}

func (*PatchJson6902TransformerPlugin) Config

func (p *PatchJson6902TransformerPlugin) Config(
    h *resmap.PluginHelpers, c []byte) (err error)

func (*PatchJson6902TransformerPlugin) Transform

func (p *PatchJson6902TransformerPlugin) Transform(m resmap.ResMap) error

type PatchStrategicMergeTransformerPlugin

type PatchStrategicMergeTransformerPlugin struct {
    Paths   []types.PatchStrategicMerge `json:"paths,omitempty" yaml:"paths,omitempty"`
    Patches string                      `json:"patches,omitempty" yaml:"patches,omitempty"`
    // contains filtered or unexported fields
}

func (*PatchStrategicMergeTransformerPlugin) Config

func (p *PatchStrategicMergeTransformerPlugin) Config(
    h *resmap.PluginHelpers, c []byte) (err error)

func (*PatchStrategicMergeTransformerPlugin) Transform

func (p *PatchStrategicMergeTransformerPlugin) Transform(m resmap.ResMap) error

type PatchTransformerPlugin

type PatchTransformerPlugin struct {
    Path    string          `json:"path,omitempty"    yaml:"path,omitempty"`
    Patch   string          `json:"patch,omitempty"   yaml:"patch,omitempty"`
    Target  *types.Selector `json:"target,omitempty"  yaml:"target,omitempty"`
    Options map[string]bool `json:"options,omitempty" yaml:"options,omitempty"`
    // contains filtered or unexported fields
}

func (*PatchTransformerPlugin) Config

func (p *PatchTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) error

func (*PatchTransformerPlugin) Transform

func (p *PatchTransformerPlugin) Transform(m resmap.ResMap) error

type PrefixTransformerPlugin

Add the given prefix to the field

type PrefixTransformerPlugin struct {
    Prefix     string        `json:"prefix,omitempty" yaml:"prefix,omitempty"`
    FieldSpecs types.FsSlice `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*PrefixTransformerPlugin) Config

func (p *PrefixTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*PrefixTransformerPlugin) Transform

func (p *PrefixTransformerPlugin) Transform(m resmap.ResMap) error

type ReplacementTransformerPlugin

Replace values in targets with values from a source

type ReplacementTransformerPlugin struct {
    ReplacementList []types.ReplacementField `json:"replacements,omitempty" yaml:"replacements,omitempty"`
    Replacements    []types.Replacement      `json:"omitempty" yaml:"omitempty"`
}

func (*ReplacementTransformerPlugin) Config

func (p *ReplacementTransformerPlugin) Config(
    h *resmap.PluginHelpers, c []byte) (err error)

func (*ReplacementTransformerPlugin) Transform

func (p *ReplacementTransformerPlugin) Transform(m resmap.ResMap) (err error)

type ReplicaCountTransformerPlugin

Find matching replicas declarations and replace the count. Eases the kustomization configuration of replica changes.

type ReplicaCountTransformerPlugin struct {
    Replica    types.Replica     `json:"replica,omitempty" yaml:"replica,omitempty"`
    FieldSpecs []types.FieldSpec `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*ReplicaCountTransformerPlugin) Config

func (p *ReplicaCountTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*ReplicaCountTransformerPlugin) Transform

func (p *ReplicaCountTransformerPlugin) Transform(m resmap.ResMap) error

type SecretGeneratorPlugin

type SecretGeneratorPlugin struct {
    types.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
    types.SecretArgs
    // contains filtered or unexported fields
}

func (*SecretGeneratorPlugin) Config

func (p *SecretGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error)

func (*SecretGeneratorPlugin) Generate

func (p *SecretGeneratorPlugin) Generate() (resmap.ResMap, error)

type SortOrderTransformerPlugin

Sort the resources using a customizable ordering based of Kind. Defaults to the ordering of the GVK struct, which puts cluster-wide basic resources with no dependencies (like Namespace, StorageClass, etc.) first, and resources with a high number of dependencies (like ValidatingWebhookConfiguration) last.

type SortOrderTransformerPlugin struct {
    SortOptions *types.SortOptions `json:"sortOptions,omitempty" yaml:"sortOptions,omitempty"`
}

func (*SortOrderTransformerPlugin) Config

func (p *SortOrderTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) error

func (*SortOrderTransformerPlugin) Transform

func (p *SortOrderTransformerPlugin) Transform(m resmap.ResMap) (err error)

type SuffixTransformerPlugin

Add the given suffix to the field

type SuffixTransformerPlugin struct {
    Suffix     string        `json:"suffix,omitempty" yaml:"suffix,omitempty"`
    FieldSpecs types.FsSlice `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"`
}

func (*SuffixTransformerPlugin) Config

func (p *SuffixTransformerPlugin) Config(
    _ *resmap.PluginHelpers, c []byte) (err error)

func (*SuffixTransformerPlugin) Transform

func (p *SuffixTransformerPlugin) Transform(m resmap.ResMap) error

type Target

Target describes where to put the value.

type Target struct {
    // Selector selects the resources to modify.
    Selector *types.Selector `json:"selector,omitempty" yaml:"selector,omitempty"`

    // FieldPath is a JSON-style path to the field intended to hold the value.
    FieldPath string `json:"fieldPath,omitempty" yaml:"fieldPath,omitempty"`

    // FilePathPosition is passed to the filter directly.  Look there for doc.
    FilePathPosition int `json:"filePathPosition,omitempty" yaml:"filePathPosition,omitempty"`
}

type ValueAddTransformerPlugin

An 'Add' transformer inspired by the IETF RFC 6902 JSON spec Add operation.

type ValueAddTransformerPlugin struct {
    // Value is the value to add.
    // Defaults to base name of encompassing kustomization root.
    Value string `json:"value,omitempty" yaml:"value,omitempty"`

    // Targets is a slice of targets that should have the value added.
    Targets []Target `json:"targets,omitempty" yaml:"targets,omitempty"`

    // TargetFilePath is a file path.  If specified, the file will be parsed into
    // a slice of Target, and appended to anything that was specified in the
    // Targets field.  This is just a means to share common target specifications.
    TargetFilePath string `json:"targetFilePath,omitempty" yaml:"targetFilePath,omitempty"`
}

func (*ValueAddTransformerPlugin) Config

func (p *ValueAddTransformerPlugin) Config(h *resmap.PluginHelpers, c []byte) error

func (*ValueAddTransformerPlugin) Transform

func (p *ValueAddTransformerPlugin) Transform(m resmap.ResMap) (err error)