$id: https://ocm.software/schemas/merged-ocm-schema $schema: https://json-schema.org/draft/2020-12/schema description: >- Merged Open Component Model schema combining component-descriptor-v2 and component-configuration definitions: meta: type: object description: component descriptor metadata required: - schemaVersion properties: schemaVersion: type: string merge: type: object properties: algorithm: type: string pattern: ^[a-z][a-z0-9/_-]+$ config: {} additionalProperties: false label: type: object required: - name - value properties: name: type: string value: {} version: type: string pattern: ^v[0-9]+$ signing: type: boolean merge: $ref: '#/definitions/merge' additionalProperties: false labels: type: array items: $ref: '#/definitions/label' componentName: type: string maxLength: 255 pattern: >- ^[a-z][-a-z0-9]*([.][a-z][-a-z0-9]*)*[.][a-z]{2,}(/[a-z][-a-z0-9_]*([.][a-z][-a-z0-9_]*)*)+$ default: github.com/acme.org/helloworld examples: - github.com/acme.org/helloworld identityAttributeKey: type: string minLength: 2 pattern: ^[a-z0-9]([-_+a-z0-9]*[a-z0-9])?$ elementName: type: string minLength: 2 pattern: ^[a-z0-9]([-_+a-z0-9]*[a-z0-9])?$ default: myresource examples: - myresource - mychart - myimage - myblob relaxedSemver: type: string pattern: >- ^[v]?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ version: type: string pattern: >- ^[v]?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ default: 1.0.0 examples: - 1.0.0 - v1.0.0 identityAttribute: type: object propertyNames: $ref: '#/definitions/identityAttributeKey' elementExtraIdentity: type: object propertyNames: $ref: '#/definitions/elementName' repositoryContext: type: object required: - type properties: type: type: string ociRepositoryContext: allOf: - $ref: '#/definitions/repositoryContext' - required: - baseUrl properties: baseUrl: type: string componentNameMapping: type: string enum: - urlPath - sha256-digest type: type: string enum: - ociRegistry - OCIRegistry access: type: object description: base type for accesses (for extensions) required: - type properties: type: type: string allOf: - if: properties: type: const: localBlob then: type: object required: - localReference - mediaType additionalProperties: false properties: type: const: localBlob description: > "localBlob" specifies the access to an artifact blob that is stored along with the component descriptor. [See the documentation](https://ocm.software/docs/guides/input_and_access/#localBlob) localReference: type: string description: > Repository type specific location information. For OCI repository type, the localReference contains the SHA of the blob used to store the blob as layer in the same OCI artifact as the component descriptor. For the Component Archive repository type (a file system representation of a single component), localReference contains the file name of the blob within the blob directory. [See the documentation](https://ocm.software/docs/guides/input_and_access/#localBlob) default: blob-filename examples: - blob-filename - sha256:4375e2b69a03eb17ff81b94ecccd59644cf8aef1c1f07 - >- sha256.fa7d95d13bcec2665ec944f005d0d7f28ba92c1fd7c128e9b7347d792ba5f291 mediaType: type: string description: > The media type of the blob used to store the resource. [See the documentation](https://ocm.software/docs/guides/input_and_access/#localBlob) default: application/octet-stream examples: - application/octet-stream - text/plain - application/json - application/yaml - application/gzip - application/x-tar - application/x-tgz - application/x-tar+gzip referenceName: type: string description: > (optional) This property may contain identity information used by other repositories to restore a global access. For example, if the localBlob contains an OCI artifact (resource type is ociArtifact) and the component is transported to an OCI registry, then this localBlob may be uploaded as independent OCI artifact (thus, the access type changes to ociArtifact). Then, the referenceName is used as the artifact name. [See the documentation](https://ocm.software/docs/guides/input_and_access/#localBlob) default: ocmcli-image examples: - nginx - echo-server - ocmcli-image globalAccess: $ref: '#/definitions/access' description: > (optional) If a resource blob is stored as localBlob, the repository implementation may decide to provide an external access information (usable by non-OCM-aware tools). For example, an OCI artifact stored as local blob can be additionally stored as a regular OCI artifact in an OCI registry. Then, the global access property would contain an entire access of type ociArtifact. [See the documentation](https://ocm.software/docs/guides/input_and_access/#localBlob) - if: properties: type: const: ociArtifact then: type: object required: - imageReference additionalProperties: false properties: type: const: ociArtifact description: > "ociArtifact" specifies the access to an artifact stored in an OCI registry. [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociartifact) imageReference: type: string description: > OCI image/artifact reference. [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociartifact) default: >- ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0 examples: - nginx:1.25.4 - >- eu.gcr.io/gardener-project/landscaper/examples/charts/guided-tour/echo-server:1.0.0 - >- ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0 - >- ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image@sha256:7b3399da19561d3c54bab9d694126174c334a4a080176cb99186ea4075aff3db - >- ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:4f5d0d0684a1ed9f7ce482c87c2c4d3499468fdcea2711f0c3f6a69a7aa9147b - if: properties: type: const: ociBlob then: type: object required: - imageReference - mediaType - digest - size additionalProperties: false properties: type: const: ociBlob description: > "ociBlob" specifies the access to OCI blob stored in an OCI repository. Thus, while "ociArtifact" enables to access an entire OCI artifact, "ociBlob" enables to access a specific blob which is described by a layer within such an OCI artifact. (CAUTION: Due to blob size limitations of certain OCI registries, it might be necessary for the OCM tooling to split local blobs into multiple OCI blobs. Therefore, "ociBlob" might not be suitable to provide a global access for local blobs (blobs stored along with the component descriptor).) [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociblob) imageReference: type: string description: > OCI repository reference (thus, the artifact name without a tag or a version). [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociblob) default: >- ghcr.io/open-component-model/ocm/component-descriptors/ocm.software/ocmcli examples: - nginx - >- eu.gcr.io/gardener-project/landscaper/examples/charts/guided-tour/echo-server - >- ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image mediaType: type: string description: > The media type of the blob (usually described by the layer). [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociblob) default: application/octet-stream examples: - application/octet-stream - text/plain - application/json - application/yaml - application/gzip - application/x-tar - application/x-tgz - application/x-tar+gzip digest: type: string description: > The digest of the blob (usually described by the layer). [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociblob) default: >- sha256:41029839fa6ad57a33a4fe85a9f7c7127d37e42d6947317488b5de4c5dbeb20e examples: - >- sha256:41029839fa6ad57a33a4fe85a9f7c7127d37e42d6947317488b5de4c5dbeb20e size: type: integer description: > The size of the blob (usually described by the layer). [See the documentation](https://ocm.software/docs/guides/input_and_access/#ociblob) ref: description: A oci reference to the manifest type: string - if: properties: type: const: helm then: type: object required: - helmRepository - helmChart additionalProperties: false properties: type: const: helm description: > "helm" specifies the access to a helm chart in a helm chart repository. [See the documentation](https://ocm.software/docs/guides/input_and_access/#helm-1) helmRepository: type: string description: > Helm repository URL. [See the documentation](https://ocm.software/docs/guides/input_and_access/#helm-1) default: https://example.helm.repo.com/landscaper examples: - https://example.helm.repo.com/landscaper helmChart: type: string description: | The name and version of the helm chart, separated by a colon. default: hello-world:1.0.0 examples: - hello-world:1.0.0 - example-chart:1.2.0 - mychart:2.0.0 caCert: type: string description: > (optional) An TLS root certificate (to enable https communication with registries with otherwise unknown certificate authority). keyring: type: string description: | (optional) An optional keyring used to verify the chart. - if: properties: type: enum: - github - gitHub then: type: object required: - repoUrl additionalProperties: false properties: type: type: string enum: - github - gitHub description: > "gitHub" specifies the access to the content of a commit in a Github repository. [See the documentation](https://ocm.software/docs/guides/input_and_access/#github) repoUrl: type: string description: > Repository URL (with or without scheme). [See the documentation](https://ocm.software/docs/guides/input_and_access/#github) default: https://github.com/open-component-model/ocm examples: - https://github.com/open-component-model/ocm - github.com/open-component-model/ocm ref: type: string commit: type: string description: | The SHA of the git commit. examples: - 16ce14e14f88858d8a905e70f172ede70fa73864 - if: properties: type: const: s3 then: type: object required: - bucket - key - mediaType additionalProperties: false properties: type: const: s3 region: type: string bucket: type: string key: type: string mediaType: type: string - if: properties: type: const: npm then: type: object required: - registry - package - version additionalProperties: false properties: type: const: npm registry: type: string package: type: string version: type: string - if: properties: type: const: wget then: type: object required: - url additionalProperties: false properties: type: const: wget url: type: string mediaType: type: string header: type: object additionalProperties: type: array items: type: string verb: type: string body: type: string noRedirect: type: boolean - if: properties: type: const: http then: type: object required: - url properties: type: const: http url: type: string - if: properties: type: const: None then: type: object required: - type properties: type: const: None - if: properties: type: const: generic then: type: object required: - type properties: type: const: generic - if: properties: type: const: ociRegistry then: type: object required: - imageReference properties: type: const: ociRegistry imageReference: type: string - if: properties: type: const: localFilesystemBlob then: type: object required: - filename properties: type: const: localFilesystemBlob filename: description: filename of the blob that is located in the "blobs" directory type: string - if: properties: type: const: localOciBlob then: type: object required: - filename properties: type: const: localOciBlob digest: description: digest of the layer within the current component descriptor type: string input: type: object required: - type properties: type: type: string allOf: - if: properties: type: const: binary then: type: object required: - data additionalProperties: false properties: type: const: binary data: type: string description: The binary data to provide. mediaType: type: string compress: type: boolean - if: properties: type: const: dir then: type: object required: - path additionalProperties: false properties: type: const: dir path: type: string mediaType: type: string compress: type: boolean preserveDir: type: boolean followSymlinks: type: boolean excludeFiles: type: array items: type: string includeFiles: type: array items: type: string - if: properties: type: const: docker then: type: object required: - path additionalProperties: false properties: type: const: docker path: type: string repository: type: string - if: properties: type: const: dockermulti then: type: object required: - variants additionalProperties: false properties: type: const: dockermulti variants: type: array items: type: string repository: type: string - if: properties: type: const: file then: type: object required: - path additionalProperties: false properties: type: const: file path: type: string mediaType: type: string compress: type: boolean - if: properties: type: const: helm then: type: object required: - path additionalProperties: false properties: type: const: helm path: type: string version: type: string helmRepository: type: string repository: type: string caCertFile: type: string caCert: type: string - if: properties: type: const: ociArtifact then: type: object required: - path additionalProperties: false properties: type: const: ociArtifact path: type: string repository: type: string platforms: type: array items: type: string - if: properties: type: const: spiff then: type: object required: - path additionalProperties: false properties: type: const: spiff path: type: string mediaType: type: string compress: type: boolean values: type: object libraries: type: array items: type: string - if: properties: type: const: utf8 then: type: object additionalProperties: false properties: type: const: utf8 text: type: string json: type: object formattedJson: type: object yaml: type: object mediaType: type: string compress: type: boolean - if: properties: type: const: wget then: type: object required: - url additionalProperties: false properties: type: const: wget url: type: string mediaType: type: string header: type: object additionalProperties: type: array items: type: string verb: type: string body: type: string noRedirect: type: string digestSpec: type: object required: - hashAlgorithm - normalisationAlgorithm - value properties: hashAlgorithm: type: string normalisationAlgorithm: type: string value: type: string signatureSpec: type: object required: - algorithm - value - mediaType properties: algorithm: type: string value: type: string mediaType: description: The media type of the signature value type: string signature: type: object required: - name - signature properties: name: type: string digest: $ref: '#/definitions/digestSpec' signature: $ref: '#/definitions/signatureSpec' nestedDigestSpec: type: object required: - name properties: name: type: string version: type: string extraIdentity: $ref: '#/definitions/identityAttribute' digest: $ref: '#/definitions/digestSpec' nestedComponentDigests: type: object required: - name - version properties: name: $ref: '#/definitions/componentName' version: $ref: '#/definitions/relaxedSemver' digest: $ref: '#/definitions/digestSpec' resourceDigests: type: array items: $ref: '#/definitions/nestedDigestSpec' srcRef: type: object description: a reference to a (component-local) source additionalProperties: false properties: identitySelector: $ref: '#/definitions/identityAttribute' labels: $ref: '#/definitions/labels' srcRefs: type: array items: $ref: '#/definitions/srcRef' componentReference: type: object description: a reference to a component required: - name - componentName - version additionalProperties: false properties: componentName: $ref: '#/definitions/componentName' name: $ref: '#/definitions/elementName' extraIdentity: $ref: '#/definitions/identityAttribute' version: $ref: '#/definitions/relaxedSemver' labels: $ref: '#/definitions/labels' digest: oneOf: - type: 'null' - $ref: '#/definitions/digestSpec' componentReferences: type: array items: $ref: '#/definitions/componentReference' relation: type: string enum: - local - external default: external examples: - local - external provider: type: object required: - name additionalProperties: false properties: name: type: string default: internal examples: - internal - sap labels: $ref: '#/definitions/labels' sourceDefinition: type: object required: - name - type - access additionalProperties: false properties: name: $ref: '#/definitions/identityAttributeKey' extraIdentity: $ref: '#/definitions/identityAttribute' version: $ref: '#/definitions/relaxedSemver' type: type: string labels: $ref: '#/definitions/labels' access: $ref: '#/definitions/access' sources: type: array description: list of specifications of sources to be added to the component items: $ref: '#/definitions/source' source: oneOf: - $ref: '#/definitions/accessSource' - $ref: '#/definitions/inputSource' defaultSource: properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' labels: $ref: '#/definitions/labels' access: $ref: '#/definitions/access' input: $ref: '#/definitions/input' accessSource: type: object required: - name - type - access additionalProperties: false properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' labels: $ref: '#/definitions/labels' access: $ref: '#/definitions/access' inputSource: type: object required: - name - type - input additionalProperties: false properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' labels: $ref: '#/definitions/labels' input: $ref: '#/definitions/input' resourceType: type: object description: base type for resources required: - name - type - relation - access properties: name: $ref: '#/definitions/identityAttributeKey' extraIdentity: $ref: '#/definitions/identityAttribute' version: $ref: '#/definitions/relaxedSemver' type: type: string srcRefs: $ref: '#/definitions/srcRefs' relation: $ref: '#/definitions/relation' labels: $ref: '#/definitions/labels' access: $ref: '#/definitions/access' digest: oneOf: - type: 'null' - $ref: '#/definitions/digestSpec' resources: type: array description: list of specifications of resources to be added to the component items: $ref: '#/definitions/resource' resource: oneOf: - $ref: '#/definitions/accessResource' - $ref: '#/definitions/inputResource' defaultResource: properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' relation: $ref: '#/definitions/relation' labels: $ref: '#/definitions/labels' srcRefs: $ref: '#/definitions/srcRefs' access: $ref: '#/definitions/access' input: $ref: '#/definitions/input' accessResource: type: object required: - name - type - access properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' relation: $ref: '#/definitions/relation' labels: $ref: '#/definitions/labels' srcRefs: $ref: '#/definitions/srcRefs' access: $ref: '#/definitions/access' if: type: object properties: relation: const: external then: type: object additionalProperties: false properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' version: $ref: '#/definitions/version' labels: $ref: '#/definitions/labels' srcRefs: $ref: '#/definitions/srcRefs' relation: const: external access: $ref: '#/definitions/access' else: type: object additionalProperties: false properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' labels: $ref: '#/definitions/labels' srcRefs: $ref: '#/definitions/srcRefs' relation: const: local access: $ref: '#/definitions/access' inputResource: type: object required: - name - type - input additionalProperties: false properties: name: $ref: '#/definitions/elementName' type: type: string extraIdentity: $ref: '#/definitions/elementExtraIdentity' labels: $ref: '#/definitions/labels' srcRefs: $ref: '#/definitions/srcRefs' relation: const: local input: $ref: '#/definitions/input' component: type: object description: a component required: - name - version - provider properties: name: $ref: '#/definitions/componentName' version: $ref: '#/definitions/relaxedSemver' creationTime: type: - string - 'null' format: date-time repositoryContexts: type: array items: $ref: '#/definitions/ociRepositoryContext' provider: oneOf: - type: string - $ref: '#/definitions/provider' labels: $ref: '#/definitions/labels' sources: type: array items: oneOf: - $ref: '#/definitions/sourceDefinition' - $ref: '#/definitions/source' componentReferences: $ref: '#/definitions/componentReferences' resources: type: array items: oneOf: - $ref: '#/definitions/resourceType' - $ref: '#/definitions/resource' components: type: array description: list of specifications of the components to be created items: $ref: '#/definitions/component' componentDescriptor: type: object required: - meta - component properties: meta: $ref: '#/definitions/meta' component: $ref: '#/definitions/component' signatures: type: array items: $ref: '#/definitions/signature' nestedDigests: type: array items: $ref: '#/definitions/nestedComponentDigests' componentConfiguration: type: object required: - components additionalProperties: false properties: components: $ref: '#/definitions/components' oneOf: - $ref: '#/definitions/componentDescriptor' - $ref: '#/definitions/componentConfiguration'