From a2078711f594161f24f482a6a8aebcf7d4f1d84e Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Wed, 20 Sep 2023 02:20:20 -0500 Subject: [PATCH] feat: Use istio to provide Gateway API support (#543) --- helm/core/templates/configmap.yaml | 2 +- helm/core/templates/controller-deployment.yaml | 9 +++++++++ helm/core/values.yaml | 1 + helm/higress/README.md | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/helm/core/templates/configmap.yaml b/helm/core/templates/configmap.yaml index bd067a0f5..6ef7b87bf 100644 --- a/helm/core/templates/configmap.yaml +++ b/helm/core/templates/configmap.yaml @@ -24,7 +24,7 @@ configSources: - address: "xds://127.0.0.1:15051" - {{- if .Values.global.enableIstioAPI }} + {{- if or .Values.global.enableIstioAPI .Values.global.enableGatewayAPI }} - address: "k8s://" {{- end }} diff --git a/helm/core/templates/controller-deployment.yaml b/helm/core/templates/controller-deployment.yaml index 675180f66..e9b03f570 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -126,10 +126,19 @@ spec: value: "{{ .Values.global.istiod.enableAnalysis }}" - name: CLUSTER_ID value: "{{ $.Values.global.multiCluster.clusterName | default `Kubernetes` }}" + # HIGRESS_ENABLE_ISTIO_API is only used to restart the controller pod after the config change {{- if .Values.global.enableIstioAPI }} - name: HIGRESS_ENABLE_ISTIO_API value: "true" {{- end }} + {{- if .Values.global.enableGatewayAPI }} + - name: PILOT_ENABLE_GATEWAY_API + value: "true" + - name: PILOT_ENABLE_GATEWAY_API_STATUS + value: "true" + - name: PILOT_ENABLE_GATEWAY_API_DEPLOYMENT_CONTROLLER + value: "false" + {{- end }} {{- if not .Values.global.enableHigressIstio }} - name: CUSTOM_CA_CERT_NAME value: "higress-ca-root-cert" diff --git a/helm/core/values.yaml b/helm/core/values.yaml index 8e7498cb8..61e6b7fe3 100644 --- a/helm/core/values.yaml +++ b/helm/core/values.yaml @@ -17,6 +17,7 @@ global: 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 + enableGatewayAPI: false # Deprecated enableHigressIstio: false # Used to locate istiod. diff --git a/helm/higress/README.md b/helm/higress/README.md index f83e5d5c6..6204b7a1e 100644 --- a/helm/higress/README.md +++ b/helm/higress/README.md @@ -40,6 +40,7 @@ The command removes all the Kubernetes components associated with the chart and | global.disableAlpnH2 | Whether to disable HTTP/2 in ALPN | true | | global.enableStatus | If `true`, Higress Controller will update the `status` field of Ingress resources.
When migrating from Nginx Ingress, in order to avoid `status` field of Ingress objects being overwritten, this parameter needs to be set to false, so Higress won't write the entry IP to the `status` field of the corresponding Ingress object. | true | | global.enableIstioAPI | If `true`, Higress Controller will monitor istio resources as well | false | +| global.enableGatewayAPI | If `true`, Higress Controller will monitor Gateway API resources as well | false | | global.istioNamespace | The namespace istio is installed to | istio-system | | **Core Paramters** | | | | higress-core.gateway.replicas | Number of Higress Gateway pods | 2 |