Konfidence is pre-release software. Concepts and APIs are unstable and subject to change.
Skip to content

ADR-0043: Provision a cluster-internal konfidence-router through GEP-5093 ​

Status
proposed
Proposed
2026-10-21T00:00:00.000Z
Category
Architecture Pattern
Impact
Medium

This decision is still under discussion and may change before it is accepted.

Context ​

ADR-0037 chose Option 2: the cluster admin owns every Gateway, and Konfidence owns only the per-stage HTTPRoutes. The reason was portability. Making a Gateway cluster-internal needed implementation-specific configuration, so Konfidence could not create the inner Gateway without knowing each implementation. ADR-0037 expected GEP-5093 (Gateway Address Routability) to lift this restriction.

GEP-5093 is now part of the Gateway API:

  • Gateway API v1.7.0-rc.1 adds routability to spec.addresses[] and status.addresses[] of a Gateway.
  • The value Cluster requests a ClusterIP address that is reachable only from inside the cluster.
  • The field belongs to the experimental channel. On a cluster with the standard-channel CRDs, the API server prunes it without an error.
  • The feature has Extended support. An implementation may ignore the request and assign its default address.

The inner Gateway is security-relevant. Konfidence routes by the x-konfidence-stage and x-konfidence-service headers. A client that reaches konfidence-router directly can set both headers itself and select any stage.

Setting up konfidence-router per landscape is the step admins get wrong most often in the current setup. Each implementation needs its own way to pin the Service to ClusterIP.

Considered options ​

Option A: keep ADR-0037 unchanged ​

The admin keeps creating konfidence-router in every landscape namespace.

  • Konfidence never creates a Gateway and cannot expose one by accident.
  • Every admin still learns the implementation-specific way to make the Gateway internal.

Option B: Konfidence always provisions konfidence-router ​

Konfidence creates konfidence-router with routability: Cluster in every landscape namespace.

  • Admins need no per-landscape Gateway setup.
  • Clusters without experimental-channel CRDs, or with an implementation that ignores routability, cannot run stage routing.
  • Admins who already run their own konfidence-router lose control over it.

Option C: Konfidence provisions konfidence-router on request and fails closed ​

Konfidence provisions konfidence-router only when the landscape's activation task registration sets a gatewayClassName and no admin Gateway exists. It attaches routes only after it has verified that the Gateway is cluster-internal.

  • Option 2 stays the default. Existing setups keep working without changes.
  • Admins on an implementation with GEP-5093 support skip the per-landscape Gateway setup.
  • Konfidence must verify the address itself, because the implementation may ignore the request.

Decision ​

Adopt Option C.

Design decisions ​

  1. Opt-in per landscape. The gateway-route.konfidence.cloud registration takes gatewayClassName. Without it, Konfidence behaves as ADR-0037 describes.
  2. The admin's Gateway wins. Konfidence never provisions a Gateway in these cases:
    • The registration sets gatewayName or gatewayNamespace.
    • A konfidence-router without the label konfidence.cloud/provisioned-by exists. Konfidence uses that Gateway and never modifies it. The label is Konfidence-specific, because GitOps tooling often sets app.kubernetes.io/managed-by on every resource.
  3. Provisioned shape. The provisioned Gateway has these properties:
    • Its name is konfidence-router, and it lives in the landscape namespace.
    • It carries the label konfidence.cloud/provisioned-by: kubernetes-landscape-orchestrator.
    • It has one HTTP listener on port 80.
    • It has one address with routability: Cluster.
  4. Fail closed on pruning. Konfidence reads the Gateway back after it creates it. If routability is missing, the cluster runs the standard-channel CRDs, and Konfidence deletes the Gateway at once. The activation fails with a message that names the missing CRDs.
  5. Fail closed on unsupported implementations. Konfidence attaches routes only when status.addresses[] is not empty and every entry reports routability: Cluster. If the Gateway is programmed with any other address, Konfidence deletes it and fails the activation.
  6. Bounded, visible waiting. While Konfidence waits, the activation task execution reports InProgress with the reason. The activation fails after 5 minutes without a cluster-routable address. It also fails when the implementation rejects the Gateway. A missing GatewayClass reports InProgress first and fails after the same 5 minutes.
  7. Gateway lifecycle. The provisioned Gateway belongs to the landscape, not to a stage. Deleting a stage does not delete it.

ADR-0037 stays accepted. This record extends it with a second way to provide the inner Gateway.

Consequences ​

  • Prerequisites for provisioning: The cluster runs the Gateway API experimental-channel CRDs of v1.7.0 or later. The implementation supports the GatewayAddressRoutabilityCluster feature.
  • Pre-release dependency: The kubernetes-landscape-orchestrator depends on Gateway API v1.7.0-rc.1, which requires Go 1.27.1. It moves to v1.7.0 once the Gateway API project releases it.
  • Open: implementation support. TODO(maintainers): verify which Gateway API implementations honour routability: Cluster. On an implementation that ignores it, routes never attach to a provisioned Gateway.
  • No automatic cleanup. Nothing deletes a provisioned Gateway when its landscape goes away. The admin deletes it.
  • Admin RBAC change: The kubernetes-landscape-orchestrator needs permission to create and delete Gateways.
  • Extends: ADR-0037: adds Konfidence-provisioned inner Gateways next to admin-owned ones.
  • Depends on: ADR-0027: the landscape namespace and DeploymentTarget that the provisioned Gateway belongs to.
EU and German government funding logos

Funded by the European Union – NextGenerationEU.

The views and opinions expressed are solely those of the author(s) and do not necessarily reflect the views of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.