README
¶
multicluster-global-hub-operator
The operator of multicluster global hub (see: https://github.com/stolostron/multicluster-global-hub)
Prerequisites
- Connect to a Kubernetes cluster with
kubectl
- ACM or OCM is installed on the Kubernetes cluster
- PostgreSQL is installed and a database is created for multicluster global hub, also a secret with name
multicluster-global-hub-storage
that contains the credential should be created inopen-cluster-management
namespace. The credential format likepostgres://<user>:<password>@<host>:<port>/<database>
:
kubectl create secret generic multicluster-global-hub-storage -n "open-cluster-management" \
--from-literal=database_uri=<postgresql-uri>
You can run this sample script
config/samples/storage/deploy_postgres.sh
to install postgres inhoh-postgres
namespace and create the secretmulticluster-global-hub-storage
in namespaceopen-cluster-management
automatically. To override the secret namespace, setTARGET_NAMESPACE
environment variable to the ACM installation namespace before executing the script.
- Kafka is installed and two topics
spec
andstatus
are created, also a secret with namemulticluster-global-hub-transport
that contains the kafka access information should be created inopen-cluster-management
namespace:
kubectl create secret generic multicluster-global-hub-transport -n "open-cluster-management" \
--from-literal=bootstrap_server=<kafka-bootstrap-server-address> \
--from-literal=CA=<CA-for-kafka-server>
As above, You can run this sample script
config/samples/transport/deploy_kafka.sh
to install kafka in kafka namespace and create the secretmulticluster-global-hub-transport
in namespaceopen-cluster-management
automatically. To override the secret namespace, setTARGET_NAMESPACE
environment variable to the ACM installation namespace before executing the script.
Getting started
Note: You can also install Multicluster Global Hub Operator from Operator Hub if you have ACM installed in an OpenShift Container Platform, the operator can be found in community operators by searching "multicluster global hub" keyword in the filter box, then follow the document to install the operator.
Follow the steps below to instal Multicluster Global Hub Operator in developing environment:
Running on the cluster
- Build and push your image to the location specified by
IMG
:
make docker-build docker-push IMG=<some-registry>/multicluster-global-hub-operator:<tag>
- Deploy the controller to the cluster with the image specified by
IMG
:
make deploy IMG=<some-registry>/multicluster-global-hub-operator:<tag>
Note: Specify TARGET_NAMESPACE
environment variable if you're trying to deploy the operator into another namespace rather than open-cluster-management
, keep in mind the namespace must be the ACM installation namespace.
- Install Instances of Custom Resource:
kubectl apply -k config/samples/
Undeploy from the cluster
Undeploy the controller and CRD from the cluster:
make undeploy
Contributing
Test It Out Locally
- Install CRD and run operator locally:
make install run
- Install Instances of Custom Resource:
kubectl apply -k config/samples/
Modifying the API definitions
If you are editing the API definitions, generate the generated code and manifests such as CRs, CRDs, CSV using:
make generate manifests bundle
NOTE: Run make --help
for more information on all potential make targets
Documentation
¶
There is no documentation for this package.
Directories
¶
Path | Synopsis |
---|---|
apis
|
|
v1alpha3
Package v1alpha3 contains API Schema definitions for the operator v1alpha3 API group +kubebuilder:object:generate=true +groupName=operator.open-cluster-management.io
|
Package v1alpha3 contains API Schema definitions for the operator v1alpha3 API group +kubebuilder:object:generate=true +groupName=operator.open-cluster-management.io |
pkg
|
|