Help with updating OperatorSource
Opened this issue · 9 comments
I have created a csv https://github.com/eclipse/che-operator/blob/0.3.0/olm-catalog/cheoperator.0.0.1.csv.yaml which works fine with OLM.
Followed https://github.com/operator-framework/operator-marketplace/blob/master/docs/how-to-upload-artifact.md and pushed an artifact https://quay.io/application/eivantsov/cheoperator?tab=releases
Updated operatorsource.cr.yaml and applied it:
apiVersion: "marketplace.redhat.com/v1alpha1"
kind: "OperatorSource"
metadata:
name: "global-operators"
namespace: "openshift-marketplace"
spec:
type: appregistry
endpoint: "https://quay.io/cnr"
registryNamespace: "eivantsov"
displayName: "Marketplace Operators"
publisher: "Red Hat"
Once configured, I see the following error in operator-marketplace log:
time="2019-01-23T09:59:33Z" level=error msg="Error \"package [] not found\" getting manifest" name=global-operators targetNamespace=openshift-marketplace type=CatalogSourceConfig
At this point I am puzzled - there must be some errors in one of the yamls but I can't figure out which.
Also, some logs that say, the manifest was found but not stored?
time="2019-01-23T13:36:36Z" level=info msg="Downloading from [https://quay.io/cnr ]" name=global-operators namespace=openshift-marketplace type=OperatorSource
| time="2019-01-23T13:36:38Z" level=info msg="Downloaded 1 manifest(s) from the operator source endpoint" name=global-operators namespace=openshift-marketplace type=OperatorSource
| time="2019-01-23T13:36:38Z" level=info msg="Successfully stored 0 operator manifest(s)" name=global-operators namespace=openshift-marketplace type=OperatorSource
| time="2019-01-23T13:36:38Z" level=info msg="Download complete, scheduling for configuration" name=global-operators namespace=openshift-marketplace type=OperatorSource
Hello @eivantsov
The problem you've encountered is within your OperatorBundle
(name changed from OperatorArtifact
). The OperatorBundle
needs to include a list of Packages.
@awgreene thanks. Where should I create this package object? It's not quite clear from existing readme.
@eivantsov The README mentions that it should be under data.packages
:
data:
customResourceDefinitions: |-
clusterServiceVersions: |-
packages: |-
I'll make sure to improve the documentation to better explain this process. BTW, the README we linked in this thread will be removed in a future PR, the update to the docs that I provide will be done in the community-operators repo.
@awgreene I thought that when uploading artifact to quay.io one uses csv file when promoted by installer. Now I think I should create one yaml with CRDs, CSVs and packages and feed it to upload script? Having an example of one would be just awesome. Perhaps, you can export one from an existing repo? Thanks
Ah I see the confusion. Examples bundles can be found here in the community-operators repo
@awgreene i figured it out when I found a config map in operator-marketplace map. Then watched OperatorSource status for errors, fixed then, redeployed and I can see my Operator in the Hub now. Thanks for your help.
I am having further issues though. I have my operator in the Hub. In a newly created namespace, I click on it, and click install. Console is showing a loader like for two minutes, I am then allowed to choose update strategy and operator group. Clicking create results in 503 error displayed. And now the Operator is listed as installed:
However, I cannot see it in Installed Operators.
I think I hit the same issue as I described here: #97
I wonder if it's really because I am on OKD 3.11 + Admin console run as a Docker image (as per OLM docs) or there are other reasons.
As to bundling and uploading artifacts, I will send a PR to docs unless you do it before me. I think it's always nice to look as docs as a person who does the thing for the first time.
Ah Marketplace isn't designed to work with OKD 3.11 so that could explain the behavior you're seeing - I haven't tested such a configuration out so I cannot speak of the issues that may result.
If you'd like to update the document, please make the contribution to the community operators Github repo as the document within this repo will be removed. Would love the contribution!
@awgreene got it, thanks. Well, OKD 3.11 at least helped me get where I am now - with a ready to use bundle yaml and some understanding of objects on how to update OperatorSource.