This repository houses all of the Acorn library image definitions.
-
Use official images from the Docker library if available.
-
Use specific version tags of images, at least to the minor in semver.
-
Use automatically generated secrets, and allow the user to specify values if needed.
-
Prefer to handle the application in cuelang vs. string interpolations.
-
Do not use master - slave terminology. Use terms like leader / follower, worker / agents, replicas, etc.
-
When adding parameters:
- Use
scaleto represent number of containers running of the exact same config. - Use
replicasto represent multiple instances with the same role.
- Use
-
Create a secret
"user-secret-data": type: "opaque"to allow users to bind in secret data for use inside the acorn. -
For consistency and readability create Acorn cue with top level keys in the following order:
- args
- containers
- jobs
- volumes
- acorns
- secrets
- localData
-
If you are using if blocks to deploy an optional component, the if block should add/modify keys in the overall acorn key order.
-
When merging user provided structs with default structs, place the user provided struct variable first.
args.deploy.userData & {...acorn defined data}.
In this repo, images are built and published based on git tags. The tag contains information about the image to publish and the version to give it. Here are the guidelines for tagging to publish an image:
- The tag must be of the form:
<image name>/<version> - The
image nameportion must map to a directory name in the repo - The
versionportion will be used as the image version. As such, it must conform to image tag restrictions. For example, it cannot contain a+symbol - The
versionportion must start withvand be followed by a number