crossplane-contrib / provider-in-cluster

@crossplane provider for in-cluster resources
Apache License 2.0
10 stars 4 forks source link

How do I make this work outside of OpenShift #13

Open salaboy opened 3 years ago

salaboy commented 3 years ago

What happened?

I am trying to figure out how to use this provider outside of Open$hift :)

https://github.com/crossplane-contrib/provider-in-cluster/blob/master/examples/kubeconfig.sh#L3

It is not clear from the docs or the readmes where do you get these values:

https://github.com/crossplane-contrib/provider-in-cluster/blob/master/examples/operator/subscription.yaml#L12

Can we define a Source that points to operatorhub.io?

How can we reproduce it?

Try to run the example outside Open$hift.

What environment did it happen in?

Crossplane version: Provider-In-Cluster version:

I am running on GKE and I couldn't find enough documentation to run this example.

salaboy commented 3 years ago

Also I've found that you can create a catalogSource by installing OLM in your cluster:

kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml

But this defeats the purpose of installing things with Crossplane, in my opinion, if I still need to install OLM in my cluster manually, I cannot create compositions for freshly created clusters.

I would have expected that if we install the in-cluster provider that only supports OLM, that the provider installs that dependency so I can start using it without installing OLM manually.

I might be missing something big here.. so just sharing my findings.

salaboy commented 3 years ago

@jbw976 @hasheddan do you know who is maintaining this provider?

jbw976 commented 3 years ago

@krishchow has driven most of the work in this repository and would be the best domain expert to help out here :)

krishchow commented 3 years ago

Hey! Sorry for the delay @salaboy, just in the process of starting in a new role, so things have been kind of hectic.

Currently, there isn't a way to install OLM directly w/ the in provider, although that's something that could feasibly be added. If you have already installed OLM, and you want to test it out, you can try out the catalogSource from here.

I will try to improve the docs here, and I appreciate your feedback! I'm not sure if I will have time in the short term to add in a CRD/managed resource for OLM though. Potentially something like the provider-kubernetes could be used in the meantime? Previously with some hacking I was able to put arbitrary resources into an XRD, although I'm not sure that's supported behaviour today 😅

salaboy commented 3 years ago

@krishchow no worries about the delay. I really want to get this done, so I will be happy to do some hacking as well. Can you explain what is this exactly: https://github.com/redhat-et/crossplane-quay/blob/1d4d446fe690b1a59e86f9d0350d76e62857b21e/manifests/catalog.yaml ? Is that your custom bridge between provider-in-cluster and OperatorHub.io? so then we can install Operators from OperatorHub? Or what is that catalog exactly?

Regarding the installation of OLM, I'm starting to think that it is the responsibility of the Provider to install its dependencies, so I wouldn't use provider-kubernetes for that. This provider depending on OLM also makes me think that we need a more generic way of installing Operators, like a provider-operator, with lesser dependencies than OLM and support for operators that were not built with certain frameworks.

I am happy to give OLM a try but there are still too many other questions to answer regarding catalogs and why you need your own catalog source.