initial push
This commit is contained in:
38
README.md
Normal file
38
README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# k3s-manifests
|
||||
|
||||
Desired-state repo for the k3s cluster. **ArgoCD watches this repo and makes the
|
||||
cluster match it.** You deploy by committing here; you roll back with `git revert`.
|
||||
Do not `kubectl apply` these by hand — let ArgoCD own them.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
apps/ # app-of-apps: one ArgoCD Application per service/env
|
||||
gitops-demo.yaml # -> points at gitops-demo/dev
|
||||
gitops-demo/ # a service
|
||||
dev/ # its dev environment (plain k8s YAML)
|
||||
deployment.yaml
|
||||
service.yaml
|
||||
ingress.yaml
|
||||
```
|
||||
|
||||
Environment is a folder (`dev`, later `prod`). The manifests are **plain YAML on
|
||||
purpose** for now — Phase 4 replaces the per-env duplication with a generic Helm
|
||||
chart. One new concept per phase.
|
||||
|
||||
## One-time setup when you first push this
|
||||
|
||||
The child Application in `apps/gitops-demo.yaml` has a placeholder repo URL.
|
||||
Replace it with this repo's real HTTPS URL before (or right after) the first push:
|
||||
|
||||
```
|
||||
# from the repo root, replace the placeholder in every apps/*.yaml:
|
||||
sed -i 's#REPLACE_WITH_MANIFEST_REPO_URL#https://gitea.lgkentang.com/you/k3s-manifests.git#' apps/*.yaml
|
||||
git add -A && git commit -m "point apps at real repo url" && git push
|
||||
```
|
||||
|
||||
## Onboarding a new service later
|
||||
|
||||
1. Add `myservice/dev/` manifests (deployment, service, ingress).
|
||||
2. Add `apps/myservice.yaml` (copy `gitops-demo.yaml`, change name + path).
|
||||
3. Commit + push. ArgoCD's root app picks it up — no cluster access needed.
|
||||
Reference in New Issue
Block a user