Skip to content

Commit

Permalink
feat: Upgrade helm ingress to v1 (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson authored Nov 25, 2024
1 parent 3fa004e commit 064a978
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions deploy/kubernetes/charts/ui/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "ui.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand All @@ -16,7 +12,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.class }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
Expand All @@ -30,13 +26,28 @@ spec:
{{- end }}
{{- end }}
rules:
{{- if .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- else }}
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}

0 comments on commit 064a978

Please sign in to comment.