Package types
A Package is an abstract unit that encompasses either an Application or a Module. The distinction is based on scope and purpose:
| Characteristic | Module | Application |
|---|---|---|
| Purpose | Infrastructure extension for the cluster | User workload |
| Scope | Cluster-wide (one per cluster) | Namespaced (unlimited instances) |
| Multiple instances | No (1:1 with the cluster) | Yes (N instances in different namespaces) |
| Enabled by default | Can be enabled via bundle | Only by explicit user action |
| CRD creation | Allowed | Forbidden |
| Cluster-wide objects | Allowed | Forbidden |
Resource model
Deckhouse Kubernetes Platform (DKP) Marketplace uses five custom resources:
flowchart TD
PR[PackageRepository] -->|triggers| PRO[PackageRepositoryOperation]
PR -->|populates| APV[ApplicationPackageVersion]
APV -->|aggregated by| AP[ApplicationPackage]
APV -->|referenced by| APP[Application\nnamespace-scoped]
| Resource | Short | Scope | Role |
|---|---|---|---|
PackageRepository |
— | Cluster | Registry connection and scan schedule |
PackageRepositoryOperation |
pro |
Cluster | Scan job that discovers versions |
ApplicationPackageVersion |
apv |
Cluster | One per discovered package version; carries metadata, OpenAPI schemas, and requirements |
ApplicationPackage |
— | Cluster | Informational aggregate: which repos have the package, how many instances use it |
Application |
app |
Namespace | Installed instance; drives Nelm deployment |
ApplicationPackageVersion content
Each ApplicationPackageVersion object carries:
status.packageMetadata.description— localized (en/ru) package descriptionstatus.packageMetadata.category— catalog categorystatus.packageMetadata.stage— maturity stage (Preview,General Availability, etc.)status.packageMetadata.requirements— DKP and Kubernetes version constraints; module dependencies (mandatory,conditional,anyOf,noneOf)status.packageMetadata.versionCompatibilityRules— upgrade and downgrade rulesstatus.packageSchemas.settingsSchema— OpenAPI v3 schema used to validateApplication.spec.settingsstatus.packageSchemas.valuesSchema— OpenAPI v3 schema for effective values passed to hooks and templates
Scan-to-deploy lifecycle
- Administrator creates PackageRepository.
- DKP creates a PackageRepositoryOperation automatically (first scan on creation, then every
scanInterval). - The operation scans the registry and creates ApplicationPackageVersion objects for each discovered version.
- User creates an Application in their namespace referencing
packageName,packageVersion, and optionallypackageRepositoryName. - DKP validates
spec.settingsagainst thesettingsSchemafrom the corresponding ApplicationPackageVersion. - Nelm deploys the Helm templates from the package bundle.
- Conditions on the Application reflect deployment progress:
Installed→ConfigurationApplied→Scaled→Ready.
Application constraints
All constraints exist to enforce namespace isolation and prevent Applications from interfering with cluster-level resources.
Functional constraints
- No CRD creation — Application templates must not include
CustomResourceDefinitionobjects. - No cluster-wide objects — all resources created by an Application must be namespaced.
- No cross-Application dependencies — an Application can declare dependencies only on Modules (via
requirements.modulesinpackage.yaml), not on other Applications. - Hooks are namespace-scoped — hooks must not read or write resources outside their own namespace.
- Manual install only — Applications are never activated by default; installation requires explicit user action.
Naming constraints
Kubernetes limits Pod names to 63 characters. An Application pod name is composed of:
- instance name — ≤24 chars
- resource name — ≤24 chars
- deployment suffix — 15 chars
Therefore:
- Application instance name (
metadata.name): at most 24 characters - Resource name inside the Application (e.g., Deployment name suffix): at most 24 characters
Example: instance redis-cache (11 chars) + resource master-deployment (17 chars) + suffix (15 chars) = 43 chars total — fits within the 63-character limit.