Documentation
¶
Index ¶
Constants ¶
const ( // DefinitionFile is the filename for package metadata. DefinitionFile = "package.yaml" // TypeModule is the TypeMeta.Type value identifying a package as a module. TypeModule = "Module" // TypeApplication is the TypeMeta.Type value identifying a package as an application. TypeApplication = "Application" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationDefinition ¶ added in v1.76.0
type ApplicationDefinition struct {
TypeMeta `yaml:",inline"`
Definition `yaml:",inline"`
}
ApplicationDefinition extends Definition for application packages.
func (*ApplicationDefinition) Convert ¶ added in v1.76.0
func (d *ApplicationDefinition) Convert() (apps.Definition, error)
Convert converts application definition to application domain model.
type Definition ¶
type Definition struct {
Name string `yaml:"name" json:"name"`
Version string `yaml:"version" json:"version"`
Stage string `yaml:"stage" json:"stage"`
Descriptions Descriptions `yaml:"descriptions" json:"descriptions"`
Requirements Requirements `yaml:"requirements" json:"requirements"`
DisableOptions DisableOptions `yaml:"disable" json:"disable"`
}
Definition represents common package metadata loaded from package.yaml.
type Descriptions ¶
type Descriptions struct {
Ru string `json:"ru,omitempty" yaml:"ru,omitempty"`
En string `json:"en,omitempty" yaml:"en,omitempty"`
}
Descriptions holds localized description text for the package.
type DisableOptions ¶
type DisableOptions struct {
Confirmation bool `json:"confirmation" yaml:"confirmation"` // Whether confirmation is required to disable
Message string `json:"message" yaml:"message"` // Message to display when disabling
}
DisableOptions configures package disablement behavior.
type ModuleDefinition ¶ added in v1.76.0
type ModuleDefinition struct {
TypeMeta `yaml:",inline"`
Definition `yaml:",inline"`
Weight int `yaml:"weight" json:"weight"`
Critical bool `yaml:"critical,omitempty" json:"critical,omitempty"`
}
ModuleDefinition extends Definition with module-specific fields.
func (*ModuleDefinition) Convert ¶ added in v1.76.0
func (d *ModuleDefinition) Convert() (modules.Definition, error)
Convert converts module definition to module domain model.
type ModuleDependency ¶ added in v1.76.1
type ModuleDependency struct {
Name string `yaml:"name" json:"name"`
Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}
ModuleDependency is a single named module dependency with an optional semver constraint.
type ModuleGroup ¶ added in v1.76.1
type ModuleGroup struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Modules []ModuleDependency `yaml:"modules" json:"modules"`
}
ModuleGroup is a named group of module dependencies. Group semantics depend on the containing bucket (AnyOf: at least one member must be installed; NoneOf: no member may be installed). Name is required and surfaces in scheduler error messages; Description is optional and flows through to the CR status for kubectl visibility but is not used in any scheduling decision.
type ModulesRequirements ¶ added in v1.76.1
type ModulesRequirements struct {
// Mandatory lists modules that MUST be present (and satisfy constraint, if any)
// for the package to start.
Mandatory []ModuleDependency `yaml:"mandatory,omitempty" json:"mandatory,omitempty"`
// Conditional lists modules that are not required to be present, but if installed
// must satisfy the version constraint for the package to work correctly.
Conditional []ModuleDependency `yaml:"conditional,omitempty" json:"conditional,omitempty"`
// AnyOf lists groups of alternative dependencies; at least one member of each
// group must be installed (and satisfy its constraint, if any) for the package
// to start. Each group must declare a stable Name used in scheduler diagnostics.
AnyOf []ModuleGroup `yaml:"anyOf,omitempty" json:"anyOf,omitempty"`
// NoneOf lists groups of forbidden dependencies; no member of any group may be
// installed for the package to start. A member's constraint, if non-empty,
// narrows the forbidden version range — an empty constraint forbids the
// module entirely. Each group must declare a stable Name used in scheduler
// diagnostics.
NoneOf []ModuleGroup `yaml:"noneOf,omitempty" json:"noneOf,omitempty"`
}
ModulesRequirements groups module dependencies by how they affect package startup.
type Requirements ¶
type Requirements struct {
Kubernetes VersionConstraint `yaml:"kubernetes" json:"kubernetes"`
Deckhouse VersionConstraint `yaml:"deckhouse" json:"deckhouse"`
Modules ModulesRequirements `yaml:"modules" json:"modules"`
}
Requirements specifies dependencies required by this package.
type TypeMeta ¶ added in v1.76.0
type TypeMeta struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Type string `yaml:"type" json:"type"`
}
TypeMeta represents apiVersion/type header for determining the package type.
type VersionConstraint ¶ added in v1.76.1
type VersionConstraint struct {
Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}
VersionConstraint wraps a semver constraint expression for a single platform requirement. An empty VersionConstraint means "no version constraint".