Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Improve and document the developer deployment process. #37

Merged
merged 1 commit into from
Sep 14, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
VERSION?=$(shell cat VERSION)
IMAGE_TAG?=v$(VERSION)
IMAGE_PREFIX?=argoprojlabs
IMAGE?=argoprojlabs/argocd-applicationset:v$(VERSION)
DOCKER_PUSH?=true

.PHONY: build
Expand All @@ -9,8 +8,13 @@ build:

.PHONY: image
image:
docker build -t $(IMAGE_PREFIX)/argocd-applicationset:$(IMAGE_TAG) .
@if [ "$(DOCKER_PUSH)" = "true" ] ; then docker push $(IMAGE_PREFIX)/argocd-applicationset:$(IMAGE_TAG) ; fi
docker build -t $(IMAGE) .
@if [ "$(DOCKER_PUSH)" = "true" ] ; then docker push $(IMAGE) ; fi

.PHONY: deploy
deploy:
kustomize build manifests/cluster-install | kubectl apply -f -
kubectl patch deployment -n argocd argocd-applicationset-controller --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "$(IMAGE)"}]'

# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ compatibility are made, at least until merging into Argo CD proper.
## Proposal:
* https://docs.google.com/document/d/1juWGr20FQaJmuuTIS8mBFmWWDU422M_FQMuhp5c1jt4/edit?usp=sharing

## Development Instructions

The following assumes you have:

1. Installed a recent version of [kustomize](https://github.com/kubernetes-sigs/kustomize) (3.x+).
1. Created a container repository for your development image.
1. Deployed ArgoCD into the "argocd" namespace.

To build and push a container with your current code, and deploy Kubernetes manifests for the controller Deployment:

```bash
IMAGE="username/argocd-applicationset:v0.0.1" make image deploy
```

The ApplicationSet controller should now be running in the "argocd" namespace.

## Example Spec:

```yaml
Expand Down Expand Up @@ -40,3 +56,4 @@ spec:
```

Additional examples are available in the [examples](./examples) directory.