Configuration

This page is generated from the sew.yaml JSON Schema. It documents every field you can use in your sew.yaml configuration file.

Overview#

A sew.yaml file is a YAML document with the following top-level fields:

FieldTypeDescription
abstractbooleanWhen true, marks this configuration as a shared base that cannot be deployed on its own. Abstract configs are meant to be referenced via ‘from’ by concrete contexts.
buildsobject[]Local Docker builds for the inner development loop. Each entry describes how to compile, build, and load a Docker image into the Kind cluster, then restart matching workloads. Use with ‘sew build’ to iterate quickly on application code.
componentsobject[]Ordered list of components to deploy. Components are applied sequentially; use ‘requires’ to express inter-component dependencies.
descriptionstringHuman-readable description of this configuration. Used by context flag files to document what the flag does; ignored during deployment.
featuresmapOptional networking features. Each sub-key uses pointer semantics: setting a feature explicitly overrides the inherited context default; omitting it preserves the parent value.
fromstring[]List of registry paths to compose from. Each referenced context is merged in order, allowing reuse of shared building blocks (databases, message brokers, etc.).
helmmapGlobal Helm configuration shared across all components.
imagesmapContainer image management: preloading images into Kind nodes and configuring registry mirrors.
kindmapConfiguration for the Kind (Kubernetes-in-Docker) cluster.
registrystringRegistry path that identifies this configuration context (org/edition/product/variant convention).

abstract#

When true, marks this configuration as a shared base that cannot be deployed on its own. Abstract configs are meant to be referenced via ‘from’ by concrete contexts.

Type: boolean | Default: false

builds#

Local Docker builds for the inner development loop. Each entry describes how to compile, build, and load a Docker image into the Kind cluster, then restart matching workloads. Use with ‘sew build’ to iterate quickly on application code.

Type: array

Each entry is an object with the following fields:

FieldTypeRequiredDescription
buildArgsmapNoDocker build arguments passed to ‘docker build –build-arg’. Keys are argument names, values are argument values. Supports environment variable expansion in values.
contextstringNoDocker build context directory, resolved relative to ‘dir’. Default: ..
dirstringNoWorking directory for pre-build commands and base for relative context/dockerfile paths. Supports environment variable expansion (e.g. “$HOME/src/project”). Default: ..
dockerfilestringNoPath to the Dockerfile, resolved relative to ‘dir’. When omitted, defaults to ‘Dockerfile’ in the build context.
imagestringYesTarget Docker image tag (e.g. “graviteeio/apim-gateway:latest-debian”). Images listed here are automatically excluded from preload.
namestringYesShort identifier for this build, used to select it in ‘sew build ’.
platformstringNoTarget platform for ‘docker build –platform’ (e.g. “linux/amd64”). Useful when the base image is only available for a specific architecture.
prestring[]NoShell commands executed sequentially before ‘docker build’ (e.g. compilation, packaging). Each command runs in ‘dir’ with output streamed to the terminal.

components#

Ordered list of components to deploy. Components are applied sequentially; use ‘requires’ to express inter-component dependencies.

Type: array

Each entry is an object with the following fields:

FieldTypeRequiredDescription
conditionsmapNoReadiness conditions for a component or dependency.
enabledbooleanNoWhen false, the component is excluded from deployment. Use in context flag files to disable components without removing them from the composition chain. Default: true.
helmmapNoHelm chart installation specification for a component of type “helm”. The chart field may be omitted when the component inherits it from a parent context via ‘from’ composition.
k8smapNoRaw Kubernetes resource specification for a component of type “k8s”.
namestringYesUnique name identifying this component within the configuration.
namespacestringNoKubernetes namespace to deploy into. When omitted, the component is deployed into the default namespace.
requiresobject[]NoDependencies on other components. Each requirement must be satisfied before this component is deployed.
selectormapNoLabel selector used to identify the pods to watch for readiness.
timeoutstringNoMaximum duration to wait for this component to become ready (e.g. “5m”, “120s”). Used when conditions.ready is true.
typestringNoDeployment type. “helm” installs a Helm chart; “k8s” applies raw Kubernetes manifests. Default: helm. Values: helm, k8s.

components[*].conditions#

Readiness conditions for a component or dependency.

Type: object

FieldTypeRequiredDescription
readybooleanNoWhen true, the system waits for the component’s pods (matched by selector) to be fully ready before proceeding.

components[*].helm#

Helm chart installation specification for a component of type “helm”. The chart field may be omitted when the component inherits it from a parent context via ‘from’ composition.

Type: object

FieldTypeRequiredDescription
chartstringNoChart reference in “repo/chart” format (e.g. “bitnami/postgresql”).
valueFilesstring[]NoPaths to YAML value files, resolved relative to the sew.yaml directory. Use for large overrides.
valuesobjectNoInline Helm values merged on top of valueFiles. Use for small tweaks; prefer valueFiles for large overrides.
versionstringNoExplicit chart version constraint. When omitted, the latest version is used.

