Documentation
¶
Index ¶
- Constants
- func ComposeValuesFromSchemas(m *Module, globalSchema *spec.Schema) (chartutil.Values, error)
- func ComposeValuesFromSchemasForValuesFile(m *Module, globalSchema *spec.Schema, valuesFile string) (chartutil.Values, error)
- func GetModuleName(moduleYamlFile *ModuleYaml, chartYamlFile *ChartYaml) string
- func IsSymlink(fi os.FileInfo) bool
- func LoadModuleAsChart(moduleName, dir string) (*chart.Chart, error)
- func RenderModule(modulePath string, globalSchema *spec.Schema) (map[string]string, 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, values chartutil.Values, ...) error
- func ToCamel(s string) string
- 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) GetWerfFile() string
- func (m *Module) String() string
- type ModuleList
- type ModuleYaml
- type OpenAPIValuesGenerator
Constants ¶
const ( ChartConfigFilename = "Chart.yaml" ModuleConfigFilename = "module.yaml" )
const ( DmtDefault = "x-dmt-default" ExamplesDefault = "x-examples" ExampleDefault = "x-example" ArrayObject = "array" ObjectKey = "object" )
Variables ¶
This section is empty.
Functions ¶
func ComposeValuesFromSchemasForValuesFile ¶ added in v0.1.86
func ComposeValuesFromSchemasForValuesFile(m *Module, globalSchema *spec.Schema, valuesFile string) (chartutil.Values, error)
ComposeValuesFromSchemasForValuesFile is like ComposeValuesFromSchemas but generates the module values from the given openapi values schema file name (e.g. "values_ce.yaml") instead of the default "values.yaml".
func GetModuleName ¶ added in v0.1.10
func GetModuleName(moduleYamlFile *ModuleYaml, chartYamlFile *ChartYaml) string
func IsSymlink ¶ added in v0.0.29
IsSymlink is used to determine if the fileinfo is a symbolic link.
func LoadModuleAsChart ¶ added in v0.0.29
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 RenderModule ¶ added in v0.1.86
RenderModule renders the module located at modulePath using values auto-generated from the module's openapi schemas (the optional 'openapi/config-values.yaml' and 'openapi/values.yaml' files) combined with the supplied global schema, mirroring the value generation dmt uses while linting. It returns the rendered manifests keyed by chart-relative source file path.
func RenderModuleForValuesFile ¶ added in v0.1.86
func RenderModuleForValuesFile(modulePath string, globalSchema *spec.Schema, valuesFile string) (map[string]string, error)
RenderModuleForValuesFile is like RenderModule but generates the module values from the given openapi values schema file name (e.g. "values_ce.yaml") instead of the default "values.yaml". It is used to render edition-specific variants of a module.
func RenderModuleWithValues ¶ added in v0.1.83
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.
Unlike the linter render path, value generation is deterministic: only the provided values plus dmt's fixed image/registry stubs are used, so the output is suitable for golden-snapshot template testing. Rendering is strict (LintMode is off), so `required` and `fail` calls fail the render.
func RunRender ¶
func RunRender(m *Module, values chartutil.Values, objectStore *storage.UnstructuredObjectStore, errorList *dmtErrors.LintRuleErrorsList) error
func ToLowerCamel ¶
ToLowerCamel converts a string to lowerCamelCase
func Walk ¶ added in v0.0.29
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 ¶ added in v0.1.10
func ParseChartFile ¶ added in v0.1.10
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GetMetadata ¶
func (*Module) GetModuleConfig ¶ added in v0.1.0
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 ¶ added in v0.0.29
type ModuleList ¶
type ModuleList []*Module
type ModuleYaml ¶ added in v0.1.10
func ParseModuleConfigFile ¶ added in v0.1.10
func ParseModuleConfigFile(path string) (*ModuleYaml, error)
type OpenAPIValuesGenerator ¶
type OpenAPIValuesGenerator struct {
// contains filtered or unexported fields
}
func NewOpenAPIValuesGenerator ¶
func NewOpenAPIValuesGenerator(schema *spec.Schema) *OpenAPIValuesGenerator
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
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 |