apiVersion: kabanero.io/v1alpha1 kind: Kabanero metadata: name: kabanero namespace: kabanero spec: collections: repositories: - name: custom url: https://github.example.com/my_org/collections/releases/download/0.3.0/kabanero-index.yaml activateDefaultCollections: true github: organization: my_org teams: - collection-admins - admins apiurl: api.github.com
A Kabanero custom resource (CR) instance can be configured to use an alternative collection repository. When you have created a new collection repository, as described in Working with collections, follow these steps to use that collection repository with Kabanero:
Create organizational-level teams in GitHub to administer the cloned collection(s), and add members to those teams. These members will be able to use the Kabanero CLI to administer the collections in the namespace where the Kabanero CR instance is configured.
Obtain the URL to the collection repository. If a Git release was created for the collections, the URL format will be:
<github.com>with your GitHub or GHE hostname
<organization>with your GitHub organization name
<release>with the name of the release that was created
Find the name of your Kabanero CR instance. Use
oc get kabaneros -n kabaneroto obtain a list of all Kabanero CR instances in namespace
kabanero. The default name for the CR instance is
kabanero. Then, edit the speific CR instance using
oc edit kabanero <name> -n kabanero, replacing
<name>with the instance name.
Modify your Kabanero CR instance to target the new collections that were pushed to the remote GitHub repository and the teams in GitHub that will administer the collection(s). Specifically:
Spec.Collections.Repositories.urlattribute should be set to the URL of the alternative collection repository.
Refer to authorizing the Kabanero CLI service for instructions on defining authorization to the GitHub teams.
A modified Kabanero CR instance for a collection repository located in the
my_orgorganization of the
github.example.comGitHub repository using release
0.3.0of collections might look like this:
+ For more information about other fields that can be customized in the Kabanero CR instance, see Configuring a Kabanero CR instance.
+ After editing, save your changes. The updated Kabanero CR instance is applied to your cluster.
The Kabanero operator will now load the collections in the repository. To see a list of all collections in the
oc get collections -n kabanero. If the kabanero-operator is unable to apply the collections, the
Statussection of the Kabanero CR instance or the Collection CR instances will contain more information.
If you have questions, we would like to hear from you. You can reach out to the community for assistance on the Kabanero Slack channel.