context

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// The name of the kubectl context
	Name string `json:"context"`

	// Global variables that should be accessible by all resource sets
	Global map[string]interface{} `json:"global"`

	// File names of YAML or JSON files including extra variables that should be globally accessible
	VariableImportFiles []string `json:"import"`

	// The resource sets to include in this context
	ResourceSets []ResourceSet `json:"include"`

	// Variables imported from additional files
	ImportedVars map[string]interface{}

	// Explicitly set variables (via `--var`) that should override all others
	ExplicitVars map[string]interface{}

	// This field represents the absolute path to the context base directory and should not be manually specified.
	BaseDir string
}

func LoadContext added in v1.6.0

func LoadContext(filename string, explicitVars *[]string) (*Context, error)

Attempt to load and deserialise a Context from the specified file.

type ResourceSet

type ResourceSet struct {
	// Name of the resource set. This can be used in include/exclude statements during kontemplate runs.
	Name string `json:"name"`

	// Path to the folder containing the files for this resource set. This defaults to the value of the 'name' field
	// if unset.
	Path string `json:"path"`

	// Values to include when interpolating resources from this resource set.
	Values map[string]interface{} `json:"values"`

	// Args to pass on to kubectl for this resource set.
	Args []string `json:"args"`

	// Nested resource sets to include
	Include []ResourceSet `json:"include"`

	// Parent resource set for flattened resource sets. Should not be manually specified.
	Parent string
}

Jump to

Keyboard shortcuts

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