SEAGIT DOCS
Build a Stack Template

Build Your Own Kubernetes Stack Template

A stack template packs the stack your team keeps rebuilding into one private, reusable recipe: Helm charts and Docker images, the form someone fills in to deploy it, generated secrets, an install order and the connection details to show afterwards. This guide builds the builder’s own example, a cache with an API, a worker and a dashboard that use it. For what the feature does overall, see stack templates.

Before you start

  • A paid plan (Pro, Startup or Enterprise). Building and editing templates is refused on Free and expired plans; see plans.
  • Permission to create applications in the account. Anyone with that permission can deploy the template once it is saved.
  • The Helm charts and images you want to use. Images can come from Docker Hub, Amazon ECR Public, GitHub (ghcr.io) or Quay.

Open Applications → Templates and click Publish a template. The builder has six sections and a Check panel that lists every problem before you save. To follow along, click Load an example under the Check panel.

1. Details

Give the template a name, a category and a description. These are what your team sees on the template card in the catalog. The example is called Orders service in the category My templates.

2. Inputs: the form people fill in to deploy

Each input becomes a field on the deploy form. Types are text, number, dropdown, radio buttons, yes/no and secret. A dropdown or radio input takes one option per line, written as value or value | Label. Use an answer anywhere in the template as ${form.<key>}.

size       radio     small | Small
                     medium | Medium
                     large | Large        default: small
log_level  dropdown  debug, info, warn, error  default: info
bucket     text      An S3 bucket of yours    required

Keys are lower-case letters, digits and underscores. A value that uses ${form.nope} without an input called nope shows up in the Check panel.

3. Applications: Helm charts and Docker images

Add up to 12 applications. Names are lower-case letters, digits and hyphens, and they are how other applications refer to this one.

A Helm chart

Set the chart repository, chart name and version, then the chart values as YAML. The example’s cache application is Valkey from the sg-redis chart:

engine: valkey
size: ${form.size}
auth:
  password: ${seagit.secrets.REDIS_PASSWORD}
reach: cluster
serviceAccount:
  name: ${seagit.app.sa_name}
  roleArn: ${seagit.app.role_arn}
backup:
  bucket: ${form.bucket}
  region: ${ctx.region}
  prefix: cache-backups/

The password is one of the application’s secrets: REDIS_PASSWORD = ${secret.redis_password}. The platform generates that value once per stack, so nobody types or sees it during deploy.

A Docker image

Set the registry, image, tag and port, and optionally CPU, memory, copies, a health check path and container arguments. Choose whether it is reachable inside the cluster only or from the internet. The example’s api reads the cache through a variable:

CACHE_HOST    = ${stack.cache.svc}
LOG_LEVEL     = ${form.log_level}
ORDERS_BUCKET = ${form.bucket}

Cloud access

Each application can have no AWS access, a new IAM role with access rules you write (effect, actions such as s3:GetObject, and resources), or an existing IAM role by its ARN. The example’s cache gets a new role that can list the bucket and read and write under cache-backups/; the worker uses an existing role.

Values you can use

Click a value in the builder to copy it. The platform fills them in at deploy time.

ValueWhat it becomesWhere
${form.<key>}An answer from the deploy formEverywhere
${secret.<name>}A generated 43-character secret; the same name is the same value across applicationsSecrets lists and outputs
${stack.<app>.svc}Another application’s in-cluster service addressValues, variables and outputs
${stack.<app>.url}An exposed application’s public addressValues, variables and outputs
${seagit.secrets.<NAME>}One of this application’s own secrets, inside Helm chart valuesHelm chart values
${seagit.variables.<NAME>}One of this application’s own variables, inside Helm chart valuesHelm chart values
${seagit.app.sa_name} / ${seagit.app.role_arn}The service account and IAM role the platform made for this applicationHelm chart values
${ctx.region} / ${ctx.cluster_code} / ${ctx.domain_name}Where the stack is being deployedEverywhere

4. Install order

Put applications into stages. For each stage, choose how the next one starts: when these are healthy or right away. An application can only use ${stack.<app>...} of an application in an earlier stage, and the Check panel says so if it does not. In the example the cache is stage 1 and waits until healthy; the API and worker follow, then the dashboard, which reads the API’s address.

5. Environments

Allow any environment in the account, or pick the ones the template may be deployed to. A team that keeps production in its own environment can keep experimental templates out of it.

6. Output: what people see after deploying

List up to 20 connection details, each a label and a value, and set the heading of the panel on the Stack tab. Values use the same names as above. Mark a value as secret to hide it until someone clicks Reveal; every reveal is recorded.

Cache address   ${stack.cache.svc}:6379
Cache password  ${secret.redis_password}      (secret)
Dashboard       ${stack.dashboard.url}

Check, save and deploy

Fix what the Check panel lists (the save bar counts the problems and jumps to them), then save. The template appears in your Templates catalog, visible only to your account. To deploy it, open the card, click Deploy, choose an environment and fill in the form you designed. The Code tab shows the whole template as JSON for review or for copying into another account.

To change a template later, open its card and choose Edit. Stacks already deployed keep running. Deleting a template retires it from the catalog; stacks deployed from it are not removed.

Limits

Applications per template12
Form inputs per template40
Outputs (connection details) per template20
Templates per account50
Plans that can build and edit templatesPro, Startup, Enterprise

Next steps