Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/universeclouddev/Universe/llms.txt

Use this file to discover all available pages before exploring further.

The ArgoCD extension bridges Universe’s runtime management model with ArgoCD’s declarative GitOps model. Every 60 seconds it writes a set of Kubernetes YAML manifests to ./argocd-manifests/ that describe the current configurations and running instances. You commit this directory to a Git repository tracked by an ArgoCD Application, giving you drift detection, sync history, and a permanent record of cluster state — all without replacing Universe’s actual instance lifecycle management.

What It Does

On a 60-second timer the extension writes three categories of files to ./argocd-manifests/:
  • ConfigMaps — one YAML file per Universe Configuration, with the full configuration JSON embedded under data.configuration.json
  • Deployments — one YAML file per active instance, capturing the instance ID, configuration name, environment variables, and container port
  • kustomization.yaml — a Kustomize manifest that lists every generated file so ArgoCD can apply them all as a unit

No Configuration Required

There is no config.json for this extension. It is entirely controlled by the presence or absence of the extension-argocd.jar file in ./extensions/. Remove the JAR to disable it.

Output Format

ConfigMap (per configuration)

apiVersion: v1
kind: ConfigMap
metadata:
  name: universe-config-lobby
  namespace: universe
  labels:
    app.kubernetes.io/part-of: universe
    universe.scala.gg/configuration: "lobby"
data:
  configuration.json: |
    { ... full Configuration JSON ... }

Deployment (per instance)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: universe-instance-a1b2c3
  namespace: universe
  labels:
    universe.scala.gg/instance-id: "a1b2c3"
    universe.scala.gg/configuration: "lobby"
spec:
  replicas: 1
  selector:
    matchLabels:
      universe.scala.gg/instance-id: "a1b2c3"
  template:
    metadata:
      labels:
        universe.scala.gg/instance-id: "a1b2c3"
    spec:
      containers:
      - name: server
        image: universe-minecraft:latest
        env:
        - name: UNIVERSE_INSTANCE_ID
          value: "a1b2c3"
        ports:
        - containerPort: 25565

kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - config-lobby.yaml
  - instance-a1b2c3.yaml
commonLabels:
  app.kubernetes.io/managed-by: argocd

ArgoCD Application

Create an ArgoCD Application resource pointing at the Git repository where you commit ./argocd-manifests/:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: universe-state
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/your-org/universe-argocd.git
    targetRevision: main
    path: argocd-manifests
  destination:
    server: https://kubernetes.default.svc
    namespace: universe
  syncPolicy:
    automated:
      prune: true
      selfHeal: false  # Let Universe handle runtime changes

Important Notes

Set selfHeal: false in your ArgoCD sync policy. If selfHeal: true, ArgoCD will attempt to reconcile the desired number of Pod replicas in the generated Deployment manifests, conflicting with Universe’s own instance lifecycle management.
The Deployment manifests use a placeholder image (universe-minecraft:latest). ArgoCD will apply these manifests but the containers will only run correctly if you override the image via a Kustomize patch or via the K8s runtime extension’s image configuration.
The ArgoCD extension is entirely optional and has no dependencies on the K8s runtime extension or any other extension. If you do not use ArgoCD, simply do not install it — Universe continues to manage instances normally.

Separation of Concerns

ConcernManaged by
Starting and stopping instancesUniverse (REST API / console commands)
Tracking desired vs actual stateArgoCD (reading ./argocd-manifests/)
Persistent configuration historyGit (you commit the manifest directory)
Drift alertsArgoCD Application health/sync status

Build docs developers (and LLMs) love