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

local operator catalog raw file based format #107

Merged
merged 8 commits into from
Dec 8, 2022

Conversation

eguzki
Copy link
Contributor

@eguzki eguzki commented Nov 21, 2022

what

  • Locally built custom OLM catalogs use (raw) File Based Catalog format instead of the deprecated SQLITE format.
    From SQLite-based catalogs,
The SQLite database format for Operator catalogs is a deprecated feature. Deprecated functionality is still included in OpenShift Container Platform and continues to be supported; however, it will be removed in a future release of this product and is not recommended for new deployments.
  • Update github actions to push file based catalog format images
  • Makefile
    • target renamed: deploy-olm -> deploy-catalog
    • target renamed: undeploy-olm -> undeploy-catalog
    • function renamed: go-get-tool -> go-install-tool
    • bundle-dependencies target removed. Functionality moved to the bundle target.
    • replace envsubst operations to update yaml objects with external env variarbles with the yq tool
    • moved all catalog related logic to make/catalog.mk
    • New: catalog target to build catalog manifests
  • Documentation oriented to contributors doc/development.md:
    • New section: Deploy kuadrant operator using OLM
    • New section: "Build custom OLM catalog`
    • Added Table of Contents.

TODO

  • Doc
  • github actions

Verification steps

Build local catalog. It will include kuadrant operator, limitador operator and authorino operator

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

Push the image to Quay.io. Currently it is required because the catalogsource sets the image pull policy to Always, so even if the image is loaded in the kind cluster, it will fail if the image is not in quay.

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

Create kind cluster

make kind-create-cluster

Deploy OLM

make install-olm

Deploy kuadrant operator using OLM

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

Check the kuadrant operator, limitador operator and authorino operator are up and running

k get pods -n kuadrant-system
NAME                                                              READY   STATUS      RESTARTS   AGE
43539917290efc2e6f33b021e25da1f7a9f150d8d276acf92fd09b--1-wqggr   0/1     Completed   0          34s
6427bb5aac2edc4750e505a33be4eb4b56923d3aed4213abecdc70--1-v4lk5   0/1     Completed   0          34s
aecaf21d9bde4883921cefdd0ba3a142f079e897473c5d40fd8a1a--1-2249v   0/1     Completed   0          34s
authorino-operator-7d9968586c-x4kbl                               1/1     Running     0          16s
kuadrant-operator-catalog-rkmdn                                   1/1     Running     0          79s
kuadrant-operator-controller-manager-6688b8bfdf-m4rwh             1/1     Running     0          13s
limitador-operator-controller-manager-7f5dcdd976-66bcs            1/1     Running     0          11s

@eguzki eguzki force-pushed the local-catalog-file-based branch 4 times, most recently from 5ce218a to a924ff9 Compare November 27, 2022 20:34
@eguzki eguzki marked this pull request as ready for review November 28, 2022 08:18
@eguzki eguzki requested a review from a team as a code owner November 28, 2022 08:18
@eguzki
Copy link
Contributor Author

eguzki commented Nov 28, 2022

sorry for the bit long PR 🙏

Makefile Show resolved Hide resolved
doc/development.md Outdated Show resolved Hide resolved
@didierofrivia
Copy link
Member

It looks good, minor things I commented. However, I've still haven't successfully tried it out, having network issues:

dd@pomodoro:~/Projects/RedHat/kuadrant-operator|local-catalog-file-based⚡ ⇒  make install-olm
./utils/install-operator-sdk.sh /Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk v1.22.0
Downloading https://github.com/operator-framework/operator-sdk/releases/download/v1.22.0/operator-sdk_darwin_arm64
gpg: connecting dirmngr at '/Users/dd/.gnupg/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr
make: *** [/Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk] Error 2
dd@pomodoro:~/Projects/RedHat/kuadrant-operator|local-catalog-file-based⚡ ⇒  make install-olm
./utils/install-operator-sdk.sh /Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk v1.22.0
Downloading https://github.com/operator-framework/operator-sdk/releases/download/v1.22.0/operator-sdk_darwin_arm64
make: *** [/Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk] Error 92
dd@pomodoro:~/Projects/RedHat/kuadrant-operator|local-catalog-file-based⚡ ⇒  make install-olm
./utils/install-operator-sdk.sh /Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk v1.22.0
Downloading https://github.com/operator-framework/operator-sdk/releases/download/v1.22.0/operator-sdk_darwin_arm64
gpg: key 052996E2A20B5C7E: "Operator SDK (release) <[email protected]>" 2 new signatures
gpg: Total number processed: 1
gpg:         new signatures: 2
gpg: assuming signed data in 'checksums.txt'
gpg: Signature made Tue Jun 14 22:57:45 2022 CEST
gpg:                using RSA key 8613DB87A5BA825EF3FD0EBE2A859D08BF9886DB
gpg: Good signature from "Operator SDK (release) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 3B2F 1481 D146 2380 80B3  46BB 0529 96E2 A20B 5C7E
     Subkey fingerprint: 8613 DB87 A5BA 825E F3FD  0EBE 2A85 9D08 BF98 86DB
