Skip to content
AggregaAggrega
Select language: English

Contour gateway — a Kubernetes-native ingress controller

This example compiles a small, real stack — a Contour ingress gateway — from one Developer-authored Aggregate to Kubernetes. The developer declares what the gateway is; a single Ops Recipe maps that intent to the official project-contour Helm chart (served from the project’s HTTPS chart repository) and renders the Kubernetes objects.

Contour is a Kubernetes-native ingress controller. Its control plane watches the cluster’s Ingress and HTTPProxy resources and programs an Envoy data plane, which terminates client HTTP and HTTPS traffic and load-balances it to the backing services those resources name. Its routing input is the cluster’s own Ingress objects — not a wired upstream — so the gateway takes no uses edge. Applications reach it by declaring Ingress resources against its ingress class. For the same reason it has no standalone local-container form, so this family ships a Helm Recipe only; there is no Compose target.

Files

FileRole
aggregate.yamlDeveloper intent: a single gateway component (core/gateway/contour) that names the ingress class it reconciles.
manifest.yamlMaps the gateway type to the project-contour Helm Recipe (contour).
release.yamlOperator record for the Kubernetes target: the Envoy service port and control-plane/data-plane sizing.

What it demonstrates

  • One authoring surface, realized by an Ops Recipe. The Aggregate is the source of truth for what the gateway is. The Manifest says how to realize it by mapping the gateway type to a Recipe by name; the Release supplies the operational sizing. Developer intent and Ops mapping stay separate.
  • Control plane and data plane from one component. The Recipe renders both halves of the ingress controller: a Deployment for the Contour control plane and a DaemonSet for the Envoy data plane, wired together by the chart.
  • Ingress-class ownership. The developer’s ingress_class_name value flows into the chart, which creates an IngressClass of that name. Applications route to the gateway by referencing that class in their Ingress resources.
  • CRD management. Contour installs and manages its own CustomResourceDefinitions (its HTTPProxy family). The Recipe leaves CRD management on by default; disable it through infra.overrides.manage_crds when the CRDs are pre-installed.
  • Data-plane entry point. The Envoy Service is exposed as a LoadBalancer by default; the operator sets the HTTP service port through infra.port and can change the service type through infra.overrides.service_type.
  • Reproducible images. The Recipe re-pins the Contour and Envoy images to explicit release tags so the rendered workloads reference pinned versions.

Scaffold the example

You can build this example with the commands below, or have your AI assistant build it for you.

Write the example into a new folder named after it:

Terminal window
aggrega scaffold --example contour-gateway

It then prints the commands to run next. The first changes into the new folder:

Terminal window
cd contour-gateway

Build

This workspace carries no .aggrega-config.yaml, so the standard-library entities resolve from the hub registry, hub.aggrega.ai, and no catalog flag is needed:

Terminal window
aggrega pull --release release.yaml
aggrega build --release release.yaml

Rendered artifacts land under dist/. The build resolves the upstream chart on aggrega pull and pins it in a lockfile.

With an AI assistant

An AI assistant set up with Aggrega’s tools can do the same: paste this prompt into it.

Use the Aggrega tools only, and create no folder yourself. If the Workspace folder holds no `contour-gateway` folder yet, call the `scaffold` tool once with `example` set to `contour-gateway` and no `dir`: it writes the example into a new `contour-gateway` folder. Then call the `build` tool with `workspace_root` set to `contour-gateway`, `release` set to `release.yaml`, `auto_pull` set to true and `write` set to true. Tell me which files the build wrote; they are under `contour-gateway/dist/`.

What renders

The build emits the full ingress-controller stack:

  • a Deployment running the Contour control plane,
  • a DaemonSet running the Envoy data plane,
  • the Contour CustomResourceDefinitions,
  • an IngressClass named contour,
  • a LoadBalancer Service fronting Envoy on HTTP port 80 and HTTPS port 443,

alongside the supporting ConfigMap, certificate-generation Job, the control plane’s Service, NetworkPolicy, RBAC, and ServiceAccount. The Contour and Envoy images are pinned to their release tags, so every workload references a pinned image tag.