You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/advanced-how-tos/building-olm.adoc
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ This procedure assumes that the source code for your Operator and bundle, includ
31
31
32
32
== Automating updates for image references in the CSV
33
33
34
+
In order to enable your operator to be installed in disconnected environments, it is important to include sha digest image references in the link:https://sdk.operatorframework.io/docs/olm-integration/generation/#csv-fields[CSV's `spec.relatedImages`].
35
+
34
36
.Procedure
35
37
36
38
. In the {ProductName} UI, in your OLM Operator's application, go to the *Components* tab and copy the URL for the Operator's container image. The URL should include `sha256:`.
@@ -41,6 +43,53 @@ This procedure assumes that the source code for your Operator and bundle, includ
41
43
.. Wait for the first build of those components to finish.
42
44
.. Copy the URL to the images and paste it as a reference in the bundle's CSV file.
43
45
46
+
== Maintaining valid image references before a release
47
+
48
+
When images are xref:/advanced-how-tos/releasing/index.adoc[released] they will be copied to another image repository so any pinned references will be invalid. To surmount this, {ProductName} enables your bundle to be pinned to image references which will be valid after release.
49
+
50
+
.Procedure
51
+
52
+
. Configure your xref:/advanced-how-tos/releasing/create-release-plan-admission.adoc[release plan admission] which will copy the images to a new repository.
53
+
. In the `spec.data.mapping.components` create a list of component mappings to the target repository
<.> A list of applications that will contain components to be released.
79
+
<.> A list containing the target repository for each component
80
+
<.> The development team workspace where the applications and components are defined.
81
+
82
+
. Using your preferred text editor, in the git repo for your OLM Operator, open the CSV file for your bundle. In that file, update the image references to all images that will be released to the target repository from the RPA (the sha digests should remain unchanged). Commit this change.
83
+
84
+
+
85
+
NOTE: Once this change is merged, the bundle will be invalid until all referenced images are released. In order to test the bundles in an environment, you will need to use a registry mirror like an link:https://docs.openshift.com/container-platform/4.16/rest_api/config_apis/imagedigestmirrorset-config-openshift-io-v1.html[ImageDigestMirrorSet].
86
+
87
+
.*Verification*
88
+
89
+
. Commit a change to an Operand or Operator triggering a push event.
90
+
. After the build is completed, a pull request should be opened against your bundle's git repository.
0 commit comments