migrate gitops-demo to generic chart

This commit is contained in:
2026-07-19 08:36:56 +00:00
parent 87c40621d4
commit a2a27e1762
11 changed files with 212 additions and 71 deletions

View File

@@ -1,10 +1,15 @@
# A child Application in the app-of-apps tree. ArgoCD's root app finds this file
# and creates this Application, which in turn syncs gitops-demo/dev into the
# cluster. To add another service, copy this file and change name + path.
# gitops-demo child Application — now Helm-based, using the shared chart.
#
# NOTE: replace REPLACE_WITH_MANIFEST_REPO_URL with this repo's real HTTPS URL
# (see README) — child Applications can't be templated by our shell scripts
# because ArgoCD reads them straight from git.
# MULTI-SOURCE explained: ArgoCD lets an Application pull from more than one
# source. We use two, BOTH pointing at this same manifest repo:
# 1. ref: values — exposes the repo as "$values" so we can reference a file
# from it (the per-service values.yaml).
# 2. path: charts/app — the generic chart, rendered with that values file.
# This keeps the chart shared and each service's values in its own clean file,
# instead of duplicating manifests or inlining values here.
#
# NOTE: replace REPLACE_WITH_MANIFEST_REPO_URL in BOTH sources with the real
# repo URL (same as before — ArgoCD reads these straight from git).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
@@ -12,13 +17,19 @@ metadata:
namespace: argocd
spec:
project: default
source:
repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
path: gitops-demo/dev
sources:
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
ref: values
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
path: charts/app
helm:
valueFiles:
- $values/gitops-demo/dev/values.yaml
destination:
server: https://kubernetes.default.svc
namespace: dev # per-environment namespace convention
namespace: dev
syncPolicy:
automated:
prune: true