Skip to content

Add make target that simplifies build-push-deployment to cluster #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,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