components[*].k8s#

Raw Kubernetes resource specification for a component of type “k8s”.

Type: object

FieldTypeRequiredDescription
configMapsobject[]NoLocal config maps to create as Kubernetes ConfigMap resources before applying other manifests.
manifestFilesstring[]NoPaths to YAML manifest files, resolved relative to the sew.yaml directory.
manifestsobject[]NoInline Kubernetes resource manifests. Each entry is a complete resource object (apiVersion, kind, metadata, etc.).
secretsobject[]NoLocal secrets to create as Kubernetes Secret resources before applying other manifests.

components[*].k8s.configMaps[*]#

A Kubernetes Secret or ConfigMap created from local files or environment variables.

Type: object

FieldTypeRequiredDescription
entriesobject[]NoMultiple data entries for the resource, each sourced from a file or environment variable.
fromFilestringNoPath to a single file whose contents become the resource data. Supports environment variable expansion (e.g. “$HOME/opt/license.key”). Shorthand for a single-entry resource.
namestringYesName of the Kubernetes Secret or ConfigMap to create.
onMissingstringNoBehavior when a referenced file or env var is missing. “fail” aborts deployment; “ignore” skips the resource silently. Default: fail. Values: fail, ignore.

components[*].k8s.configMaps[*].entries[*]#

A single data entry in a LocalResource, sourced from a file or environment variable.

Type: object

FieldTypeRequiredDescription
fromEnvstringNoName of an environment variable whose value becomes this entry’s value.
fromFilestringNoPath to a file whose contents become this entry’s value. Supports environment variable expansion.
keystringNoKey name in the resulting Secret or ConfigMap data map.

components[*].k8s.secrets[*]#

A Kubernetes Secret or ConfigMap created from local files or environment variables.

Type: object

FieldTypeRequiredDescription
entriesobject[]NoMultiple data entries for the resource, each sourced from a file or environment variable.
fromFilestringNoPath to a single file whose contents become the resource data. Supports environment variable expansion (e.g. “$HOME/opt/license.key”). Shorthand for a single-entry resource.
namestringYesName of the Kubernetes Secret or ConfigMap to create.
onMissingstringNoBehavior when a referenced file or env var is missing. “fail” aborts deployment; “ignore” skips the resource silently. Default: fail. Values: fail, ignore.

components[*].k8s.secrets[*].entries[*]#

A single data entry in a LocalResource, sourced from a file or environment variable.

Type: object

FieldTypeRequiredDescription
fromEnvstringNoName of an environment variable whose value becomes this entry’s value.
fromFilestringNoPath to a file whose contents become this entry’s value. Supports environment variable expansion.
keystringNoKey name in the resulting Secret or ConfigMap data map.

components[*].requires[*]#

Declares a dependency on another component, optionally waiting for it to reach a ready state.

Type: object

FieldTypeRequiredDescription
componentstringYesName of the component this requirement depends on.
conditionsmapNoReadiness conditions for a component or dependency.
selectormapNoLabel selector used to identify the pods to watch for readiness.
timeoutstringNoMaximum duration to wait for the dependency to become ready (e.g. “5m”, “15m”).

components[*].requires[*].conditions#

Readiness conditions for a component or dependency.

Type: object

FieldTypeRequiredDescription
readybooleanNoWhen true, the system waits for the component’s pods (matched by selector) to be fully ready before proceeding.

components[*].requires[*].selector#

Label selector used to identify the pods to watch for readiness.

Type: object

FieldTypeRequiredDescription
matchLabelsmapNoMap of label key-value pairs that pods must match.

components[*].selector#

Label selector used to identify the pods to watch for readiness.

Type: object

FieldTypeRequiredDescription
matchLabelsmapNoMap of label key-value pairs that pods must match.

description#

Human-readable description of this configuration. Used by context flag files to document what the flag does; ignored during deployment.

Type: string

features#

Optional networking features. Each sub-key uses pointer semantics: setting a feature explicitly overrides the inherited context default; omitting it preserves the parent value.

Type: object

FieldTypeRequiredDescription
dnsmapNoLocal DNS server that resolves custom hostnames to in-cluster services, making them reachable from the host.
gatewaymapNoKubernetes Gateway API support. Enabling gateway implicitly enables lb (load-balancer) as a dependency.
lbmapNoCloud-provider load-balancer emulation for LoadBalancer-type services inside the Kind cluster.

features.dns#

Local DNS server that resolves custom hostnames to in-cluster services, making them reachable from the host.

Type: object

