1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 00:48:01 +01:00
Files
openshift-docs/modules/olm-adding-new-crd-version.adoc
2020-10-12 18:36:50 -06:00

44 lines
1.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * operators/operator_sdk/osdk-generating-csvs.adoc
[id="olm-dependency-resolution-adding-new-crd-version_{context}"]
= Adding a new CRD version
.Procedure
To add a new version of a CRD to your Operator:
. Add a new entry in the CRD resource under the `versions` section of your CSV.
+
For example, if the current CRD has one version `v1alpha1` and you want to add a
new version `v1beta1` and mark it as the new storage version:
+
[source,yaml]
----
versions:
- name: v1alpha1
served: true
storage: false
- name: v1beta1 <1>
served: true
storage: true
----
<1> Add a new entry for `v1beta1`.
. Ensure the referencing version of the CRD in the `owned` section of your CSV is
updated if the CSV intends to use the new version:
+
[source,yaml]
----
customresourcedefinitions:
owned:
- name: cluster.example.com
version: v1beta1 <1>
kind: cluster
displayName: Cluster
----
<1> Update the `version`.
. Push the updated CRD and CSV to your bundle.