1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/olm-bundle-format-dependencies-file.adoc
2020-10-12 18:36:50 -06:00

42 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * operators/understanding/olm/olm-packaging-format.adoc
// * operators/understanding/olm/olm-understanding-dependency-resolution.adoc
[id="olm-bundle-format-dependencies_{context}"]
= Dependencies file
The dependencies of an Operator are listed in a `dependencies.yaml` file in the
`metadata/` folder of a bundle. This file is optional and currently only used to
specify explicit Operator-version dependencies.
The dependency list contains a `type` field for each item to specify what kind
of dependency this is. There are two supported types of Operator dependencies:
* `olm.package`: A package type means this is a dependency for a specific Operator version. The
dependency information must include the package name and the version of the
package in semver format. For example, you can specify an exact version such as
`0.5.2` or a range of versions such as `>0.5.1`.
* `olm.gvk`: With a GVK type, the author can specify a dependency with GVK
information, similar to existing CRD and API-based usage in a CSV. This is a
path to enable Operator authors to consolidate all dependencies, API or explicit
versions, to be in the same place.
In the following example, dependencies are specified for a Prometheus Operator
and etcd CRDs:
.Example `dependencies.yaml` file
[source,yaml]
----
dependencies:
- type: olm.package
value:
packageName: prometheus
version: ">0.27.0"
- type: olm.gvk
value:
group: etcd.database.coreos.com
kind: EtcdCluster
version: v1beta2
----