config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GeneratorAPIVersion specifies the apiVersion field value supported by the generator
	GeneratorAPIVersion = "khelm.mgoltzsche.github.com/v1"
	// GeneratorKind specifies the API kind field value supported by the generator
	GeneratorKind = "ChartRenderer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartConfig

type ChartConfig struct {
	LoaderConfig   `yaml:",inline"`
	RendererConfig `yaml:",inline"`
	BaseDir        string `yaml:"-"`
}

ChartConfig define chart lookup and render config

func NewChartConfig

func NewChartConfig() (cfg *ChartConfig)

NewChartConfig creates a new empty chart config with default values

func (*ChartConfig) Validate

func (cfg *ChartConfig) Validate() (errs []string)

Validate validates the chart renderer config

type GeneratorConfig

type GeneratorConfig struct {
	APIVersion  string      `yaml:"apiVersion"`
	Kind        string      `yaml:"kind"`
	Metadata    K8sMetadata `yaml:"metadata"`
	ChartConfig `yaml:",inline"`
}

GeneratorConfig define the kustomize plugin's input file content

func ReadGeneratorConfig

func ReadGeneratorConfig(reader io.Reader) (cfg *GeneratorConfig, err error)

ReadGeneratorConfig read the generator configuration

type K8sMetadata

type K8sMetadata struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace,omitempty"`
}

K8sMetadata define the name to be kubernetes object schema conform

type LoaderConfig

type LoaderConfig struct {
	Repository      string `yaml:"repository,omitempty"`
	Chart           string `yaml:"chart"`
	Version         string `yaml:"version,omitempty"`
	Verify          bool   `yaml:"verify,omitempty"`
	Keyring         string `yaml:"keyring,omitempty"`
	ReplaceLockFile bool   `yaml:"replaceLockFile,omitempty"`
}

LoaderConfig define the configuration to load a chart

type RendererConfig

type RendererConfig struct {
	Name           string                 `yaml:"name,omitempty"`
	Namespace      string                 `yaml:"namespace,omitempty"`
	ValueFiles     []string               `yaml:"valueFiles,omitempty"`
	Values         map[string]interface{} `yaml:"values,omitempty"`
	KubeVersion    string                 `yaml:"kubeVersion,omitempty"`
	APIVersions    []string               `yaml:"apiVersions,omitempty"`
	Include        []ResourceSelector     `yaml:"include,omitempty"`
	Exclude        []ResourceSelector     `yaml:"exclude,omitempty"`
	ExcludeHooks   bool                   `yaml:"excludeHooks,omitempty"`
	NamespacedOnly bool                   `yaml:"namespacedOnly,omitempty"`
	ForceNamespace string                 `yaml:"forceNamespace,omitempty"`
}

RendererConfig defines the configuration to render a chart

type ResourceSelector

type ResourceSelector struct {
	APIVersion string `yaml:"apiVersion,omitempty"`
	Kind       string `yaml:"kind,omitempty"`
	Namespace  string `yaml:"namespace,omitempty"`
	Name       string `yaml:"name,omitempty"`
}

ResourceSelector specifies a Kubernetes resource selector

Jump to

Keyboard shortcuts

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