Skip to content
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

File based catalog #201

Merged
merged 10 commits into from
Aug 28, 2024
Merged

File based catalog #201

merged 10 commits into from
Aug 28, 2024

Conversation

didierofrivia
Copy link
Contributor

@didierofrivia didierofrivia commented Aug 26, 2024

This PR replaces the old catalog generation sql based for the file based. This is due some limitations (semver check that doesn't allow beta tags) and deprecation notice: time="2024-08-26T13:47:11Z" level=warning msg="\x1b[1;33mDEPRECATION NOTICE:\nSqlite-based catalogs and their related subcommands are deprecated. Support for\nthem will be removed in a future release. Please migrate your catalog workflows\nto the new file-based catalog format.\x1b[0m"

Verification steps

Build local catalog.

make catalog
make catalog-build CATALOG_IMG=quay.io/kuadrant/authorino-operator-catalog:local-testing-dd

Push the image to Quay.io.

make catalog-push CATALOG_IMG=quay.io/kuadrant/authorino-operator-catalog:local-testing-dd

Create kind cluster

kind create cluster --name kuadrant-local 

Deploy OLM

bin/operator-sdk olm install

Deploy authorino operator using OLM

make deploy-catalog CATALOG_IMG=quay.io/kuadrant/authorino-operator-catalog:local-testing-dd

Check the authorino operator is up and running (it takes up to few minutes)

k get pods -n authorino-operator
NAME                                                              READY   STATUS      RESTARTS   AGE
authorino-operator-catalog-67mrl   0/1     Terminating   0          5s
authorino-operator-catalog-gjc5c   1/1     Running       0          2s

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.78%. Comparing base (bf9ba03) to head (5d37da2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #201   +/-   ##
=======================================
  Coverage   61.78%   61.78%           
=======================================
  Files           2        2           
  Lines         785      785           
=======================================
  Hits          485      485           
  Misses        249      249           
  Partials       51       51           
Flag Coverage Δ
unit 61.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@didierofrivia didierofrivia marked this pull request as ready for review August 26, 2024 15:29
@didierofrivia didierofrivia self-assigned this Aug 26, 2024
@didierofrivia didierofrivia added kind/enhancement New feature or request area/tooling Makefile and scripts for the dev workflow, testing, etc labels Aug 26, 2024
eguzki
eguzki previously approved these changes Aug 26, 2024
Copy link
Contributor

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits left, but overall LGTM

make/catalog.mk Show resolved Hide resolved
@@ -208,10 +209,9 @@ jobs:
image: ${{ env.OPERATOR_NAME }}-catalog
tags: ${{ env.IMG_TAGS }}
platforms: linux/amd64,linux/arm64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but I do not think that catalog image needs to be multi-platform. It's just a single yaml file!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could pulling the image from a different platform fail if only amd64 is available (despite being just a single yaml inside)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image is being pulled by OLM. So, not being entirely sure, this needs to be checked first 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From OS docs:

Set --filter-by-os to the operating system and architecture to use for the base image, which must match the target OpenShift Container Platform cluster. Valid values are linux/amd64, linux/ppc64le, and linux/s390x.

Which not sure if it could be interpreted to also the actual catalog yaml img that it's delivered

Makefile Outdated Show resolved Hide resolved
@@ -0,0 +1,8 @@
# Adds namespace to all resources.
namespace: authorino-system
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the other supported installation methods:

Suggested change
namespace: authorino-system
namespace: authorino-operator

metadata:
labels:
control-plane: controller-manager
name: system
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: system
name: operator

name: kuadrant
spec:
source: authorino-operator-catalog
sourceNamespace: authorino-system
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sourceNamespace: authorino-system
sourceNamespace: authorino-operator

source: authorino-operator-catalog
sourceNamespace: authorino-system
name: authorino-operator
channel: "preview"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided using stable as the default channel. Even if this ends up overridden by command-line args, I think having preview could be confusing.

Suggested change
channel: "preview"
channel: "stable"

---
schema: olm.channel
package: authorino-operator
name: preview
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: preview
name: stable

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's just a template, but to avoid confusion.

Copy link
Collaborator

@guicassolato guicassolato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @didierofrivia!

@didierofrivia didierofrivia merged commit a923f4b into main Aug 28, 2024
11 checks passed
@didierofrivia didierofrivia deleted the file-based-catalog branch August 28, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tooling Makefile and scripts for the dev workflow, testing, etc kind/enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants