Skip to main content

Declarative Capsule Spec

The foundation of Rig is our Capsule specification. The Capsule exists as a two-stage object consisting of

  • Platform Capsule
  • Kubernetes Capsule

You can see a full example of both here.

The Platform Capsule is the spec which the end-user of Rig will be working with. This spec (among other things) abstracts away cluster-level information in favor of Project and Environment terminology. The Rig Platform will translate a Platform Capsule into a Kubernetes Capsule, which is our CustomResourceDefinition (CRD) defining the Capsule functionality within a Kubernetes cluster. The Rig Operator will from a Kubernetes Capsule spawn derived Kubernetes resources which will be owned by the corresponding Kubernetes Capsule. It will also watch these derived resources and undo any changes applied to them which conflicts with their Capsule parent. Updating these resources can only be done by updating the corresponding Kubernetes Capsule. The resources we (can) spawn are

ConfigMaps and Secrets used by a capsule is not owned by the capsule though. These will be created by the Platform and can be updated independently of the capsules. The operator, however, will watch those config files and redeploy instances if configs or secrets they depend on have been changed.

Platform Capsule