[bitnami/apisix] Fix ingress template (#18255)

Signed-off-by: Fran de Paz <fdepaz@vmware.com>
Signed-off-by: Fran de Paz Galán <fdepaz@vmware.com>
This commit is contained in:
Fran de Paz Galán
2023-11-06 15:50:50 +01:00
committed by GitHub
parent 8a86963292
commit 41bc0e3015
2 changed files with 4 additions and 3 deletions

View File

@@ -45,4 +45,4 @@ sources:
- https://github.com/bitnami/charts/tree/main/bitnami/apisix
- https://github.com/bitnami/charts/tree/main/bitnami/apisix-dashboard
- https://github.com/bitnami/charts/tree/main/bitnami/apisix-ingress-controller
version: 2.2.2
version: 2.2.3

View File

@@ -21,6 +21,7 @@ spec:
ingressClassName: {{ .Values.controlPlane.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- $servicePort := (printf "%s-%s" (ternary "https" "http" .Values.controlPlane.tls.enabled) "admin") }}
{{- if .Values.controlPlane.ingress.hostname }}
- host: {{ .Values.controlPlane.ingress.hostname }}
http:
@@ -32,7 +33,7 @@ spec:
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.controlPlane.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "apisix.control-plane.fullname" . | trunc 63 | trimSuffix "-") "servicePort" "{{ ternary https http .Values.controlPlane.tls.enabled }}-admin" "context" $) | nindent 14 }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "apisix.control-plane.fullname" . | trunc 63 | trimSuffix "-") "servicePort" $servicePort "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.controlPlane.ingress.extraHosts }}
- host: {{ .name | quote }}
@@ -42,7 +43,7 @@ spec:
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "apisix.control-plane.fullname" $ | trunc 63 | trimSuffix "-") "servicePort" "{{ ternary https http $.Values.controlPlane.tls.enabled }}-admin" "context" $) | nindent 14 }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "apisix.control-plane.fullname" $ | trunc 63 | trimSuffix "-") "servicePort" $servicePort "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.controlPlane.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.controlPlane.ingress.extraRules "context" $) | nindent 4 }}