template

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Sources         map[string][]Source
	KeyedComponents map[string]Component
	KeyedOverlays   map[string]Overlay
	ManifestRoot    string
	Vars            map[string]string
}

func NewBuilder

func NewBuilder(config BuilderConfig) Builder

func NewBuilderFromConfig

func NewBuilderFromConfig(config config.Config) Builder

func (*Builder) Build

func (b *Builder) Build() error

func (*Builder) Template

func (b *Builder) Template() Kustomize

func (*Builder) VarsArray

func (b *Builder) VarsArray() []string

Returns an array containing the var names

type BuilderConfig

type BuilderConfig struct {
	ManifestRoot string // absolute path to the manifests directory containing the kustomize files.
	Components   []Component
	Overlays     []Overlay
}

type Component

type Component struct {
	Name string
}

A component used for the configuration, such as istio, istio-crds, argo, etc.

type ConfigMapItem

type ConfigMapItem struct {
	Name string   `yaml:"name"`
	Envs []string `yaml:"envs"`
}

type FieldRef

type FieldRef struct {
	FieldPath string `yaml:"fieldpath"`
}

type GeneratorItem

type GeneratorItem struct {
	DisableNameSuffixHash bool `yaml:"disableNameSuffixHash"`
}

type Kustomize

type Kustomize struct {
	ApiVersion       string          `yaml:"apiVersion"`
	Kind             string          `yaml:"kind"`
	Resources        []string        `yaml:"resources"`
	Configurations   []string        `yaml:"configurations"`
	ConfigMapItems   []ConfigMapItem `yaml:"configMapGenerator"`
	GeneratorOptions GeneratorItem   `yaml:"generatorOptions"`
	Vars             []VarItem       `yaml:"vars"`
}

type ObjectRef

type ObjectRef struct {
	Kind       string `yaml:"kind"`
	Name       string `yaml:"name"`
	ApiVersion string `yaml:"apiVersion"`
}

type Overlay

type Overlay struct {
	Name string
}

An overlay specified for all components. E.g. gcp. If a configuration has a gcp specific overlay it should be used.

type Source

type Source struct {
	AbsolutePath string // path in the filesystem to the file used
	ManifestPath string // path relative to the manifests root directory
	Name         string // name of the configuration. E.g. istio, istio-crds. This is a configuration which must have a base directory under it.
	IsOverlay    bool
	Order        int
}

The source of a configuration file used.

type VarItem

type VarItem struct {
	Name     string    `yaml:"name"`
	ObjRef   ObjectRef `yaml:"objref"`
	FieldRef FieldRef  `yaml:"fieldref"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL