Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/helm-template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ jobs:
> /tmp/listenerset.yaml
grep -q '^kind: ListenerSet$' /tmp/listenerset.yaml
grep -q 'kind: ListenerSet$' <(sed -n '/^kind: HTTPRoute$/,/^---/p' /tmp/listenerset.yaml)
# listenerSet without gateway.enabled must fail instead of rendering nothing
if helm template test ./charts/ai \
--set-file ctaiPropertiesFile=./charts/ai/ctai-configuration.properties.template \
--set service.fqdn=https://example.codetogether.io \
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--set gateway.listenerSet.enabled=true \
--set gateway.listenerSet.parentRef.name=shared-gateway > /tmp/ls-no-gw.out 2>&1; then
echo "listenerSet without gateway.enabled rendered" >&2; exit 1
fi
grep -q 'requires gateway.enabled=true' /tmp/ls-no-gw.out
# helm upgrade --reuse-values from a chart without `gateway` drops the key
helm template test ./charts/ai \
--set-file ctaiPropertiesFile=./charts/ai/ctai-configuration.properties.template \
Expand Down
2 changes: 1 addition & 1 deletion charts/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ The following table lists the primary configurable parameters and defaults.
| `gateway.annotations` / `gateway.labels` | Extra `HTTPRoute` metadata (`labels` also go on the `ListenerSet`) | `{}` |
| `gateway.nginxGatewayFabric.clientSettingsPolicy.enabled` | NGINX Gateway Fabric body-size policy: `auto`, `true` or `false` | `auto` |
| `gateway.nginxGatewayFabric.clientSettingsPolicy.bodyMaxSize` | Request body limit on the Gateway | `16m` |
| `gateway.listenerSet.enabled` | Create a `ListenerSet` with this release's HTTPS listener; the `HTTPRoute` attaches to it when `gateway.parentRefs` is empty | `false` |
| `gateway.listenerSet.enabled` | Create a `ListenerSet` with this release's HTTPS listener; the `HTTPRoute` attaches to it when `gateway.parentRefs` is empty. Requires `gateway.enabled=true` | `false` |
| `gateway.listenerSet.parentRef` | The shared Gateway (`name`, `namespace`); required when enabled | `{}` |
| `gateway.listenerSet.listenerName` / `port` | Listener name (the route's `sectionName`) and port | `https` / `443` |
| `gateway.listenerSet.tlsSecretName` | TLS Secret for the listener | `<release fullname>-tls` |
Expand Down
4 changes: 4 additions & 0 deletions charts/ai/templates/listenerset.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- $gwValues := .Values.gateway | default dict }}
{{- if and ($gwValues.listenerSet | default dict).enabled (not $gwValues.enabled) }}
{{- fail "gateway.listenerSet.enabled=true requires gateway.enabled=true: the ListenerSet carries the HTTPRoute's listener, and without the HTTPRoute nothing is rendered." }}
{{- end }}
{{- if eq (include "ctai.listenerSetEnabled" .) "true" }}
{{- $ls := .Values.gateway.listenerSet }}
{{- $parent := $ls.parentRef | default dict }}
Expand Down
Loading