diff --git a/charts/apisix/README.md b/charts/apisix/README.md index f39508d3..5eb263bc 100644 --- a/charts/apisix/README.md +++ b/charts/apisix/README.md @@ -172,6 +172,7 @@ The command removes all the Kubernetes components associated with the chart and | ingress-controller | object | `{"config":{"apisix":{"adminAPIVersion":"v3"}},"enabled":false}` | Ingress controller configuration | | ingress.annotations | object | `{}` | Ingress annotations | | ingress.servicePort | number | `nil` | Service port to send traffic. Defaults to `service.http.servicePort`. | +| ingress.pathType | string | `"ImplementationSpecific"` | Path type for the Ingress rules. | | initContainer.image | string | `"busybox"` | Init container image | | initContainer.tag | float | `1.28` | Init container tag | | metrics | object | `{"serviceMonitor":{"annotations":{},"enabled":false,"interval":"15s","labels":{},"name":"","namespace":""}}` | Observability configuration. | diff --git a/charts/apisix/templates/ingress.yaml b/charts/apisix/templates/ingress.yaml index c8a9b819..47874e1f 100644 --- a/charts/apisix/templates/ingress.yaml +++ b/charts/apisix/templates/ingress.yaml @@ -17,6 +17,7 @@ {{- if (.Values.ingress.enabled) -}} {{- $fullName := include "apisix.fullname" . -}} {{- $svcPort := .Values.ingress.servicePort | default .Values.service.http.servicePort -}} +{{- $pathType := .Values.ingress.pathType -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} @@ -60,7 +61,7 @@ spec: {{- range .paths }} - path: {{ . }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} - pathType: ImplementationSpecific + pathType: {{ $pathType }} backend: service: name: {{ $fullName }}-gateway diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index 6c7cd9c9..74c124e0 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -213,6 +213,8 @@ ingress: - host: apisix.local paths: [] tls: [] + # -- Path type for the Ingress rules. + pathType: ImplementationSpecific # -- Observability configuration. metrics: