From 04ce776f14086008424f252bcbfe58eda5dab554 Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Mon, 14 Oct 2024 18:50:45 +0800 Subject: [PATCH] feat: Support route fallback by default (#1381) --- helm/core/templates/fallback-envoyfilter.yaml | 22 +++++++++++++++++++ helm/core/values.yaml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 helm/core/templates/fallback-envoyfilter.yaml diff --git a/helm/core/templates/fallback-envoyfilter.yaml b/helm/core/templates/fallback-envoyfilter.yaml new file mode 100644 index 000000000..567ee0925 --- /dev/null +++ b/helm/core/templates/fallback-envoyfilter.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: {{ include "gateway.name" . }}-global-custom-response + namespace: {{ .Release.Namespace }} + labels: + {{- include "gateway.labels" . | nindent 4}} +spec: + configPatches: + - applyTo: HTTP_FILTER + match: + context: GATEWAY + listener: + filterChain: + filter: + name: envoy.filters.network.http_connection_manager + patch: + operation: INSERT_FIRST + value: + name: envoy.filters.http.custom_response + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.custom_response.v3.CustomResponse \ No newline at end of file diff --git a/helm/core/values.yaml b/helm/core/values.yaml index ce0889920..39582f748 100644 --- a/helm/core/values.yaml +++ b/helm/core/values.yaml @@ -26,7 +26,7 @@ global: autoscalingv2API: true local: false # When deploying to a local cluster (e.g.: kind cluster), set this to true. kind: false # Deprecated. Please use "global.local" instead. Will be removed later. - enableIstioAPI: false + enableIstioAPI: true enableGatewayAPI: false # Deprecated enableHigressIstio: false