Skip to content

Commit 36afc57

Browse files
committed
fix: Fixing various issues on gatewayAPI and reverted wrong state of values.yaml
1 parent 1965c9d commit 36afc57

File tree

6 files changed

+88
-51
lines changed

6 files changed

+88
-51
lines changed

helm/nessie/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ gatewayApi:
134134
backendRefs:
135135
- service:
136136
port: 19120
137-
port: 19120
138137
```
139138
140-
If `gatewayApi.enabled` remains `false`, no Gateway API objects are rendered and the existing
141-
Make sure the Gateway API CRDs (and a compatible controller such as Envoy Gateway or Istio) are
139+
If `gatewayApi.enabled` remains `false`, no Gateway API objects are rendered. Make sure the Gateway API CRDs (and a compatible controller such as Envoy Gateway or Istio) are
142140
installed in the cluster before enabling this feature; the chart will fail fast if the resources
143141
are unavailable. A more advanced sample configuration can be found in
144142
`helm/nessie/ci/gateway-api-values.yaml`, which is also used by the chart unit tests.

helm/nessie/README.md.gotmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ gatewayApi:
138138
port: 19120
139139
```
140140

141-
If `gatewayApi.enabled` remains `false`, no Gateway API objects are rendered and the existing
142-
Make sure the Gateway API CRDs (and a compatible controller such as Envoy Gateway or Istio) are
141+
If `gatewayApi.enabled` remains `false`, no Gateway API objects are rendered. Make sure the Gateway API CRDs (and a compatible controller such as Envoy Gateway or Istio) are
143142
installed in the cluster before enabling this feature; the chart will fail fast if the resources
144143
are unavailable. A more advanced sample configuration can be found in
145144
`helm/nessie/ci/gateway-api-values.yaml`, which is also used by the chart unit tests.

helm/nessie/ci/gateway-api-values.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
gatewayApi:
22
enabled: true
33
gateway:
4-
name: public-gateway
5-
namespace: default
64
gatewayClassName: traefik # we just choose a common gatewayClass here
75
listeners:
86
- name: https
@@ -11,16 +9,15 @@ gatewayApi:
119
protocol: HTTPS
1210
allowedRoutes:
1311
namespaces:
14-
from: All
12+
from: Same
1513
tls:
1614
enabled: true
1715
mode: Terminate
1816
certificateRefs:
1917
- name: nessie-cert
2018
kind: Secret
2119
httpRoutes:
22-
- name: public-route
23-
namespace: edge
20+
- name: nessie-httproute
2421
hostnames:
2522
- chart-example.local
2623
parentRefs:
@@ -31,7 +28,7 @@ gatewayApi:
3128
- matches:
3229
- path:
3330
type: PathPrefix
34-
value: /api
31+
value: /
3532
backendRefs:
3633
- name: release-name-nessie
3734
namespace: default

helm/nessie/templates/httproute.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ spec:
8282
{{- range $backend := $backends }}
8383
{{- $service := $backend.service | default (dict) -}}
8484
{{- $computedServiceName := default (printf "%s%s" (include "nessie.fullname" $) (default "" $service.nameSuffix)) $service.name -}}
85-
{{- $name := default $computedServiceName $backend.name -}}
86-
{{- $name = required "gatewayApi.httpRoutes[].rules[].backendRefs[] requires a backend name" $name -}}
85+
{{- $explicitName := default "" $backend.name -}}
86+
{{- $name := default $computedServiceName $explicitName -}}
8787
{{- $serviceNamespace := default $routeNamespace $service.namespace -}}
8888
{{- $backendNamespace := default $serviceNamespace $backend.namespace -}}
8989
{{- $port := default (default $service.port $defaultBackendPort) $backend.port -}}
@@ -95,9 +95,7 @@ spec:
9595
{{- with $backend.group }}
9696
group: {{ . }}
9797
{{- end }}
98-
{{- if $kind }}
9998
kind: {{ $kind }}
100-
{{- end }}
10199
port: {{ required "gatewayApi.httpRoutes[].rules[].backendRefs[] requires a port" $port }}
102100
{{- with $backend.weight }}
103101
weight: {{ . }}

helm/nessie/tests/gateway_api_test.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ tests:
8080
path: spec.rules[0].backendRefs[0].port
8181
value: 19120
8282
template: httproute.yaml
83-
- equal:
84-
documentIndex: 0
85-
path: spec.rules[0].backendRefs[0].kind
86-
value: Service
87-
template: httproute.yaml
8883

8984
- it: should allow custom TLS listener and explicit parentRefs/backends
9085
values:

helm/nessie/values.yaml

Lines changed: 81 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -880,51 +880,101 @@ ingress:
880880
# secretName: secret1
881881

882882
# Nessie Gateway API Settings ###
883-
# The chart will render a `Gateway` and one or more
884-
# `HTTPRoute` objects that target the main Nessie Service by default. Only the GA
885-
# `gateway.networking.k8s.io/v1` resources are rendered; make sure the v1 CRDs are installed in the
886-
# cluster.
887-
883+
# -- Gateway API support (Gateway + HTTPRoute resources)
884+
# Use this section to expose Nessie through the Kubernetes Gateway API instead of the traditional Ingress resource.
888885
gatewayApi:
886+
# -- Specifies whether Gateway/HTTPRoute resources should be created.
889887
enabled: false
890888
gateway:
891-
name: public-gateway
892-
namespace: default
893-
gatewayClassName: traefik # we just choose a common gatewayClass here
889+
# -- Optional explicit name for the Gateway. If empty, the chart fullname plus nameSuffix is used.
890+
name: ""
891+
# -- Optional suffix appended to the autogenerated name when `name` is not set.
892+
nameSuffix: ""
893+
# -- Optional namespace override for the Gateway resource (defaults to the release namespace).
894+
namespace: ""
895+
# -- The GatewayClass to target. Required when gatewayApi is enabled.
896+
gatewayClassName: ""
897+
# -- Labels to add to the Gateway metadata.
898+
labels: {}
899+
# -- Annotations to add to the Gateway metadata.
900+
annotations: {}
901+
# -- Optional addresses block passed directly to the Gateway spec.
902+
addresses: []
903+
# - type: NamedAddress
904+
# value: shared-gateway
905+
# -- Listeners describe how traffic enters the Gateway.
894906
listeners:
895-
- name: https
896-
hostname: chart-example.local
897-
port: 443
898-
protocol: HTTPS
907+
- # -- Listener name. Must be unique per Gateway.
908+
name: nessie-http
909+
# -- Optional hostname (wildcard supported, e.g. "nessie.example.com"). Leave empty to accept all hostnames.
910+
hostname: ""
911+
# -- Listener port.
912+
port: 80
913+
# -- Protocol handled by the listener. Typically HTTP or HTTPS.
914+
protocol: HTTP
915+
# -- Allowed routes constraints for this listener. Defaults to namespaces.from=Same when omitted.
899916
allowedRoutes:
900917
namespaces:
901-
from: All
918+
from: Same
902919
tls:
903-
enabled: true
920+
# -- Whether TLS should be configured for this listener.
921+
enabled: false
922+
# -- TLS mode (Terminate, Passthrough, etc.).
904923
mode: Terminate
905-
certificateRefs:
906-
- name: nessie-cert
907-
kind: Secret
924+
# -- List of certificate references for this listener.
925+
certificateRefs: []
926+
# - name: nessie-cert
927+
# kind: Secret
928+
# group: ""
929+
# namespace: ""
930+
# -- Optional TLS options map.
931+
options: {}
908932
httpRoutes:
909-
- name: public-route
910-
namespace: edge
911-
hostnames:
912-
- chart-example.local
913-
parentRefs:
914-
- name: infra-gateway
915-
namespace: default
916-
sectionName: https
933+
- # -- Optional explicit name for the HTTPRoute.
934+
name: ""
935+
# -- Optional suffix appended to the autogenerated name when `name` is not set.
936+
nameSuffix: "-httproute"
937+
# -- Optional namespace override for the HTTPRoute (defaults to the release namespace).
938+
namespace: ""
939+
# -- Labels to add to the HTTPRoute metadata.
940+
labels: {}
941+
# -- Annotations to add to the HTTPRoute metadata.
942+
annotations: {}
943+
# -- Hostnames handled by this route. Leave empty to match all hostnames.
944+
hostnames: []
945+
# -- Parent references attached to the route. When empty, the chart-generated Gateway is referenced automatically.
946+
parentRefs: []
947+
# -- Rules evaluated by the HTTPRoute.
917948
rules:
918949
- matches:
919950
- path:
920951
type: PathPrefix
921-
value: /api
952+
value: /
953+
headers: []
954+
filters: []
922955
backendRefs:
923-
- name: release-name-nessie
924-
namespace: default
925-
port: 8080
926-
weight: 2
927-
956+
- # -- Optionally reference a Service managed by this chart.
957+
service:
958+
# -- Optional explicit service name. If empty, fullname plus nameSuffix is used.
959+
name: ""
960+
# -- Optional suffix appended to the release fullname when service.name is empty.
961+
nameSuffix: ""
962+
# -- Optional namespace override for the backend Service.
963+
namespace: ""
964+
# -- Optional port override for the backend Service. When empty, the first service port is used.
965+
port: ~
966+
# -- Explicit backend name. Takes precedence over service.* if set.
967+
name: ""
968+
# -- Optional backend namespace. Defaults to the HTTPRoute namespace when unset.
969+
namespace: ""
970+
# -- Optional backend group override.
971+
group: ""
972+
# -- Optional backend kind override (defaults to Service when using service.* helper).
973+
kind: ""
974+
# -- Optional backend port. When unset, the service port or chart default is used.
975+
port: ~
976+
# -- Optional backend weight.
977+
weight: 1
928978

929979
# -- Override the strategy for nessie deployment.
930980
# Valid values for type are: RollingUpdate and Recreate.

0 commit comments

Comments
 (0)