This repostiroy provides needed configurations for the Snappcloud-hub catalog source and its subscriptions. This catalog is generated and maintained using the catalog tamplate method.
- opm v1.23.1+
First you should prepare the index of the catalog source regarding your operator either it's new or already cataloged.
In order to add a new operator to the catalog source, first make sure that the latest operator docker image and its bundle are pushed to a docker registry. Then follow these steps:
-
Consider your operator name as
<OPERATOR-NAME>
-
Create a template file in
templates/<OPERATOR-NAME>.yaml
directory -
Fulfill it with data like this and modify it regarding the operator docker registry uri and its bundled versions.
GenerateMajorChannels: true GenerateMinorChannels: false Stable: Bundles: - Image: repository-uri/<OPERATOR-NAME>-bundle:v0.8.9 - Image: repository-uri/<OPERATOR-NAME>-bundle:v0.9.0
-
Render the template:
$ opm alpha render-veneer semver -o yaml < templates/<OPERATOR-NAME>.yaml > catalog/<OPERATOR-NAME>/index.yaml
-
Validate the catalog:
$ opm validate catalog
To upgrade an already-cataloged operator, follow these steps:
-
Modify the operator template file in
templates/<OPERATOR-NAME>.yaml
directory and add the new bundle version to your desired channel in the template. (i.e. candidate, fast, stable) -
Render the template:
$ opm alpha render-veneer semver -o yaml < templates/<OPERATOR-NAME>.yaml > catalog/<OPERATOR-NAME>/index.yaml
-
Validate the catalog:
$ opm validate catalog
Now build the catalog docker image:
$ docker build -t <registry-uri>/snappcloud-hub-catalog:latest
And push it:
$ docker push <registry-uri>/snappcloud-hub-catalog:latest
The catalog source must be applied on the Kubernetes cluster if haven't been done already:
kubectl apply -f catalog-source.yaml
Create a subscription file for your operator and apply it on the cluster:
kubectl apply -f s3-operator-subcscription.yaml