Kong / charts

Helm chart for Kong
Apache License 2.0
243 stars 475 forks source link

ingress: enforce expressions router flavor when using KIC v3.0+ #937

Open pmalek opened 10 months ago

pmalek commented 10 months ago

What this PR does / why we need it:

Use an obscure .Subcharts variable to get subcharts values and based on that enforce the expressions router flavor in Kong Gateway when KIC v3.0+ is used

czeslavo commented 10 months ago

Nothing really important, but I tested both Subcharts.gateway.Values and .Values.gateway and they give the same data (validation fails as expected). I have no idea which way is the good way as I couldn't find documentation for any. 😬

--- a/charts/ingress/templates/_helpers.tpl
+++ b/charts/ingress/templates/_helpers.tpl
@@ -1,6 +1,6 @@
 {{- define "ingressController.enforceGatewayRouterFlavorFor3_0AndUp" -}}
-{{ $gatewayValues := .Subcharts.gateway.Values }}
-{{ $controllerValues := .Subcharts.controller.Values }}
+{{ $gatewayValues := .Values.gateway }}
+{{ $controllerValues := .Values.controller }}