diff --git a/Chart.yaml b/Chart.yaml index 1d5d68a..ad8bd40 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: swaggerui -version: 0.3.4 +version: 0.3.5 appVersion: 3.24.3 description: Swagger is an open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. keywords: diff --git a/templates/ingress.yaml b/templates/ingress.yaml index aae0095..41a8ec2 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -2,7 +2,9 @@ {{- if .Values.ingress.enabled }} {{- $fullName := include "swagger-ui.fullname" . -}} {{- $ingressPath := .Values.ingress.path -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }} +apiVersion: networking.k8s.io/v1 +{{ else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} apiVersion: networking.k8s.io/v1beta1 {{ else }} apiVersion: extensions/v1beta1 @@ -36,8 +38,17 @@ spec: http: paths: - path: {{ $ingressPath }} +{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + pathType: "ImplementationSpecific" + backend: + service: + name: {{ $fullName }} + port: + name: http +{{- else }} backend: serviceName: {{ $fullName }} servicePort: http - {{- end }} +{{- end }} +{{- end }} {{- end }}