-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: switch to file-based OLM catalogs #191
Conversation
f21a94a
to
b94daea
Compare
b94daea
to
498c450
Compare
name: development | ||
entries: | ||
- name: observability-operator.v0.0.13 | ||
### DEVELOPMENT_CHANNEL_MARKER ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this patch merges and we can release 0.0.14 successfully, we should probably revisit this part and see if we can cause kustomize to add the entries.
For every new version we add it should add something like
- name: observability-operator.v<new-version>
replaces: observability-operator.v<previous-version>
to appropriate channels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 yep was thinking the same when I looked at update-channels.sh
:)
If kustomize doesn't work maybe at least something else that actually interprets yaml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen other teams write (python) script to parse and update yaml
but I think maintaining separate files for channels and using kustomize to assemble it might work. I took the easy route (as you can see :D )
68bdad6
to
ab5b19e
Compare
npx standard-version -i RELEASE_BODY.md --release-as $(cat VERSION) --skip.commit | ||
npx standard-version -i RELEASE_BODY.md \ | ||
--release-as $(cat VERSION) \ | ||
--skip.commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: unlike old release workflow, this one does not push the tag and only creates a draft release without a git tag. The git tag gets created only after the commit that updates index.yaml is added (after running olm-publish
workflow) and pushed
I tried to release my custom catalog image and deploy it to my 4.12 cluster and it works fine. |
ab5b19e
to
27947b0
Compare
In order to switch to new file-based OLM catalogs, following changes were made * upgrade to newer version of operator-sdk tools (operator-sdk, olm) * Generate existing bundles * Add 0.0.13 bundle to the new catalog image by * creating new catalog index dockerfile * adding package definition for observability-operator * add 0.0.13 bundle and channels * Add olm/update-channels.sh script to update olm catalog channels * Fix GitHub workflow to adapt to constraints introduced by the new file-based catalog **NOTE:** This PR introduces a change to CI post-merge action - release. Previously, when a commit is merged to main, the CI job used to publish a catalog image which did not require any change to the code. With the file-based catalog, the new bundle that is published needs to be added to the catalog index.yaml file. Hence, the CI job release that calls the `olm-publish` action now adds a commit on top the commit that got merged into `main` and **pushes** that commit to the repo if a catalog image could be published successfully. JIRA: https://issues.redhat.com/browse/MON-2791 Signed-off-by: Sunil Thaha <sthaha@redhat.com>
27947b0
to
5d9a615
Compare
declare -r CATALOG_INDEX_FILE="olm/observability-operator-index/index.yaml" | ||
|
||
update_channel() { | ||
local channel=$1; shift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local channel=$1; shift | |
local channel="$1"; shift |
|
||
update_channel() { | ||
local channel=$1; shift | ||
local bundle=$1; shift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local bundle=$1; shift | |
local bundle="$1"; shift |
|
||
echo "channels: $channels | bundle: $bundle" | ||
|
||
# convert coma seperated list to an array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# convert coma seperated list to an array | |
# convert comma seperated list to an array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
I think it would be great to have more comments around the opm usage, especially the Dockerfile and opm serve
. The documentation wasn't super straight forward to find and outlining what these pieces actually do might be a service to future developers.
name: development | ||
entries: | ||
- name: observability-operator.v0.0.13 | ||
### DEVELOPMENT_CHANNEL_MARKER ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 yep was thinking the same when I looked at update-channels.sh
:)
If kustomize doesn't work maybe at least something else that actually interprets yaml.
As soon as this merges, I am happy to write a docs/ops/release.md where we can explain the release workflow. For OLM Catalog I used the following refs
Where do we want these references to be updated? |
Closing this in favour of #195 where the catalog index file will be maintained in the |
In order to switch to new file-based OLM catalogs, following changes were made
upgrade to newer version of operator-sdk tools (operator-sdk, olm)
Generate existing bundles
Add 0.0.13 bundle to the new catalog image by
Add olm/update-channels.sh script to update olm catalog channels
Fix GitHub workflow to adapt to constraints introduced by the new file-based catalog
NOTE: This PR introduces a change to CI post-merge action - release.
Previously, when a commit is merged to main, the CI job used to publish a catalog image which did not require any change to the code. With the file-based catalog, the new bundle that is published needs to be added to the catalog index.yaml file. Hence, the CI job release that calls the
olm-publish
action now adds a commit on top the commit that got merged intomain
and pushes that commit to the repo if a catalog image could be published successfully.JIRA: https://issues.redhat.com/browse/MON-2791
Signed-off-by: Sunil Thaha sthaha@redhat.com