multiversectl GitHub

Manifest

Every field of a workspace manifest, with its default.

One multiverse.yaml lists the repositories and how a universe is addressed. It never describes containers; those stay in each repository's own compose files. The format is versioned, Kubernetes-style: apiVersion: multiverse/v1alpha1, kind: Workspace.

apiVersion: multiverse/v1alpha1
kind: Workspace
metadata:
  name: acme
spec:
  expose: lan
  domain: auto
  repos:
    - name: api
      url: git@github.com:acme/api.git
    - name: web
      url: git@github.com:acme/web.git

That is a complete workspace. A repository no apps entry names gets an app of its own name, so apps: is only for changing a default or splitting one repository into several apps.

Every field, with its meaning and default, is in schema/workspace.v1alpha1.yaml. That file is generated from the Go types by make schema; see also the commented examples/multiverse.yaml. The main keys:

KeyMeaning
metadata.nameNames the workspace; prefixes every runtime project (acme-u3-api).
spec.rootWhere clones and universes live. --root and $MULTIVERSECTL_ROOT override it.
spec.exposeWho can reach a universe: lan (default) or local. Decides both the interface the proxy publishes on and what auto derives — see Networking.
spec.domainWildcard domain for hostnames. Default auto, which follows expose.
spec.branchBranch template for a numbered universe; {{universe}} expands to the number. Default u{{universe}}. A named universe uses its own name.
spec.proxyProxy network and named entrypoints (web on 80 by default).
spec.repos[]name, url, dir, runtime (compose or none).
spec.apps[]name, repo, compose, profiles, services, optional, secrets, publish, overlay, hosts, build.
spec.env[]Variables exported into every runtime call; {{uid}}, {{gid}} and ${VAR} expand.

hosts: for repositories you cannot change

Labels are the better place to say how a service is reached. hosts: on an app wins over them and exists for repositories you cannot edit:

hosts:
  - name: api            # api-u3.<domain>
    service: web
    port: 8001
    entrypoint: devapi    # default: web
    alsoMatch: [app, adm]  # other host keys, same service