Skip to content

Commit

Permalink
Add make target for easy-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria authored and openshift-ci[bot] committed Oct 13, 2023
1 parent 91b76da commit baca4eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=<image tag> USERNAME=<quay.io 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/...
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<image tag> USERNAME=<quay.io 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

Expand Down
9 changes: 9 additions & 0 deletions doc/deploy/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ For example:
```
helm install <release-name> 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=<image tag> USERNAME=<quay.io 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.
Expand Down

0 comments on commit baca4eb

Please sign in to comment.