- Python 88.7%
- Shell 10.6%
- Go Template 0.4%
- Dockerfile 0.3%
| .forgejo/workflows | ||
| apps | ||
| authz | ||
| common | ||
| docs | ||
| fdwg-apps | ||
| git-hooks | ||
| .gitignore | ||
| bronto-historical.md | ||
| datanommer_meta.duckdb | ||
| fnox.toml | ||
| mise.toml | ||
| README.md | ||
| renovate.json | ||
| topic_schema_metadata.py | ||
Hatlas-FDWG-ArgoCD
This repo contains all of the ArgoCD infrastructure code for deploying FDWG apps to Hatlas.
Trusted FDWG members may directly manage this repo without intervention from "ops" (i.e. @mwinters
and @smoliicek). This gives FDWG roughly the same level of access as you would have with
Communishift or similar. PRs are welcome on the ops repo too, but this will require a review from
the ops team to merge.
Places you can access things on the web:
- ArgoCD: https://argocd.hatlas.mwinters.net/
- Headlamp (Kubernetes): https://headlamp.hatlas.mwinters.net/
Overview
I can't teach you all of these tools, though I'm happy to give you pointers in Matrix! 🙂 At minimum you need to understand:
One thing that is unique to Hatlas is that we're currently running on a single server, which means we need to be very careful about allocating RAM, disk, etc to ensure that nothing crashes and corrupts data. For this reason, only the ops repo can create:
- Namespaces
- Persistent Volumes (A PVC will not auto-create a PV.)
- Secrets (You should use the Sealed Secrets operator anyway.)
Additionally, if your thing needs a postgres, you should use the CNPG Operator.
CLI
@mwinters heavily uses mise (basically if direnv and homebrew had a
baby), and there is a mise.toml file in the root directory. The easiest way to ensure
that you're using the correct versions of the CLI tools is to install mise and then mise trust and
mise install in this directory.
ArgoCD setup:
argocd login argocd.hatlas.mwinters.net --sso
# Protip!
rgo() {argocd app get $1 --refresh; sleep 10; argocd app sync $1}
rgo fdwg-argocd/www-hatlas
Argo Pattern: app-of-apps
- See: app-of-apps
Even if you know ArgoCD well, our setup may be a bit confusing. Argo has basically two modes for
treating dev teams: either they have full cluster access (deploy to argocd namespace) or no access
at all (only use ApplicationSets). I want our dev team fully enabled within their namespaces
and able to declare their own Applications so they can use ignoreDifferences etc. This requires
a few extra layers of config + some Kyverno duct tape.
Our hierarchy:
- [Ops repo]
fdwgApplication- Belongs to the
defaultproject - Declares AppProjects
fdwg-bridgeandfdwg- The bridge project constrains Application objects to only be allowed in the
fdwg-argocdnamespace. This is the trust boundary between ops and dev: everything below it can be authored in this repo.
- The bridge project constrains Application objects to only be allowed in the
- Declares:
- [Ops repo]
fdwg-appsApplication in thefdwg-bridgeproject- Sources its resources from:
- [This repo]
/fdwg-apps/as a top-level Application.- All sub Applications here must exist in the
fdwgproject and thefdwg-argocdnamespace. This is the default so we just don't specify it.
- All sub Applications here must exist in the
- [This repo]
- Sources its resources from:
- [Ops repo]
- Belongs to the
In other words:
defaultprojectfdwg-bridgeprojectfdwg-appsappwww-hatlasappdatanommerapp- etc