The spec sync component of Hub-of-Hubs.
Go to the Contributing guide to learn how to get involved.
The following environment variables are required for the most tasks below:
REGISTRY
, for exampledocker.io/vadimeisenbergibm
.IMAGE_TAG
, for examplev0.1.0
.
make build
Disable the currently running controller in the cluster (if previously deployed):
kubectl scale deployment hub-of-hubs-spec-sync -n open-cluster-management --replicas 0
Set the following environment variables:
- DATABASE_URL
- WATCH_NAMESPACE
- POD_NAMESPACE
Set the DATABASE_URL
according to the PostgreSQL URL format: postgres://YourUserName:YourURLEscapedPassword@YourHostname:5432/YourDatabaseName?sslmode=verify-full&pool_max_conns=50
.
❗ Remember to URL-escape the password, you can do it in bash:
python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])" 'YourPassword'
WATCH_NAMESPACE
can be defined empty so the controller will watch all the namespaces.
POD_NAMESPACE
should usually be open-cluster-management
./bin/hub-of-hubs-spec-sync --kubeconfig $TOP_HUB_CONFIG
make build-images
-
Create a secret with your database url:
kubectl create secret generic hub-of-hubs-database-secret -n open-cluster-management --from-literal=url=$DATABASE_URL
-
Deploy the operator:
COMPONENT=$(basename $(pwd)) envsubst < deploy/operator.yaml.template | kubectl apply -n open-cluster-management -f -