Skip to content

Commit dcbd858

Browse files
authored
Merge pull request #96 from arewm/main
add instructions for nudging against unreleased artifacts
2 parents b01b41a + e680679 commit dcbd858

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/modules/ROOT/pages/advanced-how-tos/building-olm.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ This procedure assumes that the source code for your Operator and bundle, includ
3131

3232
== Automating updates for image references in the CSV
3333

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+
3436
.Procedure
3537

3638
. 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
4143
.. Wait for the first build of those components to finish.
4244
.. Copy the URL to the images and paste it as a reference in the bundle's CSV file.
4345

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
54+
55+
+
56+
*Example partial `ReleasePlanAdmission.yaml` object*
57+
58+
+
59+
[source,yaml]
60+
----
61+
apiVersion: appstudio.redhat.com/v1alpha1
62+
kind: ReleasePlanAdmission
63+
spec:
64+
applications:
65+
- demo-app <.>
66+
data:
67+
mapping:
68+
components: <.>
69+
- name: demo-component-1
70+
repository: target-image-repository-1
71+
- name: demo-component-2
72+
repository: target-image-repository-2
73+
origin: <dev-workspace> <.>
74+
75+
----
76+
77+
+
78+
<.> 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.
91+
92+
4493
== Building the file-based catalog
4594

4695
.Procedure

0 commit comments

Comments
 (0)