2.2.2.2.4. olm.deprecations schema
The optional olm.deprecations schema defines deprecation information for packages, bundles, and channels in a catalog. Operator authors can use this schema to provide relevant messages about their Operators, such as support status and recommended upgrade paths, to users running those Operators from a catalog.
When this schema is defined, the OpenShift Container Platform web console displays warning badges for the affected elements of the Operator, including any custom deprecation messages, on both the pre- and post-installation pages of the software catalog.
An olm.deprecations schema entry contains one or more of the following reference types, which indicates the deprecation scope. After the Operator is installed, any specified messages can be viewed as status conditions on the related Subscription object.
| Type | Scope | Status condition |
|---|---|---|
|
| Represents the entire package |
|
|
| Represents one channel |
|
|
| Represents one bundle version |
|
Each reference type has their own requirements, as detailed in the following example.
예 2.4. Example olm.deprecations schema with each reference type
schema: olm.deprecations
package: my-operator
entries:
- reference:
schema: olm.package
message: |
The 'my-operator' package is end of life. Please use the
'my-operator-new' package for support.
- reference:
schema: olm.channel
name: alpha
message: |
The 'alpha' channel is no longer supported. Please switch to the
'stable' channel.
- reference:
schema: olm.bundle
name: my-operator.v1.68.0
message: |
my-operator.v1.68.0 is deprecated. Uninstall my-operator.v1.68.0 and
install my-operator.v1.72.0 for support.
- 1
- Each deprecation schema must have a
packagevalue, and that package reference must be unique across the catalog. There must not be an associatednamefield. - 2
- The
olm.packageschema must not include anamefield, because it is determined by thepackagefield defined earlier in the schema. - 3
- All
messagefields, for anyreferencetype, must be a non-zero length and represented as an opaque text blob. - 4
- The
namefield for theolm.channelschema is required. - 5
- The
namefield for theolm.bundleschema is required.
The deprecation feature does not consider overlapping deprecation, for example package versus channel versus bundle.
Operator authors can save olm.deprecations schema entries as a deprecations.yaml file in the same directory as the package’s index.yaml file:
Example directory structure for a catalog with deprecations
my-catalog
└── my-operator
├── index.yaml
└── deprecations.yaml