Upgrade ingress template
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
14b552a81a
commit
8648c9aa8e
|
@ -1,16 +1,18 @@
|
||||||
{{- if .Values.ingress.enabled -}}
|
{{- if .Values.ingress.enabled -}}
|
||||||
{{- $fullName := include "wkd4pgp.fullname" . -}}
|
{{- $fullName := include "wkd4pgp.fullname" . -}}
|
||||||
{{- $svcPort := .Values.service.port -}}
|
{{- $svcPort := .Values.service.port -}}
|
||||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- $version := "extensions/v1beta1" -}}
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- else -}}
|
{{- $version = "networking.k8s.io/v1" -}}
|
||||||
apiVersion: extensions/v1beta1
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- end }}
|
{{- $version = "networking.k8s.io/v1beta1" -}}
|
||||||
|
{{- end -}}
|
||||||
|
apiVersion: {{ $version }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}
|
name: {{ $fullName }}
|
||||||
labels:
|
labels:
|
||||||
{{ include "wkd4pgp.labels" . | indent 4 }}
|
{{- include "wkd4pgp.labels" . | nindent 4 }}
|
||||||
{{- with .Values.ingress.annotations }}
|
{{- with .Values.ingress.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
|
@ -32,10 +34,18 @@ spec:
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
{{- range .paths }}
|
{{- range .paths }}
|
||||||
- path: {{ . }}
|
- path: {{ .path }}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if eq $version "networking.k8s.io/v1" }}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
port:
|
||||||
|
number: {{ $svcPort }}
|
||||||
|
{{- else -}}
|
||||||
serviceName: {{ $fullName }}
|
serviceName: {{ $fullName }}
|
||||||
servicePort: {{ $svcPort }}
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -45,10 +45,12 @@ ingress:
|
||||||
hosts:
|
hosts:
|
||||||
- host: rtyn.berlin
|
- host: rtyn.berlin
|
||||||
paths:
|
paths:
|
||||||
- /.well-known/openpgpkey/
|
- path: /.well-known/openpgpkey/
|
||||||
|
pathType: Prefix
|
||||||
- host: openpgpkey.rtyn.berlin
|
- host: openpgpkey.rtyn.berlin
|
||||||
paths:
|
paths:
|
||||||
- /.well-known/openpgpkey/
|
- path: /.well-known/openpgpkey/
|
||||||
|
pathType: Prefix
|
||||||
|
|
||||||
tls:
|
tls:
|
||||||
- secretName: chart-example-tls
|
- secretName: chart-example-tls
|
||||||
|
|
Loading…
Reference in New Issue