packages

package
v0.33.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefinitionFile is the filename for package metadata
	DefinitionFile = "package.yaml"

	TypeModule      = "Module"
	TypeApplication = "Application"
)

Variables

This section is empty.

Functions

func Render

func Render(ctx context.Context, def Definition, path string) ([]render.Object, error)

Render loads the package at path and renders it to a slice of resource objects: it reads the values schemas, scans images/ for per-image digests, builds the runtime context, and invokes the Helm renderer.

Types

type Definition

type Definition struct {
	APIVersion string `yaml:"apiVersion" json:"apiVersion"`
	Type       string `yaml:"type" json:"type"`
	Name       string `yaml:"name" json:"name"`

	Descriptions Descriptions `yaml:"descriptions,omitempty" json:"descriptions,omitempty"`
	Requirements Requirements `yaml:"requirements,omitempty" json:"requirements,omitempty"`
}

Definition represents common package metadata loaded from package.yaml.

func LoadDefinitionByDir

func LoadDefinitionByDir(dir string) (Definition, error)

LoadDefinitionByDir reads and parses the package definition file from the given directory.

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 ModuleDependency added in v0.33.4

type ModuleDependency struct {
	Name       string `yaml:"name" json:"name"`
	Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}

ModuleDependency is a named module dependency with an optional semver constraint.

type ModuleGroup added in v0.33.4

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, shared by the AnyOf and NoneOf buckets. Name is required and identifies the group in diagnostics.

type ModulesRequirements added in v0.33.4

type ModulesRequirements struct {
	Mandatory   []ModuleDependency `yaml:"mandatory,omitempty" json:"mandatory,omitempty"`
	Conditional []ModuleDependency `yaml:"conditional,omitempty" json:"conditional,omitempty"`
	AnyOf       []ModuleGroup      `yaml:"anyOf,omitempty" json:"anyOf,omitempty"`
	NoneOf      []ModuleGroup      `yaml:"noneOf,omitempty" json:"noneOf,omitempty"`
}

ModulesRequirements groups module dependencies by how they gate the package:

  • Mandatory: the module must be enabled;
  • Conditional: enforced only when the module is enabled;
  • AnyOf: at least one member of each group must be enabled;
  • NoneOf: no member of any group may be enabled.

type Remote

type Remote struct {
	Repository   string `json:"repository" yaml:"repository"`
	DockerConfig string `json:"dockercfg" yaml:"dockercfg"`
}

Remote describes the OCI registry a package is published to. It is embedded into the runtime context surfaced to templates so manifests can reference the registry and its credentials.

type Requirements added in v0.33.4

type Requirements struct {
	Kubernetes VersionConstraint   `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"`
	Deckhouse  VersionConstraint   `yaml:"deckhouse,omitempty" json:"deckhouse,omitempty"`
	Modules    ModulesRequirements `yaml:"modules,omitempty" json:"modules,omitempty"`
}

Requirements are the platform and module dependencies the package declares. It mirrors the contract deckhouse-controller enforces when the package is installed; the plugin only checks that it is well-formed, since no cluster exists at build time.

type VersionConstraint added in v0.33.4

type VersionConstraint struct {
	Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}

VersionConstraint wraps a semver constraint expression. Empty means "no constraint".

Directories

Path Synopsis
schema/defaults
Package defaults synthesizes an example value map from an OpenAPI schema.
Package defaults synthesizes an example value map from an OpenAPI schema.
schema/reggen
Package reggen produces example strings that match a Perl-flavored regular expression.
Package reggen produces example strings that match a Perl-flavored regular expression.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL