|
This is unreleased documentation for SUSE® Storage 1.11 (Dev). |
Create an HTTPRoute with Gateway API
If you install SUSE Storage on a Kubernetes cluster with kubectl or Helm, you can use Gateway API HTTPRoute as a modern alternative to Ingress for exposing the SUSE Storage UI to external traffic.
Gateway API is the successor to Ingress, offering more expressive routing capabilities and a standardized approach across different implementations.
Prerequisites
-
Gateway API CRDs installed in your cluster:
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml -
A Gateway controller running in your cluster (for example, Istio, Envoy Gateway, Cilium, NGINX Gateway Fabric, Traefik, and others).
-
At least one Gateway resource deployed and configured.
Helm values configuration
The following Helm values control HTTPRoute generation:
| Key | Type | Default | Description |
|---|---|---|---|
|
bool |
|
Enable HTTPRoute generation for the SUSE Storage UI |
|
list |
|
Gateway references specifying which Gateway or Gateways should handle this route |
|
list |
|
List of hostnames for the HTTPRoute |
|
string |
|
Path for accessing the SUSE Storage UI |
|
string |
|
Path match type: |
|
object |
|
Annotations for the HTTPRoute resource |
Basic installation
Install SUSE Storage with HTTPRoute enabled:
helm install longhorn longhorn/longhorn \
--namespace longhorn-system \
--create-namespace \
--set "httproute.enabled=true" \
--set "httproute.parentRefs[0].name=my-gateway" \
--set "httproute.parentRefs[0].namespace=default" \
--set "httproute.hostnames[0]=longhorn.example.com"
Advanced configuration
For more complex setups, create a values file:
httproute:
enabled: true
parentRefs:
- name: primary-gateway
namespace: gateway-system
- name: secondary-gateway
namespace: gateway-system
sectionName: https # Target specific listener
hostnames:
- longhorn.example.com
- longhorn.example.org
path: /longhorn
pathType: PathPrefix
annotations:
custom-annotation: "value"
Install with the values file:
helm install longhorn longhorn/longhorn \
--namespace longhorn-system \
--create-namespace \
--values values.yaml
Verification
-
Verify that the HTTPRoute was created:
kubectl get httproute -n longhorn-system -
Check HTTPRoute details:
kubectl describe httproute longhorn-httproute -n longhorn-system -
Verify that the route is accepted by the Gateway:
kubectl get httproute longhorn-httproute -n longhorn-system -o jsonpath='{.status.parents[*].conditions}'The output should show
Accepted: TrueandResolvedRefs: True. -
Access the SUSE Storage UI through your Gateway external IP address or hostname.