Skip to content

Commit

Permalink
[1.17] Rename GGv2 env vars to remove experimental phrasing (#9709)
Browse files Browse the repository at this point in the history
* rename the k8s gateway enablement variable to remove experimental

* remove unused GG_EXPERIMENTAL_ISTIO_MTLS_SDS_ENABLED env var
  • Loading branch information
inFocus7 committed Jun 28, 2024
1 parent 8efa297 commit c52f4f2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
5 changes: 5 additions & 0 deletions changelog/v1.17.0-rc10/rename-ggv2-enablement-var.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NON_USER_FACING
description: >-
Rename the k8s gateway api enablement variable from `GG_EXPERIMENTAL_K8S_GW_CONTROLLER` to `GG_K8S_GW_CONTROLLER`.
Remove unreferenced `GG_EXPERIMENTAL_ISTIO_MTLS_SDS_ENABLED` variable.
2 changes: 1 addition & 1 deletion install/helm/gloo/templates/1-gloo-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.kubeGateway.enabled }}
- name: GG_EXPERIMENTAL_K8S_GW_CONTROLLER
- name: GG_K8S_GW_CONTROLLER
value: "true"
{{- end }}{{/* if .Values.kubeGateway.enabled */}}
{{- if .Values.gloo.splitLogOutput }}
Expand Down
2 changes: 1 addition & 1 deletion projects/gloo/cli/pkg/cmd/check/kube_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func CheckKubeGatewayResources(ctx context.Context, printer printers.P, opts *op
}

// check if Kubernetes Gateway integration is enabled by checking if the Gateway API CRDs are installed and
// whether the GG_EXPERIMENTAL_K8S_GW_CONTROLLER env var is true in the gloo deployment.
// whether the GG_K8S_GW_CONTROLLER env var is true in the gloo deployment.
func isKubeGatewayEnabled(ctx context.Context, opts *options.Options) (bool, error) {
cfg, err := kubeutils.GetRestConfigWithKubeContext(opts.Top.KubeContext)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion projects/gloo/cli/pkg/kubegatewayutils/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func DetectKubeGatewayCrds(cfg *rest.Config) (bool, error) {
return false, nil
}

// Returns true if the GG_EXPERIMENTAL_K8S_GW_CONTROLLER env var is true in the gloo deployment.
// Returns true if the GG_K8S_GW_CONTROLLER env var is true in the gloo deployment.
// Note: This is tied up with the GG implementation and will need to be updated if it changes
func DetectKubeGatewayEnabled(ctx context.Context, opts *options.Options) (bool, error) {
// check if Kubernetes Gateway integration is enabled by checking if the controller env variable is set in the
Expand Down
2 changes: 1 addition & 1 deletion projects/gloo/constants/gloo_gateway.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package constants

const (
GlooGatewayEnableK8sGwControllerEnv = "GG_EXPERIMENTAL_K8S_GW_CONTROLLER"
GlooGatewayEnableK8sGwControllerEnv = "GG_K8S_GW_CONTROLLER"
)
6 changes: 0 additions & 6 deletions projects/gloo/constants/istio.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package constants

const (
// Env variable that indicates the Istio mtls integration is enabled via istioSDS.enabled on the helm chart.
// If enabled, an istio-proxy container is assumed to exist alongside the gateway proxy.
// Note: This value should be inherited at installation time, to determine if the istio sidecar is injected.
// In the interim, we use an env variable to control the value
IstioMtlsEnabled = "GG_EXPERIMENTAL_ISTIO_MTLS_SDS_ENABLED"

// Env variable that indicates the Istio sidecar injection is enabled via istioIntegration.enableIstioSidecarOnGateway
// on the helm chart. If enabled, the gateway proxy is assumed to have an istio sidecar injected.
IstioInjectionEnabled = "ENABLE_ISTIO_SIDECAR_ON_GATEWAY"
Expand Down

0 comments on commit c52f4f2

Please sign in to comment.