Check out what's in the latest release of Kabanero Learn More

Configuring to use an alternative stack repository

A Kabanero custom resource (CR) instance can be configured to use an alternative stack repository. When you have published a new stack repository, as described in Publishing Stacks, follow these steps to use that stack index with Kabanero:

  1. Create organizational-level teams in GitHub to administer the cloned stacks, and add members to those teams. These members will be able to use the stack management CLI to administer the stacks in the namespace where the Kabanero CR instance is configured.

  2. Obtain the URL to the stack repository. If a Git release was created for the stacks, the URL format might be: https://<>/<organization>/stacks/releases/download/<release>/incubator-index.html

    • Replace <> with your GitHub or GHE hostname

    • Replace <organization> with your GitHub organization name

    • Replace <release> with the name of the release that was created

  3. Find the name of your Kabanero CR instance. Use oc get kabaneros -n kabanero to obtain a list of all Kabanero CR instances in namespace kabanero. The default name for the CR instance is kabanero. Then, edit the specific CR instance using oc edit kabanero <name> -n kabanero, replacing <name> with the instance name.

    Note: Avoid using the OpenShift Console to edit the Kabanero CR instance. The console may change the apiVersion of the Kabanero CR instance from v1alpha2 to v1alpha1. There is a description of the issue here.

  4. Modify your Kabanero CR instance to target the new stacks that were pushed to the remote GitHub repository and the teams in GitHub that will administer the stacks. Specifically:

    • The Spec.Stacks.Repositories.Https.url attribute should be set to the URL of the alternative stack repository.

    • Refer to authorizing the stack management CLI service for instructions on defining authorization to the GitHub teams.

    A modified Kabanero CR instance for a stack repository located in the my_org organization of the GitHub repository using release 0.1.2 of stacks might look like this:


    kind: Kabanero
      name: kabanero
      namespace: kabanero
        - name: custom
        - id: default
          sha256: 14285a7f0bb152759b3e2141db19d72ea1f94f01bbf5ffbf866cab4e60e093dd
        organization: my_org
          - stack-admins
          - admins

    + If the GitHub repository is protected, see Specifying Credentials to Access Protected GitHub Resources. For more information about other fields that can be customized in the Kabanero CR instance, see Kabanero Custom Resource.

    + After editing, save your changes. The updated Kabanero CR instance is applied to your cluster.

  5. The product operator will now load the stacks in the repository. To see a list of all stacks in the kabanero namespace, use oc get stacks -n kabanero. If the kabanero-operator is unable to apply the stacks, the Status section of the Kabanero CR instance or the Stack CR instances will contain more information.

    Note that when replacing the stack index in the Kabanero CR instance, the product operator will not alter any version in a Stack CR instance that has a desiredState set. For more information on desiredState, see Stack CR Configuration.

Need help?

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.

Edit This Page