Documentation
¶
Index ¶
- Constants
- type ApplicationDefinition
- type Definition
- type Descriptions
- type DisableMessages
- type DisableOptions
- type Edition
- type Licensing
- type ModuleDefinition
- type ModuleDependency
- type ModuleGroup
- type ModulesRequirements
- type Requirements
- type TypeMeta
- type VersionCompatibilityRule
- type VersionCompatibilityRules
- type VersionCompatibilityStep
- type VersionConstraint
- type VersionUpgradeRule
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.
func (*ApplicationDefinition) ConvertToStatusMetadata ¶ added in v1.78.0
func (d *ApplicationDefinition) ConvertToStatusMetadata() *v1alpha1.ApplicationPackageVersionStatusMetadata
ConvertToStatusMetadata projects the parsed definition onto the APV status metadata; the changelog is left to the caller.
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"`
Licensing Licensing `yaml:"licensing" json:"licensing"`
DisableOptions DisableOptions `yaml:"disable" json:"disable"`
Compatibility VersionCompatibilityRules `yaml:"versionCompatibilityRules,omitempty" json:"versionCompatibilityRules,omitempty"`
}
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 DisableMessages ¶ added in v1.77.0
type DisableMessages struct {
Ru string `json:"ru,omitempty" yaml:"ru,omitempty"`
En string `json:"en,omitempty" yaml:"en,omitempty"`
}
DisableMessages holds localized disable confirmation text for the package.
type DisableOptions ¶
type DisableOptions struct {
Confirmation bool `json:"confirmation" yaml:"confirmation"` // Whether confirmation is required to disable
Messages DisableMessages `json:"messages,omitempty" yaml:"messages,omitempty"` // Localized messages to display when disabling
}
DisableOptions configures package disablement behavior.
type Edition ¶ added in v1.77.0
type Edition struct {
Available bool `json:"available" yaml:"available"`
EnabledInBundles []string `json:"enabledInBundles" yaml:"enabledInBundles"`
}
Edition describes a single edition's package availability and enabled bundles.
type Licensing ¶ added in v1.77.0
Licensing describes package availability and default bundle enablement by edition.
type ModuleDefinition ¶ added in v1.76.0
type ModuleDefinition struct {
TypeMeta `yaml:",inline"`
Definition `yaml:",inline"`
Weight int `yaml:"weight,omitempty" json:"weight,omitempty"`
Critical bool `yaml:"critical,omitempty" json:"critical,omitempty"`
ExclusiveGroup string `yaml:"exclusiveGroup,omitempty" json:"exclusiveGroup,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.
func (*ModuleDefinition) ConvertToStatusMetadata ¶ added in v1.78.0
func (d *ModuleDefinition) ConvertToStatusMetadata() *v1alpha1.ModulePackageVersionStatusMetadata
ConvertToStatusMetadata projects the parsed definition onto the MPV status metadata. The projection has two writers - the module-package-version controller fills draft versions from the package repository, the startup version sync fills embedded versions from the image disk - and both must produce identical metadata for the same definition. Only fields present on ModuleDefinition are surfaced; the remaining module-only status fields (category) are not populated here.
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 VersionCompatibilityRule ¶ added in v1.78.0
type VersionCompatibilityRule struct {
Step VersionCompatibilityStep `json:"step,omitempty" yaml:"step,omitempty"`
}
VersionCompatibilityRule is one direction's compatibility step.
type VersionCompatibilityRules ¶ added in v1.78.0
type VersionCompatibilityRules struct {
Upgrade *VersionUpgradeRule `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
Downgrade *VersionCompatibilityRule `json:"downgrade,omitempty" yaml:"downgrade,omitempty"`
}
VersionCompatibilityRules bounds the upgrades and downgrades from this version, and which versions may upgrade to it.
type VersionCompatibilityStep ¶ added in v1.78.0
type VersionCompatibilityStep struct {
Patches *int32 `json:"patches,omitempty" yaml:"patches,omitempty"`
Minor *int32 `json:"minor,omitempty" yaml:"minor,omitempty"`
Major *int32 `json:"major,omitempty" yaml:"major,omitempty"`
}
VersionCompatibilityStep holds the per-axis skip limits; compatibilityToCR fills nil limits with the direction's default.
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".
type VersionUpgradeRule ¶ added in v1.78.0
type VersionUpgradeRule struct {
From string `json:"from,omitempty" yaml:"from,omitempty"`
Step VersionCompatibilityStep `json:"step,omitempty" yaml:"step,omitempty"`
}
VersionUpgradeRule is the upgrade direction's rule: the SemVer constraint on the versions that may upgrade to this one, and the step from it.