Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Update Ingress to use networking.k8s.io/v1 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Strobel committed May 12, 2022
1 parent 8be01c9 commit 1008ae3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
15 changes: 13 additions & 2 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 1008ae3

Please sign in to comment.