diff --git a/helm/core/templates/controller-deployment.yaml b/helm/core/templates/controller-deployment.yaml index c3bc70aea..dda26d243 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -69,10 +69,12 @@ spec: fieldPath: spec.serviceAccountName - name: DOMAIN_SUFFIX value: {{ .Values.global.proxy.clusterDomain }} - - name: PILOT_ENABLE_ALPHA_GATEWAY_API - value: "true" - name: GATEWAY_NAME value: {{ include "gateway.name" . }} + - name: PILOT_ENABLE_GATEWAY_API + value: "{{ .Values.global.enableGatewayAPI }}" + - name: PILOT_ENABLE_ALPHA_GATEWAY_API + value: "{{ .Values.global.enableGatewayAPI }}" {{- if .Values.controller.env }} {{- range $key, $val := .Values.controller.env }} - name: {{ $key }} @@ -219,16 +221,14 @@ spec: - name: HIGRESS_ENABLE_ISTIO_API value: "true" {{- end }} - {{- if .Values.global.enableGatewayAPI }} - name: PILOT_ENABLE_GATEWAY_API - value: "true" + value: "false" - name: PILOT_ENABLE_ALPHA_GATEWAY_API - value: "true" + value: "false" - name: PILOT_ENABLE_GATEWAY_API_STATUS - value: "true" + value: "false" - 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/pkg/ingress/config/ingress_config.go b/pkg/ingress/config/ingress_config.go index 9c2fc94b9..6030ae50a 100644 --- a/pkg/ingress/config/ingress_config.go +++ b/pkg/ingress/config/ingress_config.go @@ -34,6 +34,7 @@ import ( extensions "istio.io/api/extensions/v1alpha1" networking "istio.io/api/networking/v1alpha3" istiotype "istio.io/api/type/v1beta1" + "istio.io/istio/pilot/pkg/features" istiomodel "istio.io/istio/pilot/pkg/model" "istio.io/istio/pilot/pkg/util/protoconv" "istio.io/istio/pkg/cluster" @@ -235,8 +236,9 @@ func (m *IngressConfig) AddLocalCluster(options common.Options) { ingressController = ingressv1.NewController(m.localKubeClient, m.localKubeClient, options, secretController) } m.remoteIngressControllers[options.ClusterId] = ingressController - - m.remoteGatewayControllers[options.ClusterId] = gateway.NewController(m.localKubeClient, options) + if features.EnableGatewayAPI { + m.remoteGatewayControllers[options.ClusterId] = gateway.NewController(m.localKubeClient, options) + } } func (m *IngressConfig) List(typ config.GroupVersionKind, namespace string) []config.Config {