mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 06:37:26 +08:00
fix: Control gateway-api Listener with global.enableGatewayAPI in Helm (#1461)
This commit is contained in:
@@ -69,10 +69,12 @@ spec:
|
|||||||
fieldPath: spec.serviceAccountName
|
fieldPath: spec.serviceAccountName
|
||||||
- name: DOMAIN_SUFFIX
|
- name: DOMAIN_SUFFIX
|
||||||
value: {{ .Values.global.proxy.clusterDomain }}
|
value: {{ .Values.global.proxy.clusterDomain }}
|
||||||
- name: PILOT_ENABLE_ALPHA_GATEWAY_API
|
|
||||||
value: "true"
|
|
||||||
- name: GATEWAY_NAME
|
- name: GATEWAY_NAME
|
||||||
value: {{ include "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 }}
|
{{- if .Values.controller.env }}
|
||||||
{{- range $key, $val := .Values.controller.env }}
|
{{- range $key, $val := .Values.controller.env }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
@@ -219,16 +221,14 @@ spec:
|
|||||||
- name: HIGRESS_ENABLE_ISTIO_API
|
- name: HIGRESS_ENABLE_ISTIO_API
|
||||||
value: "true"
|
value: "true"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.global.enableGatewayAPI }}
|
|
||||||
- name: PILOT_ENABLE_GATEWAY_API
|
- name: PILOT_ENABLE_GATEWAY_API
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: PILOT_ENABLE_ALPHA_GATEWAY_API
|
- name: PILOT_ENABLE_ALPHA_GATEWAY_API
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: PILOT_ENABLE_GATEWAY_API_STATUS
|
- name: PILOT_ENABLE_GATEWAY_API_STATUS
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: PILOT_ENABLE_GATEWAY_API_DEPLOYMENT_CONTROLLER
|
- name: PILOT_ENABLE_GATEWAY_API_DEPLOYMENT_CONTROLLER
|
||||||
value: "false"
|
value: "false"
|
||||||
{{- end }}
|
|
||||||
{{- if not .Values.global.enableHigressIstio }}
|
{{- if not .Values.global.enableHigressIstio }}
|
||||||
- name: CUSTOM_CA_CERT_NAME
|
- name: CUSTOM_CA_CERT_NAME
|
||||||
value: "higress-ca-root-cert"
|
value: "higress-ca-root-cert"
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import (
|
|||||||
extensions "istio.io/api/extensions/v1alpha1"
|
extensions "istio.io/api/extensions/v1alpha1"
|
||||||
networking "istio.io/api/networking/v1alpha3"
|
networking "istio.io/api/networking/v1alpha3"
|
||||||
istiotype "istio.io/api/type/v1beta1"
|
istiotype "istio.io/api/type/v1beta1"
|
||||||
|
"istio.io/istio/pilot/pkg/features"
|
||||||
istiomodel "istio.io/istio/pilot/pkg/model"
|
istiomodel "istio.io/istio/pilot/pkg/model"
|
||||||
"istio.io/istio/pilot/pkg/util/protoconv"
|
"istio.io/istio/pilot/pkg/util/protoconv"
|
||||||
"istio.io/istio/pkg/cluster"
|
"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)
|
ingressController = ingressv1.NewController(m.localKubeClient, m.localKubeClient, options, secretController)
|
||||||
}
|
}
|
||||||
m.remoteIngressControllers[options.ClusterId] = ingressController
|
m.remoteIngressControllers[options.ClusterId] = ingressController
|
||||||
|
if features.EnableGatewayAPI {
|
||||||
m.remoteGatewayControllers[options.ClusterId] = gateway.NewController(m.localKubeClient, options)
|
m.remoteGatewayControllers[options.ClusterId] = gateway.NewController(m.localKubeClient, options)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *IngressConfig) List(typ config.GroupVersionKind, namespace string) []config.Config {
|
func (m *IngressConfig) List(typ config.GroupVersionKind, namespace string) []config.Config {
|
||||||
|
|||||||
Reference in New Issue
Block a user