operator-sdk_darwin_arm64: OK
/Users/dd/Projects/RedHat/kuadrant-operator/bin/operator-sdk olm install
INFO[0000] Fetching CRDs for version "latest"
INFO[0000] Fetching resources for resolved version "latest"
I1207 18:09:07.865914   53853 request.go:601] Waited for 1.047390292s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:61648/apis/certificates.k8s.io/v1?timeout=32s
INFO[0018] Creating CRDs and resources
INFO[0018]   Creating CustomResourceDefinition "catalogsources.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "clusterserviceversions.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "installplans.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "olmconfigs.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "operatorconditions.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "operatorgroups.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "operators.operators.coreos.com"
INFO[0018]   Creating CustomResourceDefinition "subscriptions.operators.coreos.com"
INFO[0018]   Creating Namespace "olm"
INFO[0018]   Creating Namespace "operators"
INFO[0018]   Creating ServiceAccount "olm/olm-operator-serviceaccount"
INFO[0018]   Creating ClusterRole "system:controller:operator-lifecycle-manager"
INFO[0018]   Creating ClusterRoleBinding "olm-operator-binding-olm"
INFO[0018]   Creating OLMConfig "cluster"
INFO[0022]   Creating Deployment "olm/olm-operator"
INFO[0022]   Creating Deployment "olm/catalog-operator"
INFO[0022]   Creating ClusterRole "aggregate-olm-edit"
INFO[0022]   Creating ClusterRole "aggregate-olm-view"
INFO[0022]   Creating OperatorGroup "operators/global-operators"
INFO[0022]   Creating OperatorGroup "olm/olm-operators"
INFO[0022]   Creating ClusterServiceVersion "olm/packageserver"
INFO[0022]   Creating CatalogSource "olm/operatorhubio-catalog"
INFO[0022] Waiting for deployment/olm-operator rollout to complete
INFO[0022]   Waiting for Deployment "olm/olm-operator" to rollout: 0 of 1 updated replicas are available
FATA[0120] Failed to install OLM version "latest": deployment/olm-operator failed to rollout: timed out waiting for the condition

@didierofrivia
Copy link
Member

Ok, finally managed to try it out and it works like a charm!

dd@pomodoro:~/Projects/RedHat/kuadrant-operator|local-catalog-file-based⚡ ⇒  k get pods -n kuadrant-system
NAME                                                              READY   STATUS      RESTARTS   AGE
43539917290efc2e6f33b021e25da1f7a9f150d8d276acf92fd09b--1-f9dvv   0/1     Completed   0          4m57s
6427bb5aac2edc4750e505a33be4eb4b56923d3aed4213abecdc70--1-rjxdt   0/1     Completed   0          4m57s
aecaf21d9bde4883921cefdd0ba3a142f079e897473c5d40fd8a1a--1-rsdzb   0/1     Completed   0          4m57s
authorino-operator-7d9968586c-r658g                               1/1     Running     0          3m38s
kuadrant-operator-catalog-krz9t                                   1/1     Running     0          5m40s
kuadrant-operator-controller-manager-6688b8bfdf-h9h6g             1/1     Running     0          3m36s
limitador-operator-controller-manager-7f5dcdd976-zcl5w            1/1     Running     0          3m41s

Co-authored-by: dd di cesare <[email protected]>
@alexsnaps alexsnaps merged commit 8a789ed into main Dec 8, 2022
@alexsnaps alexsnaps deleted the local-catalog-file-based branch December 8, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants