docs context: Document ResourceSet & Context struct fields
This commit is contained in:
parent
14d2859720
commit
367c5d2b60
1 changed files with 19 additions and 2 deletions
|
@ -8,20 +8,37 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type ResourceSet struct {
|
type ResourceSet struct {
|
||||||
|
// Name of the resource set. This can be used in include/exclude statements during kontemplate runs.
|
||||||
Name string `json:"name"`
|
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"`
|
Path string `json:"path"`
|
||||||
|
|
||||||
|
// Values to include when interpolating resources from this resource set.
|
||||||
Values map[string]interface{} `json:"values"`
|
Values map[string]interface{} `json:"values"`
|
||||||
|
|
||||||
// Fields for resource set collections
|
// Nested resource sets to include
|
||||||
Include []ResourceSet `json:"include"`
|
Include []ResourceSet `json:"include"`
|
||||||
|
|
||||||
|
// Parent resource set for flattened resource sets. Should not be manually specified.
|
||||||
Parent string
|
Parent string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Context struct {
|
type Context struct {
|
||||||
|
// The name of the kubectl context
|
||||||
Name string `json:"context"`
|
Name string `json:"context"`
|
||||||
|
|
||||||
|
// Global variables that should be accessible by all resource sets
|
||||||
Global map[string]interface{} `json:"global"`
|
Global map[string]interface{} `json:"global"`
|
||||||
ResourceSets []ResourceSet `json:"include"`
|
|
||||||
|
// File names of YAML or JSON files including extra variables that should be globally accessible
|
||||||
VariableImports []string `json:"import"`
|
VariableImports []string `json:"import"`
|
||||||
|
|
||||||
|
// The resource sets to include in this context
|
||||||
|
ResourceSets []ResourceSet `json:"include"`
|
||||||
|
|
||||||
|
// This field represents the absolute path to the context base directory and should not be manually specified.
|
||||||
BaseDir string
|
BaseDir string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue