feature: add optional grpcweb filter to ingress
This commit is contained in:
parent
b05a4937bd
commit
17e9720c42
@ -0,0 +1,30 @@
|
|||||||
|
{{- if .Values.httpFilter.grpcWeb }}
|
||||||
|
# Inserts the grpcWeb filter into the http_connection mangager chain before the CORS filter
|
||||||
|
apiVersion: networking.istio.io/v1alpha3
|
||||||
|
kind: EnvoyFilter
|
||||||
|
metadata:
|
||||||
|
name: {{ include "gatewayName" . | trimPrefix "istio-" }}-grpcweb
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{ include "kubezero-lib.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
workloadSelector:
|
||||||
|
labels:
|
||||||
|
{{- include "gatewaySelectorLabels" . | nindent 6 }}
|
||||||
|
configPatches:
|
||||||
|
- applyTo: HTTP_FILTER
|
||||||
|
match:
|
||||||
|
context: GATEWAY
|
||||||
|
listener:
|
||||||
|
filterChain:
|
||||||
|
filter:
|
||||||
|
name: envoy.filters.network.http_connection_manager
|
||||||
|
subFilter:
|
||||||
|
name: envoy.filters.http.cors
|
||||||
|
patch:
|
||||||
|
operation: INSERT_BEFORE
|
||||||
|
value:
|
||||||
|
name: envoy.filters.http.grpc_web
|
||||||
|
typed_config:
|
||||||
|
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
|
||||||
|
{{- end }}
|
@ -44,3 +44,6 @@ hardening:
|
|||||||
rejectUnderscoresHeaders: true
|
rejectUnderscoresHeaders: true
|
||||||
unescapeSlashes: true
|
unescapeSlashes: true
|
||||||
preserveExternalRequestId: false
|
preserveExternalRequestId: false
|
||||||
|
|
||||||
|
httpFilter:
|
||||||
|
grpcWeb: false
|
||||||
|
@ -25,8 +25,7 @@ spec:
|
|||||||
repoURL: {{ default "https://cdn.zero-downtime.net/charts" (index .Values $name "repository") }}
|
repoURL: {{ default "https://cdn.zero-downtime.net/charts" (index .Values $name "repository") }}
|
||||||
targetRevision: {{ default "HEAD" ( index .Values $name "targetRevision" ) | quote }}
|
targetRevision: {{ default "HEAD" ( index .Values $name "targetRevision" ) | quote }}
|
||||||
helm:
|
helm:
|
||||||
# add with 1.32
|
skipTests: true
|
||||||
#skipTests: true
|
|
||||||
valuesObject:
|
valuesObject:
|
||||||
{{- include (print $name "-values") $ | nindent 8 }}
|
{{- include (print $name "-values") $ | nindent 8 }}
|
||||||
|
|
||||||
|
@ -98,6 +98,10 @@ proxyProtocol: {{ default true (index .Values "istio-ingress" "proxyProtocol") }
|
|||||||
hardening:
|
hardening:
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with (index .Values "istio-ingress" "httpFilter") }}
|
||||||
|
httpFilter:
|
||||||
|
{{- toYaml . | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -93,6 +93,10 @@ proxyProtocol: {{ default true (index .Values "istio-private-ingress" "proxyProt
|
|||||||
hardening:
|
hardening:
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with (index .Values "istio-private-ingress" "httpFilter") }}
|
||||||
|
httpFilter:
|
||||||
|
{{- toYaml . | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user