open-cluster-management Foundation supports some foundational components based ManagedCluster for ACM.
Check the CONTRIBUTING Doc for how to contribute to the repo.
This is a guide on how to build and deploy open-cluster-management Foundation from code.
Create a directory $GOPATH/src/github.com/open-cluster-management
, and clone the code into the directory. Since the build process will use (eventually installing) some golang
tools, makes sure you have $GOPATH/bin
added to your $PATH
.
Populate the vendor directory. If necessary, set environment variable GO111MODULE=on
.
go mod vendor
Run the following after cloning/pulling/making a change.
make build
make build will build all the binaries in the current directory.
Need to install ManagedCluster before deploy open-cluster-management Foundation.
-
Install Cluster Manager on Hub cluster.
make deploy-hub
-
Install Klusterlet On Managed cluster.
-
Copy
kubeconfig
of Hub to~/.kubconfig
. -
Install Klusterlet.
make deploy-klusterlet
-
-
Approve CSR on Hub cluster.
MANAGED_CLUSTER=$(kubectl get managedclusters | grep cluster | awk '{print $1}') CSR_NAME=$(kubectl get csr |grep $MANAGED_CLUSTER | grep Pending |awk '{print $1}') kubectl certificate approve "${CSR_NAME}"
-
Accept Managed Cluster on Hub.
MANAGED_CLUSTER=$(kubectl get managedclusters | grep cluster | awk '{print $1}') kubectl patch managedclusters $MANAGED_CLUSTER --type merge --patch '{"spec":{"hubAcceptsClient":true}}'
-
Deploy hub components on hub cluster.
make deploy-foundation-hub
-
Deploy klusterlet components on managed cluster.
make deploy-foundation-agent
If you've found a security issue that you'd like to disclose confidentially please contact Red Hat's Product Security team. Details at here.