87 lines
2.5 KiB
Markdown
87 lines
2.5 KiB
Markdown
# `argo1`
|
|
|
|
NOTE: This has not been updated since moving secrets around a bit. YMMV
|
|
|
|
### A different opinionated opinion on how to bootstrap your ArgoCD
|
|
|
|
This repo is a basic skeleton for managing your apps with ArgoCD.
|
|
|
|
It uses helm to bootstrap and maintain the ArgoCD installation. You may
|
|
then add additional applications in argo1/templates either as helm charts
|
|
or as directories which should live alongside `argo1`.
|
|
|
|
## Setup your own Argo1
|
|
|
|
1. Clone this repo as a template
|
|
2. If you will be using a private repo, configure a secret similar to secret.yaml
|
|
1. You might also wish to use sealed secrets (via kubeseal).
|
|
3. Install CRDs
|
|
|
|
*Preferred:*
|
|
```bash
|
|
bash ./install-crds.sh
|
|
```
|
|
|
|
This runs helm template but filters only the CRDs and installs them. This is
|
|
preferred to installing from tip of argocd since this helm template method
|
|
will ensure the correct versions of CRDs are installed.
|
|
|
|
*Alternative:*
|
|
A suggested command to install via kubectl from [the ArgoCD docs][argo-crds]:
|
|
|
|
```bash
|
|
kubectl apply -k https://github.com/argoproj/argo-cd/manifests/crds\?ref\=stable
|
|
```
|
|
|
|
You will also need to find all the CRDs for any other applications in your
|
|
templates.
|
|
|
|
3. update values.yaml
|
|
* At the very least, you will need to update the bootstrap.source.repoURL to
|
|
point to your clone -- this URL must match the prefix of the secret from
|
|
step 2.
|
|
* You may configure the argo-cd helm template via the argo-cd map in values.yaml.
|
|
A basic example is available in the default values.yaml file which suppresses
|
|
installing the CRDs (which are instead installed via install-crds.sh)
|
|
|
|
4. Install
|
|
```bash
|
|
helm install --dependency-update argo1 .
|
|
```
|
|
5. all done!
|
|
|
|
## App of Apps pattern
|
|
|
|
This is already an app of apps.
|
|
|
|
Add additional applications to `templates/`. These may reference Values or
|
|
they may be verbatim manifests (be careful of any `{{}}` in your manifests
|
|
though!)
|
|
|
|
Do not modify (or be careful with) `1-self.yaml` which is the application which
|
|
references this repo to enable self-management.
|
|
|
|
## Uninstalling
|
|
|
|
1. First, delete all the subapps. If you wanted to keep them and remove ArgoCD
|
|
only, then just skip this step.
|
|
|
|
```bash
|
|
argocd app set argo1 --helm-set secrets.enabled=false --helm-set sealed-secrets.enabled=false --core
|
|
```
|
|
|
|
2. Now uninstall argo1 via helm.
|
|
|
|
```bash
|
|
helm uninstall argo1
|
|
```
|
|
|
|
#### DUMP OF AN INSTALL
|
|
|
|
```bash
|
|
cd argo1
|
|
bash install-crds.sh
|
|
|
|
|
|
[argo-crds]: https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/
|