Skip to main content
Version: Unreleased 🚧

Manage Public Hub manifests

This document describes how to manage manifests in Public Hub.

Prerequisites

Check the Hub manifests sources

To check the Public Hub manifests sources, run:

kubectl -n capact-system get deploy capact-hub-public -o=jsonpath='{$.spec.template.spec.containers[?(@.name=="hub-public-populator")].env[?(@.name=="MANIFESTS_SOURCES")].value}'

The empty response means that the populator sidecar is not enabled and manifests are not synchronized into Public Hub automatically.

NOTE: Check the go-getter project to understand the URL format.

Change the Hub manifest source

By default, the Hub manifests are synchronized with the manifests directory from the hub-manifests repository on a specific release branch. To change that, follow one of the alternatives below.

During Capact installation

# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main

capact install --capact-overrides="hub-public.populator.enabled=true,hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL},hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF}"

Once you have your Capact cluster set up

# The git repository URL
export SOURCE_REPO_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_REF="{ref}" # e.g. main

helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=true --set hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_URL} --set hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_REF}

Disable automated synchronization with an external source

The commands bellow disable the populator sidecar in Public Hub. This is useful when you want to populate manifests manually.

During Capact installation

capact install --capact-overrides=hub-public.populator.enabled=false

Once you have your Capact cluster set up

helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=false

Enable automated synchronization with an external source

During Capact installation

capact install --capact-overrides=hub-public.populator.enabled=true

Once you have your Capact cluster set up

helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
helm upgrade capact --version {VERSION} capactio/capact -n capact-system --reuse-values --set hub-public.populator.enabled=true

Populate the manifests into Hub

  1. Disable automated synchronization with an external source.

  2. In one terminal window, expose Neo4j:

    kubectl -n capact-system port-forward svc/neo4j-neo4j 7687:7687
  3. Execute populator:

     APP_JSON_PUBLISH_ADDR=http://{your_ip_address} populator register ocf-manifests --source {PATH_TO_DIR_WITH_MANIFESTS}

    NOTE: More information about using populator, can be found in populator_register-ocf-manifests.md.

Using multiple manifest sources

You can provide multiple manifest sources by setting overrides using different indexes of the hub-public.populator.manifestsLocations. For example, for a fresh Capact installation, provide these values as the --capact-overrides flag value:

NOTE: All manifest source locations must contain manifests with unique paths. In case of a path conflict, the Populator will fail before populating the Public Hub database.

# First git repository URL
export SOURCE_REPO_1_URL="{url}" # e.g. github.com/capactio/hub-manifests
# The git ref to checkout. It can point to a commit SHA, a branch name, or a tag.
export SOURCE_REPO_1_REF="{ref}" # e.g. main

# Second git repository URL
export SOURCE_REPO_2_URL="{url}" # e.g. [email protected]/extra-manifests-repo.git
export SOURCE_REPO_2_REF="{ref}" # e.g. main

capact install --capact-overrides="hub-public.populator.enabled=true,hub-public.populator.manifestsLocations[0].repository=${SOURCE_REPO_1_URL},hub-public.populator.manifestsLocations[0].branch=${SOURCE_REPO_1_REF},hub-public.populator.manifestsLocations[1].repository=${SOURCE_REPO_2_URL},hub-public.populator.manifestsLocations[1].branch=${SOURCE_REPO_2_REF}"

Submit manifest to the community repository

Any type of contribution is welcome! To start contributing, follow these steps:

  1. Set up a local hub-manifests repository.
  2. Create a pull request in our Hub Manifests repository.