Skip to content

Commit

Permalink
feat(helm): backport HTTP 2 configuration from gravitee.yml to helm v…
Browse files Browse the repository at this point in the history
…alues

Previously the `http.alpn` option was hardcoded as `true` in `gravitee.yml`.
Now we add the option `gateway.http.alpn` to configure it in helm `values.yml`
which is set to `true` by default for backward compatibility.

DEVOPS-282
DEVOPS-268
  • Loading branch information
passionne committed Nov 3, 2023
1 parent 840863a commit f3f9ef0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
1 change: 1 addition & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ annotations:
- Allow wildcard in ingress host
- Add unknownExpireAfter in management-api configuration
- Allow users to define extra manifests
- Make optional HTTP2 request processing via `gateway.http.alpn` set at `true` by default.
3 changes: 1 addition & 2 deletions helm/templates/gateway/gateway-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data:
maxChunkSize: {{ .Values.gateway.http.maxChunkSize }}
maxInitialLineLength: {{ .Values.gateway.http.maxInitialLineLength }}
maxFormAttributeSize: {{ .Values.gateway.http.maxFormAttributeSize }}
alpn: true
alpn: {{ .Values.gateway.http.alpn | default "true" }}
{{- if .Values.gateway.ssl.enabled }}
secured: true
ssl:
Expand Down Expand Up @@ -352,7 +352,6 @@ data:
{{- end }}
{{- if .Values.gateway.services.bridge.ssl }}
secured: {{ .Values.gateway.services.bridge.ssl.enabled | default false }}
alpn: true
ssl:
{{- if .Values.gateway.services.bridge.ssl.keystore}}
keystore:
Expand Down
47 changes: 47 additions & 0 deletions helm/tests/gateway/configmap_http_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
suite: Test Gateway configmap section alpn
templates:
- "gateway/gateway-configmap.yaml"
tests:
- it: Default ALPN value (true)
template: gateway/gateway-configmap.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchRegex:
path: data.[gravitee.yml]
pattern: |
alpn: true
- it: Enable ALPN
template: gateway/gateway-configmap.yaml
set:
gateway:
http:
alpn: "true"
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchRegex:
path: data.[gravitee.yml]
pattern: |
alpn: true
- it: Disable ALPN
template: gateway/gateway-configmap.yaml
set:
gateway:
http:
alpn: "false"
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchRegex:
path: data.[gravitee.yml]
pattern: |
alpn: false
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ gateway:
maxChunkSize: 8192
maxInitialLineLength: 4096
maxFormAttributeSize: 2048
alpn: "true"
logging:
debug: false
stdout:
Expand Down

0 comments on commit f3f9ef0

Please sign in to comment.