Skip to content

Commit 1a4b6bf

Browse files
committed
OLM validation update
Update the 'validate_bundle_image' function in validate-bundles.sh to remove the command that generates the updated registry database. This command is no longer required when validating the OLM bundles. Also updates the README to address this change and add a troubleshooting section. Issue: [sc-15044]
1 parent d3300d2 commit 1a4b6bf

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

installers/olm/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,22 @@ make tools
9090
make bundles validate-bundles
9191
```
9292

93+
Previously, the 'validate_bundle_image' function in validate-bundles.sh ended
94+
with the following command:
95+
96+
```sh
97+
# Create an index database from the bundle image.
98+
"${opm[@]}" index add --bundles="${image}" --generate
99+
100+
# drwxr-xr-x. 2 user user 22 database
101+
# -rw-r--r--. 1 user user 286720 database/index.db
102+
# -rw-r--r--. 1 user user 267 index.Dockerfile
103+
```
104+
105+
this command was used to generate the updated registry database, but this step
106+
is no longer required when validating the OLM bundles.
107+
- https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md#add-1
108+
93109
```sh
94110
BUNDLE_DIRECTORY='bundles/community'
95111
BUNDLE_IMAGE='gcr.io/.../postgres-operator-bundle:latest'
@@ -116,3 +132,12 @@ After generating and testing the OLM bundles, there are two manual steps.
116132
1. Update the image SHA values (denoted with '<update_SHA_value>', required for both the Red Hat 'Certified' and
117133
'Marketplace' bundles)
118134
2. Update the 'description.md' file to indicate which OCP versions this release of PGO was tested against.
135+
136+
### Troubleshooting
137+
138+
If, when running `make validate-bundles` you encounter an error similar to
139+
140+
`cannot find Containerfile or Dockerfile in context directory: stat /mnt/Dockerfile: permission denied`
141+
142+
the target command is likely being blocked by SELinux and you will need to adjust
143+
your settings accordingly.

installers/olm/validate-image.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@ validate_bundle_image() {
8686
"${opm[@]}" alpha bundle validate --image-builder='none' \
8787
--optional-validators='operatorhub,bundle-objects' \
8888
--tag="${image}"
89-
90-
# Create an index database from the bundle image.
91-
"${opm[@]}" index add --bundles="${image}" --generate
92-
93-
# drwxr-xr-x. 2 user user 22 database
94-
# -rw-r--r--. 1 user user 286720 database/index.db
95-
# -rw-r--r--. 1 user user 267 index.Dockerfile
9689
}
9790

9891
validate_bundle_image "$@"

0 commit comments

Comments
 (0)