hi. is it possible to adapt olm: https://github.com/operator-framework/operator-lifecycle-manager for private operators and operatorhub.io website?
more specifically is it possible to have this type of subscriptions with source: myprivate-operatorhubio-catalog :
cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: my-project-xxxx
namespace: operators
spec:
channel: stable-1.0
name: project-quay
source: myprivate-operatorhubio-catalog
sourceNamespace: olm
EOF?
Assistant
Yes, it is entirely possible to adapt the Operator Lifecycle Manager (OLM) to use a private operatorhub.io-style catalog for managing private operators. By setting up a private CatalogSource, you can host your own collection of operators and manage subscriptions to them just as you would with the public OperatorHub.
Steps to Set Up a Private Catalog with OLM
Prepare Your Private Catalog:
Operator Bundle: Ensure that your operators are packaged as Operator Bundles and pushed to a container registry accessible from your Kubernetes cluster.
channel: The update channel for the operator (e.g., stable-1.0).
name: The name of the operator you want to subscribe to (as defined in your catalog).
source: Matches the name of your CatalogSource (myprivate-operatorhubio-catalog).
sourceNamespace: Typically olm, where OLM manages CatalogSources.
Apply the Subscription:
bash
kubectl apply -f your-subscription.yaml
Verify the Installation:
Check the status of your CatalogSource and Subscription to ensure they are correctly set up.
bash
kubectl get catalogsource -n olm
kubectl get subscriptions -n operators
Additional Considerations
Authentication & Access Control:
If your private catalog is hosted in a private registry, ensure that Kubernetes has the necessary image pull secrets to access it.
Updating the Catalog:
To add or update operators in your private catalog, update the catalog image and ensure that the CatalogSource is refreshed or re-deployed as needed.
Synchronization:
OLM periodically checks for updates from CatalogSources. Ensure your private catalog is always accessible to facilitate smooth operator updates.
Testing:
Before deploying to a production environment, test the private catalog setup in a staging cluster to ensure that subscriptions and operator installations work as expected.
By following these steps, you can effectively manage private operators using OLM with a custom CatalogSource, providing a tailored operator experience similar to the public operatorhub.io but within your private infrastructure.
Yes—it’s possible to set up a private CatalogSource (like your own OperatorHub) and use OLM to manage subscriptions pointing to it. By creating a private CatalogSource (e.g., named myprivate-operatorhubio-catalog in the olm namespace), you can apply Subscription YAMLs that specify source: myprivate-operatorhubio-catalog and sourceNamespace: olm, enabling OLM to install and manage your private operators similarly to those from operatorhub.io.