Hub-of-Hubs-All-in-One
The all-in-one 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 docker.io/morvencao
.
IMAGE_TAG
, for example 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-all-in-one -n open-cluster-management --replicas 0
Set the following environment variables:
- POD_NAMESPACE
- WATCH_NAMESPACE
- PROCESS_DATABASE_URL
- TRANSPORT_BRIDGE_DATABASE_URL
- TRANSPORT_TYPE
- TRANSPORT_MESSAGE_COMPRESSION_TYPE
- KAFKA_PRODUCER_ID
- KAFKA_BOOTSTRAP_SERVERS
- KAFKA_TOPIC
- KAFKA_MESSAGE_SIZE_LIMIT_KB
- SYNC_SERVICE_PROTOCOL
- SYNC_SERVICE_HOST
- SYNC_SERVICE_PORT
- STATUS_SYNC_INTERVAL
- STATUS_SYNC_INTERVAL
- DELETED_LABELS_TRIMMING_INTERVAL
Run with hub-of-hubs kubeconfig:
./bin/hub-of-hubs-all-in-one --kubeconfig $TOP_HUB_CONFIG
Build image
make build-images
Deploy to a cluster
-
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
-
Deploy the operator:
COMPONENT=$(basename $(pwd)) TRANSPORT_TYPE=kafka envsubst < deploy/operator.yaml.template | kubectl apply -n open-cluster-management -f -