/hub-of-hubs-manager

The repository for the manager of all controllers in the Hub-of-Hubs (see https://github.com/stolostron/hub-of-hubs)

Primary LanguageGoApache License 2.0Apache-2.0

Hub-of-Hubs-Manager

Go Report Card Go Reference License

The manager component of Hub-of-Hubs.

Go to the Contributing guide to learn how to get involved.

Getting Started

Environment variables

The following environment variables are required for the most tasks below:

  • REGISTRY, for example quay.io/open-cluster-management-hub-of-hubs.
  • IMAGE_TAG, for example latest or v0.1.0.

Build

make build

Run Locally

Disable the currently running controller in the cluster (if previously deployed):

kubectl scale deployment hub-of-hubs-manager -n open-cluster-management --replicas 0

Run with hub-of-hubs kubeconfig:

./bin/hub-of-hubs-manager --kubeconfig $TOP_HUB_CONFIG --process-database-url=$PROCESS_DATABASE_URL --transport-bridge-database-url=$TRANSPORT_BRIDGE_DATABASE_URL

Build image

make build-images

Deploy to a cluster

  1. Create two secrets with your database url:

    kubectl create secret generic hub-of-hubs-database-secret -n open-cluster-management --from-literal=url=$PROCESS_DATABASE_URL
    kubectl create secret generic hub-of-hubs-database-transport-bridge-secret -n open-cluster-management --from-literal=url=$TRANSPORT_BRIDGE_DATABASE_URL
  2. Deploy the operator:

    TRANSPORT_TYPE=kafka REGISTRY=quay.io/open-cluster-management-hub-of-hubs IMAGE_TAG=latest envsubst < deploy/operator.yaml.template | kubectl apply -n open-cluster-management -f -