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

Update Ingress to use networking.k8s.io/v1 (#21) #22

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}