FieldTypeRequiredDescription
domainstringNoDNS domain served by the local resolver. Default: sew.local.
enabledbooleanNoEnable or disable the local DNS feature.
portintegerNoUDP port the local DNS server listens on. Default: 15353.
recordsobject[]NoStatic DNS records mapping hostnames to Kubernetes services.

features.dns.records[*]#

Maps a hostname (supports wildcards) to a Kubernetes service so the local DNS resolver can answer queries for it.

Type: object

FieldTypeRequiredDescription
hostnamestringYesHostname pattern to resolve (e.g. “*.kafka.sew.local”).
namespacestringYesNamespace of the target Kubernetes Service.
servicestringYesName of the Kubernetes Service to resolve the hostname to.

features.gateway#

Kubernetes Gateway API support. Enabling gateway implicitly enables lb (load-balancer) as a dependency.

Type: object

FieldTypeRequiredDescription
channelstringNoGateway API release channel to install. Values: standard, experimental.
enabledbooleanNoEnable or disable Gateway API support.

features.lb#

Cloud-provider load-balancer emulation for LoadBalancer-type services inside the Kind cluster.

Type: object

FieldTypeRequiredDescription
enabledbooleanNoEnable or disable the load-balancer feature.

from#

List of registry paths to compose from. Each referenced context is merged in order, allowing reuse of shared building blocks (databases, message brokers, etc.).

Type: array

helm#

Global Helm configuration shared across all components.

Type: object

FieldTypeRequiredDescription
reposobject[]NoHelm chart repositories to register before installing components.

helm.repos[*]#

A Helm chart repository.

Type: object

FieldTypeRequiredDescription
namestringYesLocal alias for the repository (used as prefix in chart references, e.g. “bitnami” in “bitnami/postgresql”).
urlstringYesURL of the Helm chart repository.

images#

Container image management: preloading images into Kind nodes and configuring registry mirrors.

Type: object

FieldTypeRequiredDescription
mirrorsmapNoRegistry mirror configuration. Mirrors are injected into the Kind nodes’ containerd config so pulls go through the mirror first.
preloadmapNoImages to pull and preload into Kind nodes before deploying components, avoiding in-cluster pulls and speeding up startup.

images.mirrors#

Registry mirror configuration. Mirrors are injected into the Kind nodes’ containerd config so pulls go through the mirror first.

Type: object

FieldTypeRequiredDescription
datastringNoRaw containerd mirror configuration data to inject.
upstreamsstring[]NoList of upstream registry mirror URLs.

images.preload#

Images to pull and preload into Kind nodes before deploying components, avoiding in-cluster pulls and speeding up startup.

Type: object

FieldTypeRequiredDescription
modestringNoHow this preload section combines with inherited preload. “merge” (default) unions refs and skip lists. “replace” discards inherited refs and uses only the listed refs. Default: merge. Values: merge, replace.
refsstring[]NoList of fully-qualified image references (e.g. “docker.io/library/nginx:1.27-alpine”) to preload.
skipstring[]NoImage references to exclude from inherited preload (merge mode only). Useful in context flags that disable components whose images would otherwise be preloaded.

kind#

Configuration for the Kind (Kubernetes-in-Docker) cluster.

Type: object

FieldTypeRequiredDescription
apiVersionstringNoKind API version for the cluster manifest. Default: kind.x-k8s.io/v1alpha4.
containerdConfigPatchesstring[]NoRaw containerd configuration patches applied to all nodes in the cluster.
kindstringNoKind resource type (always “Cluster”). Default: Cluster.
namestringNoName of the Kind cluster. Default: sew.
nodesobject[]NoList of cluster nodes. Defaults to a single control-plane node when omitted.

kind.nodes[*]#

Configuration for a single Kind cluster node.

Type: object

FieldTypeRequiredDescription
extraMountsobject[]NoAdditional bind-mounts from the host filesystem into the node container.
extraPortMappingsobject[]NoAdditional port mappings from the host to the node container, enabling access to NodePort services from the host machine.
kubeadmConfigPatchesstring[]NoRaw kubeadm configuration patches applied to this node during cluster creation.
labelsmapNoLabels to apply to the node.
rolestringNoNode role in the cluster (e.g. “control-plane” or “worker”).

kind.nodes[*].extraMounts[*]#

Bind-mount from the host into a Kind node container.

Type: object

FieldTypeRequiredDescription
containerPathstringYesPath inside the Kind node container.
hostPathstringYesAbsolute path on the host filesystem.

kind.nodes[*].extraPortMappings[*]#

Maps a port from the Kind node container to the host.

Type: object

FieldTypeRequiredDescription
containerPortintegerYesPort inside the Kind node container.
hostPortintegerYesPort on the host machine.
protocolstringNoTransport protocol (e.g. “TCP”, “UDP”). Defaults to TCP when omitted.

registry#

Registry path that identifies this configuration context (org/edition/product/variant convention).

Type: string