Sources and apps

Where Wardn reads manifests from, how an app turns them into Kubernetes objects, and how values combine.

Three ideas describe what runs where. A source says where the manifests are. An app says how to turn them into Kubernetes objects. A deployment says where those objects run. This page covers the first two; Deployments covers the third.

The mental model

  Source                     App                          Deployment
  where the files are        how to render them           where they run
  ─────────────────────      ─────────────────────        ─────────────────────
  git repo + directory  ──▶  render type (plain,     ──▶  cluster or environment
  or an OCI Helm chart       Kustomize, Helm)             + namespace
                             + default values             + branch to track
                                                          + this deployment's values

One source can feed several apps, and one app can run in many deployments: the same checkout app in checkout-staging and checkout-prod, each with its own values. Rendering always happens in the control plane, and the cluster only ever receives the finished objects. See How it works.

Sources

A source is a location, not a version. Which commit is used is decided later, by the deployment's branch or by a promotion.

FieldMeaning
Kindgit for a repository, or oci for a Helm chart in an OCI registry.
URLhttps://host/repo, ssh://host/repo, git://host/repo or user@host:repo for git, and oci://host/path for OCI. A URL never holds a password. Plain http:// is refused unless the server allows it for development (WARDN_GIT_ALLOW_INSECURE_HTTP), since the repository and any token would travel unencrypted.
PathThe directory inside the repository that holds the manifests. Empty for the repository's root.
CredentialsHow Wardn authenticates: through the GitHub App, or a secret in the server's secret store. Empty for a public repository.

How Wardn learns about a push

  • With the GitHub App, a push reaches Wardn as a webhook and a render starts at once. The App also lets Wardn read private repositories, see whether a branch is protected, and post commit statuses and preview links to pull requests.
  • Every tracked branch is also checked once a minute. A missed webhook only delays a deploy. A repository connected without the App, on any git host, relies on this check alone.

Wardn reads the head of the branch itself rather than trusting the webhook's payload, and skips a commit it has already rendered. See Connect a source and GitHub.

Apps

An app is a source plus everything needed to render it:

FieldMeaning
NameUp to 63 characters, such as payments-api.
SourceThe source it renders.
Render typeplain, kustomize or helm.
Default valuesSettings for a Helm render that every deployment starts from.
ServicesThe ports the app serves, with a protocol (http, https, grpc, tcp or udp).
TeamThe team that owns the app. Its members see the app and its deployments.

Whoever creates an app becomes one of its owners. See Access model.

Render types

Render typeWhat it readsNotes
plainEvery .yaml, .yml and .json file directly in the source's directory, in name orderSubdirectories are not read, so other files in the repository do not become objects. A directory with no manifests renders nothing, and the render guard holds that.
kustomizeThe kustomization at the source's path, with the rest of the repository available to itBases must be in the repository. Remote bases, plugins, generator programs and Helm inflation are refused.
helmThe chart at the source's path, or the OCI chartRendered as helm template --include-crds would, with Helm's default capabilities. Dependencies must be in the chart's charts/ directory. A chart that renders differently each time is refused. helm test hooks are left out; other hooks become ordinary objects.

An OCI source always holds a Helm chart, so its app must use the helm render type.

Rendering runs with no network. Anything a render would fetch, such as a remote Kustomize base or a chart dependency, has to be in the source already. This is what makes the same commit always give the same snapshot.

Values

For a Helm app, the values a render uses are the app's default values with the deployment's values for that app laid on top:

app default values           deployment's values          used for the render
replicas: 2                  replicas: 6                  replicas: 6
image:                       image:                       image:
  repository: shop             tag: 1.4.2                   repository: shop
  tag: latest                                               tag: 1.4.2
resources: {...}                                          resources: {...}

Maps merge key by key, at every depth. Any other value, a list included, replaces the default as a whole. This is how one chart serves every environment: the app holds what is common, each deployment holds what differs. See Helm with values per environment.

What a render produces

Every render produces a snapshot of the whole deployment: the objects of every app it holds, with image tags resolved to digests and a record of the commit each app came from. Two renders of the same commits and values produce the same snapshot, which is what lets a snapshot be promoted without rendering it again.

Guides that use this

Next

On this page