Unreleased documentation. Choose your installed release in the version menu. Features described here may be absent from that release.
GatewayClass¶
A GatewayClass selects the controller that manages a Gateway. The default
HAPTIC installation creates a class named haptic; set
spec.gatewayClassName: haptic on Gateways you want it to serve.
To install the Gateway API CRDs and create your first route, follow the Gateway API walkthrough.
Configuration¶
Add these settings to your Helm values file and apply the complete file when you upgrade. The example shows the defaults:
controller:
templateLibraries:
gateway:
enabled: true
gatewayClass:
enabled: true
name: haptic
default: false
controllerName: haproxy-haptic.org/controller
parametersRef:
group: haproxy-haptic.org
kind: HAProxyTemplateConfig
name: "" # Defaults to controller.configName
namespace: "" # Defaults to Release.Namespace
Creation conditions¶
HAPTIC creates the GatewayClass when all three conditions are met:
gatewayClass.enabled: true(default)controller.templateLibraries.gateway.enabled: true(default)- The cluster serves the
gateway.networking.k8s.iogatewayclassesCRD
The controller manages the class at runtime. If the CRDs are absent, HAPTIC still handles Ingresses; installing the CRDs later creates the class without a Helm upgrade.
parametersRef - controller configuration link¶
The generated GatewayClass uses spec.parametersRef to identify the release's
HAProxyTemplateConfig. This reference documents the association; changing it
doesn't make a running controller load a different configuration. Each controller
loads the configuration selected at startup.
Defaults:
parametersRef.namedefaults tocontroller.configName(typicallyhaptic-config)parametersRef.namespacedefaults to chart's release namespace
Inspect the reference:
Multi-controller environments¶
Give each controller a distinct GatewayClass name and controller identifier.
For multiple HAPTIC installations, follow Running multiple HAPTIC instances.
Gateways must set spec.gatewayClassName. The gatewayClass.default value only
emits the gateway.networking.k8s.io/is-default-class annotation; HAPTIC
doesn't use it to choose a class.
Advanced: Multiple GatewayClasses¶
To separate internal and internet-facing traffic, install a HAPTIC release for each fleet, with its own classes, configuration, and HAProxy Service. Use the separate-release example and configure each release's HAProxy Service through its Helm values.
Creating another GatewayClass and setting parametersRef alone doesn't create
another controller or HAProxy fleet.
Disabling GatewayClass creation¶
If you manage GatewayClass resources separately:
See also¶
- Gateway API library — route types, listeners, and annotation support
- Migrating to HAPTIC — running HAPTIC alongside another controller