diff --git a/Makefile b/Makefile index 432c18a23..c34a271a7 100644 --- a/Makefile +++ b/Makefile @@ -182,6 +182,13 @@ ifneq ($(TAG:release-v%=%),$(TAG)) endif endif +# easy-deploy can be used for building and pushing a custom image of MCAD and deploying it on your K8s cluster for development. +# Example: "make easy-deploy TAG= USERNAME=" +easy-deploy: images-podman + podman tag localhost/mcad-controller:${TAG} quay.io/${USERNAME}/mcad-controller:${TAG} + podman push quay.io/${USERNAME}/mcad-controller:${TAG} + cd deployment && helm install mcad-controller mcad-controller --namespace kube-system --wait --set image.repository=quay.io/${USERNAME}/mcad-controller --set image.tag=${TAG} + run-test: $(info Running unit tests...) go test -v -coverprofile cover.out -race -parallel 8 ./pkg/... diff --git a/README.md b/README.md index 828cd8662..e51031edc 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ Follow the [build instructions here](./doc/build/build.md) to build the Multi-Cl Refer to [deployment instructions here](./doc/deploy/deployment.md) on how to deploy the `multi-cluster-app-dispatcher` as a controller in Kubernetes. +Alternatively, for a quick deployment, you can use the `easy-deploy` make target to build, push, and deploy your custom image of MCAD on your Kubernetes cluster: +``` +make easy-deploy TAG= USERNAME= +``` +Note: Ensure you are logged into your quay.io account on your local machine, and your kubeconfig is pointing to the cluster you want to deploy MCAD on. ## Release Process diff --git a/doc/deploy/deployment.md b/doc/deploy/deployment.md index fb45cb2bb..d0bfa0a77 100644 --- a/doc/deploy/deployment.md +++ b/doc/deploy/deployment.md @@ -142,6 +142,15 @@ For example: ``` helm install mcad-controller --namespace kube-system --wait --set image.repository=tonghoon --set image.tag=both --set configMap.name=mcad-deployer --set configMap.dispatcherMode='"true"' --set configMap.agentConfigs=agent101config:uncordon --set volumes.hostPath=/etc/kubernetes ``` + +##### Example 4 +Use the `easy-deploy` make target to build, push, and deploy your custom image of MCAD on your Kubernetes cluster: + +``` +make easy-deploy TAG= USERNAME= +``` +Note: This assumes you are logged into your quay.io account on your local machine, and your kubeconfig is pointing to the cluster you want to deploy MCAD on. + ### Chart configuration The following table lists the configurable parameters of the helm chart and their default values.