1.4 KiB
1.4 KiB
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
- Add
myservice/dev/manifests (deployment, service, ingress). - Add
apps/myservice.yaml(copygitops-demo.yaml, change name + path). - Commit + push. ArgoCD's root app picks it up — no cluster access needed.