Documentation
¶
Index ¶
- Constants
- func GetModuleName(moduleYamlFile *ModuleYaml, chartYamlFile *ChartYaml) string
- func IsSymlink(fi os.FileInfo) bool
- func LoadModuleAsChart(moduleName, dir string) (*chart.Chart, error)
- func RenderModuleForValuesFile(modulePath string, globalSchema *spec.Schema, valuesFile string) (map[string]string, error)
- func RenderModuleWithValues(modulePath string, userValues map[string]any) (map[string]string, error)
- func RunRender(m *Module, vals chartutil.Values, objectStore *storage.UnstructuredObjectStore, ...) error
- func ToLowerCamel(s string) string
- func Walk(root string, walkFn filepath.WalkFunc) error
- type ChartYaml
- type Module
- func (m *Module) GetChart() *chart.Chart
- func (m *Module) GetMetadata() *chart.Metadata
- func (m *Module) GetModuleConfig() *pkg.LintersSettings
- func (m *Module) GetName() string
- func (m *Module) GetNamespace() string
- func (m *Module) GetObjectStore() *storage.UnstructuredObjectStore
- func (m *Module) GetPath() string
- func (m *Module) GetStorage() map[storage.ResourceIndex]storage.StoreObject
- func (m *Module) GetValues() map[string]any
- func (m *Module) GetWerfFile() string
- func (m *Module) String() string
- type ModuleList
- type ModuleYaml
Constants ¶
const ( ChartConfigFilename = "Chart.yaml" ModuleConfigFilename = "module.yaml" )
Variables ¶
This section is empty.
Functions ¶
func GetModuleName ¶
func GetModuleName(moduleYamlFile *ModuleYaml, chartYamlFile *ChartYaml) string
func LoadModuleAsChart ¶
LoadModuleAsChart loads a module as a chart default helm loader couldn't be used without Chart.yaml, but deckhouse module could exist without this file, deckhouse will create it automatically
func RenderModuleForValuesFile ¶
func RenderModuleForValuesFile(modulePath string, globalSchema *spec.Schema, valuesFile string) (map[string]string, error)
RenderModuleForValuesFile renders the module at modulePath using values auto-generated from its openapi schemas (config-values.yaml plus the given values file, e.g. "values.yaml" or "values_ce.yaml") combined with the global schema, mirroring the value generation dmt uses while linting. It returns the rendered manifests keyed by chart-relative source file path.
func RenderModuleWithValues ¶
func RenderModuleWithValues(modulePath string, userValues map[string]any) (map[string]string, error)
RenderModuleWithValues renders the module at modulePath with the supplied user values (the ".Values" tree, e.g. holding "global" and the module's own section) and returns the rendered manifests keyed by chart-relative source file path.
Image references resolve from dmt's image/registry stubs (digests scanned from images/, injected by values.HelmFormatModuleImages). Suitable for golden-snapshot tests.
func RunRender ¶
func RunRender(m *Module, vals chartutil.Values, objectStore *storage.UnstructuredObjectStore, errorList *dmtErrors.LintRuleErrorsList) error
RunRender strictly renders the module's chart through nelm's public action.ChartRender and stores the resulting objects for the linters. Strict rendering mirrors how deckhouse-controller installs the module: a template error fails the whole render, so the module is reported rather than half-linted. Image references resolve from dmt's value stubs (global.modulesImages, scanned from images/).
func ToLowerCamel ¶
ToLowerCamel converts a string to lowerCamelCase
func Walk ¶
Walk walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Walk follows symbolic links.
Types ¶
type ChartYaml ¶
func ParseChartFile ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GetMetadata ¶
func (*Module) GetModuleConfig ¶
func (m *Module) GetModuleConfig() *pkg.LintersSettings
func (*Module) GetNamespace ¶
func (*Module) GetObjectStore ¶
func (m *Module) GetObjectStore() *storage.UnstructuredObjectStore
func (*Module) GetStorage ¶
func (m *Module) GetStorage() map[storage.ResourceIndex]storage.StoreObject
func (*Module) GetWerfFile ¶
type ModuleList ¶
type ModuleList []*Module
type ModuleYaml ¶
func ParseModuleConfigFile ¶
func ParseModuleConfigFile(path string) (*ModuleYaml, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
schema/defaults
Package defaults generates a module's render values from its openapi schemas: it fills every property, honors `not: {required: [...]}` mutual exclusion, and picks the fullest x-examples entry.
|
Package defaults generates a module's render values from its openapi schemas: it fills every property, honors `not: {required: [...]}` mutual exclusion, and picks the fullest x-examples entry. |
|
schema/reggen
Package reggen generates text based on regex definitions based on the reggen library by Lucas Jones https://github.com/lucasjones/reggen/blob/master/reggen.go
|
Package reggen generates text based on regex definitions based on the reggen library by Lucas Jones https://github.com/lucasjones/reggen/blob/master/reggen.go |