Skip to main content

ArgoCD

Web UI

https://argocd.k8s.instance.onyourmarks.tech — live ArgoCD dashboard for the cluster. Use it to check sync status, view app health, and trigger manual syncs.

ArgoCD pulls Helm chart releases from the GitLab OCI registry and reconciles them onto the cluster. Configuration lives in argocd/ (cluster-wide setup), k8s/app/system/*/*.app.yaml (system apps) and k8s/app/platform/<project>/definition/xplatformapp.yaml (per-project apps).

Three layers​

  1. Cluster baseline — k8s/cluster/cluster.app.yaml is the one Application that is applied by hand at bootstrap. It syncs k8s/cluster/ (cluster RBAC) and creates the next layer.
  2. Cluster apps — k8s/cluster/cluster-apps.app.yaml watches k8s/app/ and applies every */*/*.app.yaml (system and database Applications) and every */*/definition/*.yaml (per-project XPlatformApp). Pushing to main is enough; nothing under k8s/app/ is applied by hand anymore. It does not prune: deleting a file leaves the live object in place until someone deletes it explicitly (see Bootstrap).
  3. Per-project apps — each project under k8s/app/platform/<project>/definition/ contains one xplatformapp.yaml, a Crossplane XPlatformApp resource. The composition in k8s/app/system/crossplane-system/config/composition/composition-xplatformapps.yaml expands it into one ArgoCD Application per environment (<project>-staging, <project>-production) in the platform AppProject, plus the matching Kargo Project, Warehouses and Stages. Nobody writes Application manifests for projects by hand.

The generated Applications are fully GitOps (automated, prune, selfHeal).

Generated Application shape​

Each generated Application is multi-source: one source is the chart (OCI), the other is this repo (for the values file). With overlaysDir set on the XPlatformApp, a third kustomize source is added for extra manifests per environment.

spec:
project: platform
sources:
- repoURL: oci://registry.gitlab.com/onyourmarks/k8s/oym-k8s-cluster/helm/node-generic
chart: node-generic
targetRevision: "1.3.3" # = parameters.chartVersion
helm:
releaseName: node-generic
valueFiles:
- $values/k8s/app/platform/unisport-agent/helm/values-staging.yaml
- repoURL: https://gitlab.com/onyourmarks/k8s/oym-k8s-cluster.git
targetRevision: main
ref: values
# only with parameters.overlaysDir:
- repoURL: https://gitlab.com/onyourmarks/k8s/oym-k8s-cluster.git
targetRevision: main
path: k8s/app/platform/unisport-agent/overlays/staging
destination:
server: https://kubernetes.default.svc
namespace: unisport-agent-staging

Bumping chartVersion in xplatformapp.yaml and pushing rolls out a new chart version. Editing the values file rolls out config changes. The platform AppProject only allows destination namespaces matching *-staging, *-sprint, *-production and *-kargo.

Step-by-step onboarding: Publishing a project.